Linux / Arch / X86
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
  • 9% duplication:
    • 241,944 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 23,277 duplicated lines
  • 3,533 duplicates
system9% (23,277 lines)
Duplication per Extension
S26% (10,710 lines)
c5% (8,748 lines)
h8% (2,869 lines)
pl28% (950 lines)
Duplication per Component (primary)
crypto32% (10,978 lines)
events11% (2,810 lines)
include11% (2,488 lines)
kvm2% (1,336 lines)
kernel2% (1,307 lines)
math-emu15% (1,274 lines)
net21% (629 lines)
um20% (584 lines)
lib8% (443 lines)
entry7% (344 lines)
boot4% (270 lines)
platform4% (217 lines)
pci3% (152 lines)
mm1% (102 lines)
tools4% (68 lines)
xen1% (60 lines)
power8% (57 lines)
hyperv4% (54 lines)
realmode6% (52 lines)
ia3211% (52 lines)
video0% (0 lines)
purgatory0% (0 lines)

Duplication Between Components (50+ lines)

G lib lib um um lib--um 341 include include include--um 118 kvm kvm include--kvm 110 entry entry entry--um 109 boot boot boot--lib 84 kernel kernel boot--kernel 58 ia32 ia32 ia32--kernel 72 power power kernel--power 66

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 3,533 duplicates...
Size#FoldersFilesLinesCode
300 x 2 crypto
crypto
51:365 (46%)
51:365 (45%)
view
176 x 2 crypto
crypto
370:553 (27%)
370:553 (26%)
view
111 x 2 crypto
crypto
977:1095 (3%)
1185:1303 (3%)
view
110 x 2 crypto
crypto
591:705 (12%)
627:741 (11%)
view
79 x 2 crypto
crypto
48:140 (16%)
49:140 (23%)
view
74 x 2 crypto
crypto
161:244 (5%)
296:379 (5%)
view
63 x 2 include/asm/uv
include/asm/uv
583:645 (2%)
650:712 (2%)
view
60 x 2 include/asm/uv
include/asm/uv
785:844 (2%)
849:908 (2%)
view
60 x 2 crypto
crypto
1136:1206 (2%)
2086:2157 (2%)
view
58 x 2 lib
um
182:241 (14%)
149:208 (29%)
view
57 x 2 crypto
crypto
71:142 (11%)
86:156 (13%)
view
56 x 2 crypto
crypto
3:60 (20%)
3:60 (17%)
view
54 x 2 crypto
crypto
367:422 (13%)
369:424 (13%)
view
54 x 2 lib
um
70:123 (13%)
57:110 (27%)
view
53 x 2 include/asm/uv
include/asm/uv
1473:1525 (2%)
1530:1582 (2%)
view
53 x 2 crypto
crypto
672:731 (3%)
783:840 (3%)
view
50 x 2 crypto
crypto
3:55 (12%)
3:55 (12%)
view
50 x 2 crypto
crypto
97:155 (11%)
90:149 (10%)
view
47 x 2 events/intel
events/intel
1127:1184 (1%)
1310:1367 (1%)
view
46 x 2 crypto
crypto
3:48 (7%)
3:48 (11%)
view
46 x 2 crypto
crypto
3:48 (11%)
3:48 (7%)
view
45 x 2 crypto
crypto
3:47 (7%)
3:47 (9%)
view
44 x 2 crypto
crypto
1066:1120 (1%)
2016:2070 (1%)
view
42 x 2 crypto
crypto
3282:3335 (1%)
3647:3700 (1%)
view
42 x 2 crypto
crypto
1129:1176 (1%)
1341:1388 (1%)
view
41 x 2 events/intel
events/intel
1802:1842 (<1%)
1918:1958 (<1%)
view
40 x 2 crypto
crypto
1258:1310 (1%)
2213:2265 (1%)
view
40 x 2 crypto
crypto
560:604 (6%)
560:604 (6%)
view
40 x 2 crypto
crypto
614:658 (6%)
614:658 (6%)
view
40 x 2 crypto
crypto
272:318 (4%)
330:376 (4%)
view
39 x 2 events/intel
events/intel
1201:1239 (<1%)
1384:1422 (<1%)
view
39 x 2 events/intel
events/intel
655:693 (<1%)
1039:1077 (<1%)
view
39 x 2 include/asm/uv
include/asm/uv
1331:1369 (1%)
1374:1412 (1%)
view
36 x 2 crypto
crypto
1490:1531 (1%)
2448:2488 (1%)
view
36 x 2 crypto
crypto
637:680 (1%)
1559:1602 (1%)
view
35 x 2 include/asm/uv
include/asm/uv
1921:1955 (1%)
1960:1994 (1%)
view
35 x 2 events/intel
events/intel
1855:1889 (<1%)
1971:2005 (<1%)
view
35 x 2 crypto
crypto
3:37 (7%)
3:37 (7%)
view
35 x 2 crypto
crypto
3:37 (7%)
3:37 (5%)
view
34 x 2 crypto
crypto
447:481 (3%)
481:515 (3%)
view
34 x 2 include/asm/uv
include/asm/uv
1960:1993 (1%)
2015:2048 (1%)
view
34 x 2 include/asm/uv
include/asm/uv
1921:1954 (1%)
2015:2048 (1%)
view
33 x 2 crypto
crypto
9:41 (5%)
10:42 (5%)
view
33 x 2 crypto
crypto
31:63 (6%)
24:56 (5%)
view
33 x 2 crypto
crypto
9:41 (7%)
10:42 (8%)
view
33 x 2 crypto
crypto
9:41 (7%)
10:42 (8%)
view
33 x 2 crypto
crypto
9:41 (7%)
10:42 (5%)
view
33 x 2 crypto
crypto
621:653 (5%)
700:732 (4%)
view
33 x 2 crypto
crypto
567:599 (5%)
636:668 (4%)
view
33 x 2 crypto
crypto
9:41 (5%)
10:42 (8%)
view
Duplicated Units
The list of top 22 duplicated units.
See data for all 22 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 include/asm
include/asm
283:311 
324:352 
view
16 x 2 boot
include/asm
201:218 
43:60 
view
14 x 2 kernel/cpu
kernel/cpu
290:305 
33:48 
view
12 x 2 net
net
71:83 
1172:1184 
view
12 x 2 include/asm
include/asm
20:32 
34:46 
view
10 x 2 boot/compressed
lib
33:46 
62:75 
view
9 x 2 um
kernel/fpu
24:36 
184:197 
view
8 x 2 crypto
crypto
92:101 
83:92 
view
8 x 3 crypto
crypto
crypto
344:359 
1358:1374 
297:312 
view
8 x 2 crypto
crypto
152:161 
196:205 
view
8 x 2 include/asm
include/asm
23:31 
99:107 
view
8 x 2 kernel
kernel/cpu
953:962 
317:326 
view
7 x 2 include/asm
um/asm
169:176 
8:15 
view
7 x 2 include/asm
include/asm
48:55 
57:64 
view
7 x 3 platform/olpc
platform/olpc
platform/olpc
76:84 
86:94 
53:61 
view
6 x 2 crypto
crypto
103:111 
94:102 
view
6 x 2 crypto
crypto
271:278 
272:279 
view
6 x 2 boot
boot
176:182 
183:189 
view
6 x 2 boot
boot/compressed
28:36 
102:110 
view
6 x 2 entry/vsyscall
um
328:336 
42:50 
view
6 x 2 include/asm
include/asm
233:239 
261:267 
view
6 x 3 include/asm
include/asm
include/asm
200:206 
218:224 
212:218 
view