primer / view_components
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
  • 13% duplication:
    • 10,586 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,470 duplicated lines
  • 202 duplicates
system13% (1,470 lines)
Duplication per Extension
yml21% (723 lines)
rb11% (703 lines)
erb15% (44 lines)
Duplication per Component (primary)
lib18% (843 lines)
app8% (252 lines)
stories17% (244 lines)
static10% (131 lines)
ROOT0% (0 lines)
script0% (0 lines)

Duplication Between Components (50+ lines)

G app app lib lib app--lib 78

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 202 duplicates...
Size#FoldersFilesLinesCode
296 x 2 lib/primer/classify
lib/tasks
1482:1777 (16%)
3:298 (99%)
view
79 x 2 lib/rubocop/cop/primer
lib/rubocop/cop/primer
61:139 (29%)
187:265 (29%)
view
13 x 2 static
static
85:97 (1%)
133:145 (1%)
view
13 x 2 app/components/primer/alpha
app/components/primer/alpha
1:15 (100%)
2:14 (72%)
view
11 x 2 stories/primer
stories/primer
23:34 (17%)
57:68 (17%)
view
10 x 2 app/components/primer/dropdown
app/components/primer
36:46 (14%)
45:56 (40%)
view
10 x 2 stories/primer
stories/primer
40:50 (15%)
57:67 (15%)
view
10 x 2 stories/primer
stories/primer
23:33 (15%)
40:50 (15%)
view
10 x 2 static
static
56:65 (<1%)
100:109 (<1%)
view
9 x 2 app/components/primer/alpha
app/components/primer/alpha
1:11 (100%)
2:10 (64%)
view
9 x 2 stories/primer
stories/primer
7:15 (14%)
57:65 (14%)
view
9 x 2 stories/primer
stories/primer
7:15 (14%)
40:48 (14%)
view
9 x 2 stories/primer
stories/primer
7:15 (14%)
23:31 (14%)
view
9 x 2 stories/primer/dropdown
stories/primer/dropdown
9:18 (27%)
25:34 (27%)
view
9 x 2 app/components/primer/alpha
app/components/primer/beta/auto_complete
267:276 (8%)
35:44 (36%)
view
8 x 2 lib/primer/view_componen...inters/argument_mappers
lib/primer/view_componen...inters/argument_mappers
24:31 (30%)
41:48 (20%)
view
8 x 2 static
static
326:333 (<1%)
361:368 (<1%)
view
8 x 2 lib/primer/view_componen...inters/argument_mappers
lib/primer/view_componen...inters/argument_mappers
64:71 (14%)
24:31 (30%)
view
8 x 2 static
static
110:117 (<1%)
130:137 (<1%)
view
8 x 2 stories/primer/navigation
stories/primer/navigation
22:30 (12%)
50:58 (12%)
view
8 x 2 static
static
76:83 (<1%)
124:131 (<1%)
view
8 x 2 app/components/primer/alpha
app/components/primer/alpha
129:138 (20%)
77:86 (19%)
view
8 x 2 stories/primer/beta/truncate
stories/primer
11:19 (57%)
9:17 (61%)
view
8 x 2 stories/primer/beta
stories/primer/beta
9:17 (9%)
88:96 (9%)
view
8 x 2 app/components/primer/alpha
app/components/primer/alpha
36:49 (20%)
24:37 (19%)
view
8 x 2 static
static
149:156 (<1%)
334:341 (<1%)
view
8 x 2 static
static
24:31 (<1%)
395:402 (<1%)
view
8 x 2 lib/primer/view_componen...inters/argument_mappers
lib/primer/view_componen...inters/argument_mappers
64:71 (14%)
41:48 (20%)
view
8 x 2 static
static
66:73 (<1%)
114:121 (<1%)
view
7 x 2 stories/primer
stories/primer
156:162 (3%)
192:198 (3%)
view
7 x 2 app/components/primer
app/components/primer
281:288 (38%)
84:91 (14%)
view
7 x 2 app/components/primer/alpha
app/components/primer
267:274 (6%)
84:91 (14%)
view
7 x 2 app/components/primer/alpha
app/components/primer/alpha
34:45 (20%)
31:42 (17%)
view
7 x 2 app/components/primer/beta/auto_complete
app/components/primer
35:42 (28%)
281:288 (38%)
view
7 x 2 app/components/primer
app/components/primer
69:76 (15%)
281:288 (38%)
view
7 x 2 stories/primer/beta
stories/primer/beta
49:56 (8%)
62:69 (8%)
view
7 x 2 app/components/primer
app/components/primer
36:43 (26%)
67:74 (14%)
view
7 x 2 app/components/primer
app/components/primer
281:288 (38%)
67:74 (14%)
view
7 x 2 stories/primer/beta
stories/primer/beta
49:56 (8%)
75:82 (8%)
view
7 x 2 app/components/primer/beta/auto_complete
app/components/primer/beta
36:43 (28%)
20:27 (46%)
view
7 x 2 app/components/primer/alpha
app/components/primer
267:274 (6%)
281:288 (38%)
view
7 x 2 lib/yard
lib/yard
7:15 (50%)
7:15 (50%)
view
7 x 2 app/components/primer/beta/auto_complete
app/components/primer
35:42 (28%)
67:74 (14%)
view
7 x 2 app/components/primer
app/components/primer/beta/auto_complete
36:43 (26%)
35:42 (28%)
view
7 x 2 stories/primer/navigation
stories/primer/navigation
22:29 (11%)
36:43 (11%)
view
7 x 2 app/components/primer/beta/auto_complete
app/components/primer
35:42 (28%)
69:76 (15%)
view
7 x 2 app/components/primer
app/components/primer
67:74 (14%)
84:91 (14%)
view
7 x 2 app/components/primer/alpha
app/components/primer/beta
268:275 (6%)
20:27 (46%)
view
7 x 2 stories/primer/alpha
stories/primer/alpha
22:28 (30%)
25:31 (26%)
view
7 x 2 app/components/primer/alpha
app/components/primer/beta
247:253 (6%)
104:110 (17%)
view