mapillary / iD
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
  • 7% duplication:
    • 59,857 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,398 duplicated lines
  • 489 duplicates
system7% (4,398 lines)
Duplication per Extension
js9% (4,277 lines)
css1% (109 lines)
yaml<1% (12 lines)
Duplication per Component (primary)
modules/ui8% (1,657 lines)
modules/svg23% (949 lines)
modules/services10% (458 lines)
modules/modes19% (380 lines)
modules/validations12% (250 lines)
modules/operations20% (204 lines)
css1% (109 lines)
modules/osm6% (106 lines)
modules/behavior4% (60 lines)
modules/renderer3% (60 lines)
modules/geo9% (52 lines)
ROOT3% (33 lines)
modules/util1% (18 lines)
modules/core<1% (14 lines)
modules/actions<1% (12 lines)
modules/entities5% (12 lines)
modules/presets1% (12 lines)
data<1% (12 lines)
modules0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 489 duplicates...
Size#FoldersFilesLinesCode
45 x 2 modules/svg
modules/svg
178:240 (21%)
125:187 (28%)
view
44 x 2 modules/ui
modules/ui
38:93 (51%)
40:95 (50%)
view
35 x 2 modules/svg
modules/svg
144:188 (21%)
203:249 (18%)
view
34 x 2 modules/svg
modules/svg
197:240 (16%)
203:248 (18%)
view
27 x 2 modules/operations
modules/operations
25:64 (50%)
42:82 (45%)
view
27 x 2 modules/svg
modules/svg
50:92 (13%)
35:77 (16%)
view
27 x 2 modules/operations
modules/operations
25:64 (50%)
24:64 (51%)
view
27 x 2 modules/operations
modules/operations
42:82 (45%)
24:64 (51%)
view
26 x 2 modules/ui
modules/ui
102:138 (20%)
113:149 (19%)
view
25 x 2 modules/svg
modules/svg
35:74 (15%)
45:92 (13%)
view
25 x 2 modules/svg
modules/svg
50:89 (12%)
45:92 (13%)
view
20 x 2 modules/modes
modules/modes
100:132 (22%)
104:136 (21%)
view
19 x 2 modules/operations
modules/operations
43:70 (33%)
107:134 (19%)
view
18 x 2 modules/svg
modules/svg
53:83 (16%)
53:83 (16%)
view
18 x 2 modules/modes
modules/modes
105:132 (20%)
94:121 (21%)
view
18 x 2 modules/svg
modules/svg
41:65 (12%)
52:76 (8%)
view
18 x 2 modules/modes
modules/modes
109:136 (18%)
94:121 (21%)
view
18 x 2 modules/operations
modules/operations
44:70 (31%)
91:117 (22%)
view
18 x 2 modules/operations
modules/operations
108:134 (18%)
91:117 (22%)
view
18 x 2 modules/ui
modules/ui
316:339 (2%)
369:391 (2%)
view
17 x 2 modules/validations
modules/validations
152:178 (8%)
71:97 (17%)
view
17 x 2 modules/svg
modules/svg
269:294 (8%)
206:231 (10%)
view
17 x 2 modules/validations
modules/validations
206:223 (8%)
117:134 (17%)
view
16 x 2 modules/operations
modules/operations
94:118 (16%)
109:133 (16%)
view
16 x 2 modules/operations
modules/operations
94:118 (16%)
92:116 (19%)
view
16 x 2 modules/behavior
modules/modes
39:60 (5%)
104:125 (5%)
view
16 x 2 modules/ui
modules/ui
98:124 (18%)
100:126 (18%)
view
16 x 2 modules/services
modules/services
249:270 (3%)
149:170 (4%)
view
16 x 2 modules/operations
modules/operations
45:69 (28%)
94:118 (16%)
view
15 x 2 modules/ui
modules/ui
43:62 (11%)
52:71 (11%)
view
15 x 2 modules/ui/intro
modules/ui/intro
485:505 (4%)
772:792 (2%)
view
15 x 2 modules/ui
modules/ui
308:327 (5%)
386:405 (5%)
view
15 x 2 modules/svg
modules/svg
189:203 (10%)
146:160 (6%)
view
15 x 2 modules/ui/intro
modules/ui/intro
57:71 (2%)
58:72 (1%)
view
15 x 2 modules/ui
modules/ui
118:136 (12%)
93:111 (6%)
view
14 x 2 modules/svg
modules/svg
59:82 (8%)
64:87 (8%)
view
14 x 2 modules/svg
modules/svg
60:83 (8%)
64:87 (8%)
view
14 x 2 modules/ui
modules/ui
109:124 (7%)
109:124 (2%)
view
14 x 2 modules/ui/intro
modules/ui/intro
225:244 (2%)
275:293 (2%)
view
14 x 2 modules/ui/intro
modules/ui/intro
261:278 (3%)
333:350 (3%)
view
14 x 2 modules/svg
modules/svg
59:82 (8%)
60:83 (8%)
view
13 x 2 modules/svg
modules/svg
269:285 (6%)
281:297 (6%)
view
13 x 2 modules/svg
modules/svg
25:51 (11%)
25:51 (11%)
view
13 x 2 modules/svg
modules/svg
21:39 (9%)
32:50 (5%)
view
13 x 2 modules/ui/settings
modules/ui/settings
47:69 (25%)
77:99 (17%)
view
13 x 2 modules/svg
modules/svg
206:222 (8%)
281:297 (6%)
view
13 x 2 modules/ui/tools
modules/ui/tools
18:36 (59%)
55:73 (26%)
view
13 x 2 modules/ui/intro
modules/ui/intro
855:869 (1%)
874:888 (1%)
view
13 x 2 modules/ui
modules/ui
348:364 (4%)
411:427 (4%)
view
13 x 2 modules/ui
modules/ui
35:50 (19%)
33:48 (15%)
view
Duplicated Units
The list of top 26 duplicated units.
See data for all 26 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 modules/svg
modules/svg
57:79 
57:79 
view
14 x 2 modules/ui/intro
modules/ui/intro
58:73 
57:72 
view
12 x 3 modules/svg
modules/svg
modules/svg
81:95 
85:99 
80:94 
view
11 x 2 modules/validations
modules/validations
161:175 
80:94 
view
10 x 3 modules/ui
modules/ui
modules/ui
313:324 
391:402 
442:453 
view
10 x 8 modules/operations
modules/operations
modules/operations
modules/operations
modules/operations
modules/operations
modules/operations
modules/operations
93:104 
100:111 
42:53 
117:128 
60:71 
102:113 
53:64 
42:53 
view
9 x 2 modules/svg
modules/svg
48:59 
59:70 
view
9 x 3 modules/svg
modules/svg
modules/svg
66:77 
70:81 
65:76 
view
9 x 3 modules/svg
modules/svg
modules/svg
50:62 
45:57 
35:47 
view
9 x 2 modules/behavior
modules/modes
39:49 
104:114 
view
9 x 2 modules/behavior
modules/modes
52:62 
117:127 
view
9 x 3 modules/modes
modules/modes
modules/modes
121:131 
106:116 
117:127 
view
8 x 2 modules/modes
modules/modes
89:101 
118:130 
view
8 x 2 modules/services
modules/services
160:171 
260:271 
view
7 x 2 modules/svg
modules/svg
21:29 
21:29 
view
7 x 2 modules/ui/intro
modules/ui/intro
775:783 
488:496 
view
7 x 2 modules/services
modules/services
38:46 
33:41 
view
6 x 3 modules/svg
modules/svg
modules/svg
65:73 
62:70 
50:58 
view
6 x 2 modules/svg
modules/svg
245:252 
252:259 
view
6 x 2 modules/ui
modules/ui
185:193 
174:182 
view
6 x 2 modules/renderer
modules/services
9:16 
451:458 
view
26 x 3 modules/operations
modules/operations
modules/operations
27:59 
46:77 
28:59 
view
6 x 9 modules/validations
modules/validations
modules/validations
modules/validations
modules/validations
modules/validations
modules/validations
modules/validations
modules/validations
127:134 
119:126 
25:32 
128:135 
285:292 
77:84 
87:94 
82:89 
41:48 
view
6 x 2 modules/services
modules/services
32:39 
57:64 
view
6 x 2 modules/services
modules/services
529:536 
648:655 
view
8 x 5 modules/ui/intro
modules/ui/intro
modules/ui/intro
modules/ui/intro
modules/ui/intro
1037:1046 
758:767 
531:540 
471:480 
477:486 
view