Linux / Scripts
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
  • 6% duplication:
    • 54,918 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,385 duplicated lines
  • 384 duplicates
system6% (3,385 lines)
Duplication per Extension
cocci19% (1,308 lines)
c4% (1,186 lines)
pl3% (444 lines)
l9% (95 lines)
h2% (94 lines)
py3% (82 lines)
cc5% (76 lines)
y3% (52 lines)
glade10% (48 lines)
Duplication per Component (primary)
coccinelle19% (1,308 lines)
kconfig7% (1,028 lines)
ROOT3% (593 lines)
dtc1% (160 lines)
genksyms8% (137 lines)
gcc-plugins6% (102 lines)
mod<1% (31 lines)
gdb1% (26 lines)
tracing0% (0 lines)
basic0% (0 lines)
clang-tools0% (0 lines)
selinux0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 384 duplicates...
Size#FoldersFilesLinesCode
34 x 2 coccinelle/null
coccinelle/null
53:87 (13%)
114:148 (13%)
view
31 x 2 coccinelle/null
coccinelle/null
53:84 (12%)
174:205 (12%)
view
31 x 2 coccinelle/null
coccinelle/null
114:145 (12%)
174:205 (12%)
view
26 x 2 coccinelle/null
coccinelle/null
182:208 (10%)
255:281 (10%)
view
25 x 2 kconfig
kconfig
1104:1128 (2%)
1286:1310 (2%)
view
25 x 2 kconfig
kconfig
433:458 (2%)
497:522 (2%)
view
23 x 2 coccinelle/null
coccinelle/null
61:84 (9%)
255:278 (9%)
view
23 x 2 coccinelle/null
coccinelle/null
122:145 (9%)
255:278 (9%)
view
22 x 2 ROOT
ROOT
520:541 (4%)
573:594 (4%)
view
20 x 2 coccinelle/iterators
coccinelle/iterators
29:49 (23%)
26:46 (6%)
view
19 x 2 ROOT
ROOT
1455:1479 (<1%)
1464:1488 (<1%)
view
18 x 2 coccinelle/misc
coccinelle/misc
21:39 (23%)
50:68 (23%)
view
17 x 2 kconfig
kconfig
233:249 (1%)
283:299 (1%)
view
17 x 2 kconfig
kconfig
616:635 (1%)
681:700 (1%)
view
17 x 2 coccinelle/locks
coccinelle/locks
21:38 (20%)
24:41 (19%)
view
17 x 2 kconfig
kconfig
849:872 (2%)
1337:1360 (1%)
view
17 x 2 kconfig/lxdialog
kconfig/lxdialog
49:72 (7%)
38:61 (26%)
view
16 x 2 ROOT
ROOT
223:241 (<1%)
191:209 (<1%)
view
16 x 2 kconfig/lxdialog
kconfig/lxdialog
130:150 (7%)
41:61 (25%)
view
16 x 2 ROOT
ROOT
145:167 (1%)
911:933 (1%)
view
16 x 2 kconfig/lxdialog
kconfig/lxdialog
130:150 (7%)
52:72 (7%)
view
15 x 2 kconfig
kconfig
520:539 (1%)
786:805 (1%)
view
15 x 2 kconfig
kconfig
263:277 (4%)
297:311 (4%)
view
15 x 2 coccinelle/api
coccinelle/api
23:38 (13%)
66:81 (13%)
view
14 x 2 coccinelle/api
coccinelle/api
35:48 (14%)
58:71 (14%)
view
14 x 2 coccinelle/api
coccinelle/api
13:28 (15%)
66:81 (15%)
view
13 x 2 coccinelle/api
coccinelle/null
3:17 (14%)
3:17 (32%)
view
13 x 2 kconfig
kconfig
807:819 (1%)
862:874 (1%)
view
13 x 2 coccinelle/iterators
coccinelle/iterators
84:97 (4%)
117:130 (4%)
view
13 x 2 kconfig/lxdialog
kconfig/lxdialog
55:70 (6%)
105:120 (4%)
view
12 x 2 coccinelle/api
coccinelle/null
3:15 (22%)
3:15 (30%)
view
12 x 2 coccinelle/api
coccinelle/api
3:15 (13%)
4:16 (12%)
view
12 x 2 coccinelle/free
coccinelle/free
5:17 (19%)
5:17 (19%)
view
12 x 2 coccinelle/free
coccinelle/free
32:43 (19%)
32:43 (19%)
view
12 x 2 kconfig
kconfig
102:113 (3%)
108:119 (3%)
view
12 x 2 coccinelle/api
coccinelle/api
3:15 (22%)
4:16 (12%)
view
12 x 2 ROOT
ROOT
286:297 (4%)
306:317 (4%)
view
12 x 2 kconfig/lxdialog
kconfig/lxdialog
130:144 (5%)
193:207 (4%)
view
12 x 2 coccinelle/api
coccinelle/api
3:15 (13%)
3:15 (22%)
view
12 x 2 coccinelle/api
coccinelle/api
13:26 (13%)
39:52 (13%)
view
12 x 2 coccinelle/api
coccinelle/api
39:52 (13%)
66:79 (13%)
view
12 x 2 coccinelle/api
coccinelle/null
4:16 (12%)
3:15 (30%)
view
12 x 2 ROOT
ROOT
1532:1546 (<1%)
1558:1572 (<1%)
view
12 x 2 kconfig/lxdialog
kconfig/lxdialog
52:66 (5%)
193:207 (4%)
view
12 x 2 kconfig/lxdialog
kconfig/lxdialog
193:207 (4%)
41:55 (19%)
view
11 x 2 coccinelle/null
coccinelle/null
29:40 (4%)
225:236 (4%)
view
11 x 2 coccinelle/free
coccinelle/null
98:108 (9%)
195:205 (4%)
view
11 x 2 coccinelle/free
coccinelle/null
98:108 (9%)
135:145 (4%)
view
11 x 2 coccinelle/iterators
coccinelle/null
10:22 (12%)
5:17 (27%)
view
11 x 2 coccinelle/api
coccinelle/iterators
5:17 (12%)
10:22 (12%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
13 x 2 kconfig
kconfig
1848:1862 
1426:1440 
view
11 x 2 dtc/libfdt
dtc
161:173 
77:89 
view
8 x 2 kconfig/lxdialog
kconfig/lxdialog
16:26 
88:98 
view
8 x 2 ROOT
ROOT
1457:1467 
1466:1476 
view
8 x 2 ROOT
ROOT
1469:1479 
1478:1488 
view
7 x 2 kconfig
kconfig
463:472 
474:483 
view
7 x 2 dtc/libfdt
dtc
141:149 
67:75 
view
6 x 2 dtc
dtc
282:289 
277:284 
view