Linux / Arch / Csky
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:
    • 7,754 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 566 duplicated lines
  • 72 duplicates
system7% (566 lines)
Duplication per Extension
c5% (252 lines)
h12% (213 lines)
S5% (101 lines)
Duplication per Component (primary)
kernel4% (140 lines)
include12% (127 lines)
abiv27% (117 lines)
abiv112% (102 lines)
mm6% (52 lines)
lib13% (28 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 72 duplicates...
Size#FoldersFilesLinesCode
18 x 2 abiv2/inc/abi
abiv2/inc/abi
45:67 (8%)
115:137 (8%)
view
15 x 2 include/asm
include/asm
27:43 (9%)
45:61 (9%)
view
15 x 2 abiv2/inc/abi
abiv2/inc/abi
82:99 (7%)
143:160 (7%)
view
15 x 2 include/asm
include/asm
86:100 (9%)
163:177 (9%)
view
13 x 2 kernel
kernel
849:861 (1%)
863:875 (1%)
view
12 x 2 kernel
kernel
360:377 (3%)
395:412 (3%)
view
10 x 2 kernel
kernel
837:847 (1%)
866:875 (1%)
view
10 x 2 kernel
kernel
837:847 (1%)
852:861 (1%)
view
10 x 2 abiv2
abiv2
41:50 (10%)
47:56 (10%)
view
10 x 2 kernel
kernel
763:772 (1%)
837:847 (1%)
view
10 x 2 kernel
kernel
763:772 (1%)
852:861 (1%)
view
10 x 2 kernel
kernel
763:772 (1%)
866:875 (1%)
view
9 x 2 abiv1
abiv1
186:195 (2%)
328:337 (2%)
view
9 x 2 kernel
kernel
732:740 (1%)
849:857 (1%)
view
9 x 2 abiv1
abiv1
258:267 (2%)
328:337 (2%)
view
9 x 2 kernel
kernel
732:740 (1%)
863:871 (1%)
view
9 x 2 kernel
kernel
775:783 (1%)
863:871 (1%)
view
9 x 2 abiv1
abiv1
186:195 (2%)
258:267 (2%)
view
9 x 2 kernel
kernel
775:783 (1%)
849:857 (1%)
view
9 x 2 kernel
kernel
732:740 (1%)
775:783 (1%)
view
9 x 2 abiv1
abiv1
41:49 (4%)
73:81 (4%)
view
8 x 2 kernel
kernel
804:811 (<1%)
863:870 (<1%)
view
8 x 2 kernel
kernel
804:811 (<1%)
849:856 (<1%)
view
8 x 2 kernel
kernel
775:782 (<1%)
804:811 (<1%)
view
8 x 2 mm
mm
68:80 (7%)
108:120 (7%)
view
8 x 2 kernel
kernel
732:739 (<1%)
804:811 (<1%)
view
8 x 2 lib
lib
15:22 (4%)
86:93 (4%)
view
7 x 2 include/asm
include/asm
26:32 (12%)
56:62 (12%)
view
7 x 2 abiv1
abiv1
123:131 (3%)
182:190 (3%)
view
7 x 2 include/asm
kernel
11:19 (43%)
74:82 (<1%)
view
7 x 2 include/asm
kernel
11:19 (43%)
55:63 (<1%)
view
7 x 2 kernel
kernel
55:63 (<1%)
74:82 (<1%)
view
7 x 2 include/asm
include/asm
33:41 (4%)
69:77 (4%)
view
7 x 2 include/asm
include/asm
73:81 (4%)
150:158 (4%)
view
7 x 2 include/asm
include/asm
51:59 (4%)
69:77 (4%)
view
7 x 2 abiv1/inc/abi
abiv2/inc/abi
55:62 (5%)
44:51 (3%)
view
6 x 2 kernel
kernel
735:740 (<1%)
837:843 (<1%)
view
6 x 2 kernel
kernel
752:758 (<1%)
856:861 (<1%)
view
6 x 2 kernel
kernel
795:801 (<1%)
870:875 (<1%)
view
6 x 2 abiv1/inc/abi
abiv2/inc/abi
56:62 (4%)
115:121 (2%)
view
6 x 2 kernel
kernel
752:758 (<1%)
842:847 (<1%)
view
6 x 2 abiv1
abiv1
216:221 (1%)
289:294 (1%)
view
6 x 2 mm
mm
84:90 (5%)
157:163 (5%)
view
6 x 2 kernel/probes
kernel/probes
29:36 (2%)
58:65 (2%)
view
6 x 2 kernel
kernel
778:783 (<1%)
837:843 (<1%)
view
6 x 2 kernel
kernel
767:772 (<1%)
820:826 (<1%)
view
6 x 2 kernel
kernel
752:758 (<1%)
820:826 (<1%)
view
6 x 2 kernel
kernel
763:768 (<1%)
778:783 (<1%)
view
6 x 2 abiv1
abiv1
147:152 (1%)
289:294 (1%)
view
6 x 2 abiv2
abiv2
53:59 (6%)
57:63 (6%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 kernel
kernel
114:129 
138:153 
view
6 x 2 mm
mm
24:31 
79:86 
view
6 x 2 kernel
kernel
9:15 
17:23 
view