Linux / Arch / Riscv
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:
    • 16,540 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,506 duplicated lines
  • 136 duplicates
system9% (1,506 lines)
Duplication per Extension
c6% (602 lines)
S14% (466 lines)
h12% (438 lines)
Duplication per Component (primary)
kernel9% (610 lines)
include14% (438 lines)
kvm12% (316 lines)
net4% (118 lines)
lib2% (12 lines)
mm<1% (12 lines)
boot0% (0 lines)
errata0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 136 duplicates...
Size#FoldersFilesLinesCode
36 x 2 kvm
kvm
78:115 (30%)
124:161 (30%)
view
31 x 2 include/asm
include/uapi/asm
90:120 (20%)
21:51 (59%)
view
31 x 2 include/asm
include/uapi/asm
17:47 (35%)
21:51 (59%)
view
31 x 2 include/asm
include/asm
90:120 (20%)
17:47 (35%)
view
30 x 2 kernel
kernel/probes
71:100 (16%)
15:44 (36%)
view
29 x 2 kernel
kernel
46:74 (5%)
440:468 (5%)
view
29 x 2 kernel
kernel
304:332 (5%)
109:137 (16%)
view
29 x 2 kernel
kernel
112:143 (15%)
176:207 (15%)
view
29 x 2 kernel
kernel/probes
304:332 (5%)
47:75 (34%)
view
29 x 2 kernel
kernel/probes
109:137 (16%)
47:75 (34%)
view
27 x 2 kernel
kernel/probes
442:468 (5%)
17:43 (32%)
view
27 x 2 kernel
kernel
442:468 (5%)
73:99 (15%)
view
27 x 2 kernel
kernel
48:74 (5%)
73:99 (15%)
view
27 x 2 kernel
kernel/probes
48:74 (5%)
17:43 (32%)
view
17 x 2 include/asm
include/asm
187:205 (5%)
279:297 (5%)
view
14 x 2 include/asm
include/asm
159:179 (4%)
208:223 (4%)
view
13 x 2 kernel
kernel
113:125 (4%)
127:139 (4%)
view
13 x 2 kernel
kernel
71:83 (4%)
127:139 (4%)
view
13 x 2 kernel
kernel
71:83 (4%)
113:125 (4%)
view
13 x 2 kernel
kernel
71:83 (4%)
99:111 (4%)
view
13 x 2 kernel
kernel
99:111 (4%)
113:125 (4%)
view
13 x 2 kernel
kernel
71:83 (4%)
85:97 (4%)
view
13 x 2 kernel
kernel
99:111 (4%)
127:139 (4%)
view
13 x 2 include/asm
include/asm
191:205 (4%)
237:251 (4%)
view
13 x 2 kernel
kernel
85:97 (4%)
127:139 (4%)
view
13 x 2 kernel
kernel
85:97 (4%)
113:125 (4%)
view
13 x 2 kernel
kernel
85:97 (4%)
99:111 (4%)
view
13 x 2 include/asm
include/asm
283:297 (4%)
329:343 (4%)
view
13 x 2 kernel
kernel
57:69 (4%)
71:83 (4%)
view
13 x 2 include/asm
include/asm
207:221 (4%)
299:313 (4%)
view
13 x 2 include/asm
include/asm
191:205 (4%)
329:343 (4%)
view
13 x 2 kernel
kernel
57:69 (4%)
113:125 (4%)
view
13 x 2 kvm
kvm
197:221 (3%)
310:334 (3%)
view
13 x 2 kernel
kernel
37:49 (10%)
40:52 (10%)
view
13 x 2 kernel
kernel
57:69 (4%)
85:97 (4%)
view
13 x 2 include/asm
include/asm
237:251 (4%)
329:343 (4%)
view
13 x 2 kernel
kernel
57:69 (4%)
99:111 (4%)
view
13 x 2 kernel
kernel
57:69 (4%)
127:139 (4%)
view
13 x 2 include/asm
include/asm
237:251 (4%)
283:297 (4%)
view
12 x 2 kvm
kvm
234:247 (2%)
267:280 (2%)
view
12 x 2 kernel
kernel
89:100 (9%)
61:73 (9%)
view
12 x 2 include/asm
include/asm
29:42 (3%)
99:112 (3%)
view
12 x 2 kernel
kernel
1:14 (6%)
1:14 (10%)
view
12 x 2 kernel
kvm
104:129 (6%)
82:107 (3%)
view
12 x 2 kvm
kvm
302:315 (2%)
330:343 (2%)
view
12 x 2 include/asm
include/asm
159:177 (3%)
300:313 (3%)
view
11 x 2 include/asm
include/asm
30:42 (3%)
65:77 (3%)
view
11 x 2 include/asm
include/asm
180:190 (3%)
225:235 (3%)
view
11 x 2 include/asm
include/asm
176:186 (3%)
267:277 (3%)
view
11 x 2 include/asm
include/asm
65:77 (3%)
133:145 (3%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 include/asm
include/asm
17:36 
38:57 
view
14 x 2 include/asm
include/asm
84:100 
102:118 
view
12 x 2 include/asm
include/asm
54:67 
69:82 
view
6 x 2 kernel
kernel
24:30 
32:38 
view