microsoft / dag-history-component
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 8% duplication:
    • 3,947 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 325 duplicated lines
  • 44 duplicates
system8% (325 lines)
Duplication per Extension
tsx10% (259 lines)
scss9% (60 lines)
ts<1% (6 lines)
Duplication per Component (primary)
stories/components47% (188 lines)
src/components5% (137 lines)
ROOT0% (0 lines)
example0% (0 lines)
example/components0% (0 lines)
example/persister0% (0 lines)
example/state0% (0 lines)
scripts0% (0 lines)
src0% (0 lines)
src/state0% (0 lines)
src/util0% (0 lines)
stories0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 44 duplicates...
Size#FoldersFilesLinesCode
35 x 2 stories/components/StateList
stories/components/StateList
index.tsx
index.tsx
20:57 (35%)
74:111 (35%)
view
9 x 2 stories/components/StateList
stories/components/StateList
index.tsx
index.tsx
9:18 (9%)
63:72 (9%)
view
9 x 2 src/components/History/HistoryView
src/components/History/HistoryView
BranchedHistoryView.tsx
ChronologicalHistoryView.tsx
77:89 (12%)
57:69 (13%)
view
8 x 2 stories/components/State
stories/components/State
index.tsx
index.tsx
49:56 (8%)
71:78 (8%)
view
8 x 2 stories/components/State
stories/components/State
index.tsx
index.tsx
60:67 (8%)
83:90 (8%)
view
8 x 2 src/components/Branch
src/components/State
Branch.scss
State.scss
38:46 (14%)
66:74 (12%)
view
8 x 2 src/components/Branch
src/components/State
Branch.scss
State.scss
10:19 (14%)
27:36 (12%)
view
8 x 2 src/components/State
src/components/State
State.scss
State.scss
49:58 (12%)
64:73 (12%)
view
7 x 2 stories/components/StateList
stories/components/StateList
index.tsx
index.tsx
38:44 (7%)
103:109 (7%)
view
7 x 2 stories/components/State
stories/components/State
index.tsx
index.tsx
18:24 (7%)
71:77 (7%)
view
7 x 2 stories/components/BranchProfile
stories/components/BranchProfile
index.tsx
index.tsx
74:80 (6%)
85:91 (6%)
view
7 x 2 stories/components/BranchProfile
stories/components/BranchProfile
index.tsx
index.tsx
74:80 (6%)
96:102 (6%)
view
7 x 2 stories/components/State
stories/components/State
index.tsx
index.tsx
18:24 (7%)
49:55 (7%)
view
7 x 2 src/components/Bookmark
src/components/Branch
Bookmark.scss
Branch.scss
29:36 (5%)
38:45 (12%)
view
7 x 2 stories/components/StateList
stories/components/StateList
index.tsx
index.tsx
92:98 (7%)
103:109 (7%)
view
7 x 2 stories/components/BranchProfile
stories/components/BranchProfile
index.tsx
index.tsx
85:91 (6%)
96:102 (6%)
view
7 x 2 src/components/Bookmark
src/components/State
Bookmark.scss
State.scss
29:36 (5%)
66:73 (11%)
view
7 x 2 stories/components/StateList
stories/components/StateList
index.tsx
index.tsx
38:44 (7%)
49:55 (7%)
view
7 x 2 src/components/Branch
src/components/State
Branch.scss
State.scss
38:45 (12%)
51:58 (11%)
view
7 x 2 src/components/Bookmark
src/components/State
Bookmark.scss
State.scss
29:36 (5%)
51:58 (11%)
view