Linux / Net
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:
    • 739,220 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 56,160 duplicated lines
  • 8,243 duplicates
system7% (56,160 lines)
Duplication per Extension
c7% (54,759 lines)
h4% (1,401 lines)
Duplication per Component (primary)
netfilter10% (8,161 lines)
ipv410% (6,618 lines)
ipv613% (6,202 lines)
core7% (3,866 lines)
bluetooth7% (3,222 lines)
sctp12% (2,873 lines)
mac802115% (2,426 lines)
sched5% (2,208 lines)
wireless6% (2,028 lines)
bridge6% (1,527 lines)
batman-adv7% (1,221 lines)
sunrpc4% (1,103 lines)
nfc8% (1,038 lines)
llc13% (1,020 lines)
xfrm8% (1,014 lines)
tipc4% (685 lines)
ax2516% (615 lines)
ethtool7% (587 lines)
openvswitch5% (563 lines)
smc4% (514 lines)
vmw_vsock9% (506 lines)
l2tp11% (501 lines)
ieee8021548% (480 lines)
rose15% (456 lines)
netlabel11% (427 lines)
dccp5% (413 lines)
ceph2% (373 lines)
mptcp4% (357 lines)
dsa5% (327 lines)
9p7% (323 lines)
can4% (318 lines)
ncsi7% (287 lines)
x259% (277 lines)
netrom11% (270 lines)
atm3% (256 lines)
decnet3% (235 lines)
key7% (207 lines)
rxrpc2% (200 lines)
lapb17% (192 lines)
80210% (162 lines)
dcb11% (160 lines)
rds1% (154 lines)
iucv5% (153 lines)
mpls6% (149 lines)
packet4% (135 lines)
mac8021545% (132 lines)
appletalk5% (113 lines)
kcm7% (107 lines)
ROOT4% (105 lines)
qrtr6% (103 lines)
tls2% (99 lines)
hsr4% (96 lines)
caif2% (95 lines)
unix3% (93 lines)
mctp5% (90 lines)
6lowpan4% (64 lines)
phonet2% (58 lines)
netlink1% (54 lines)
switchdev9% (44 lines)
xdp2% (44 lines)
rfkill1% (18 lines)
8021q<1% (18 lines)
l3mdev7% (12 lines)
ethernet2% (6 lines)
strparser0% (0 lines)
nsh0% (0 lines)
dns_resolver0% (0 lines)
bpfilter0% (0 lines)
psample0% (0 lines)
bpf0% (0 lines)
ife0% (0 lines)

Duplication Between Components (50+ lines)

G ipv4 ipv4 ipv6 ipv6 ipv4--ipv6 8113 netfilter netfilter ipv4--netfilter 313 mptcp mptcp ipv4--mptcp 253 l2tp l2tp ipv4--l2tp 129 xfrm xfrm ipv4--xfrm 104 mpls mpls ipv4--mpls 157 unix unix ipv4--unix 111 sctp sctp ipv4--sctp 63 ipv6--netfilter 114 ipv6--l2tp 207 ipv6--xfrm 192 ipv6--mpls 186 netrom netrom rose rose netrom--rose 326 x25 x25 netrom--x25 66 rose--x25 92 ax25 ax25 ax25--netrom 221 ax25--rose 181 dccp dccp dccp--ipv4 180 dccp--ipv6 161 ieee802154 ieee802154 ieee802154--ipv4 128 wireless wireless ieee802154--wireless 132 bridge bridge bridge--ipv4 52 bridge--netfilter 130 batman-adv batman-adv batman-adv--ieee802154 66 batman-adv--wireless 78 core core batman-adv--core 114 nfc nfc batman-adv--nfc 78 core--ipv4 106 core--ipv6 72 core--wireless 72 core--nfc 84 openvswitch openvswitch sched sched openvswitch--sched 110 mac80211 mac80211 mac80211--wireless 108 mac802154 mac802154 mac80211--mac802154 57 bluetooth bluetooth bluetooth--ipv4 78 bluetooth--dccp 78 bluetooth--ieee802154 78 bluetooth--nfc 104 appletalk appletalk appletalk--core 75 decnet decnet decnet--ipv4 58 decnet--ipv6 56 key key key--xfrm 52

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 8,243 duplicates...
Size#FoldersFilesLinesCode
81 x 2 ipv4
ipv6
1006:1112 (10%)
1048:1154 (9%)
view
63 x 2 ipv4
ipv6
1139:1221 (6%)
1685:1767 (5%)
view
56 x 2 ipv6/netfilter
ipv6/netfilter
31:112 (26%)
125:200 (26%)
view
49 x 2 netfilter/ipset
netfilter/ipset
129:195 (19%)
136:202 (18%)
view
48 x 2 ipv4
ipv6
454:525 (5%)
489:560 (5%)
view
47 x 2 ipv4
ipv6
572:635 (5%)
607:670 (5%)
view
46 x 2 ipv4/netfilter
ipv6/netfilter
390:458 (3%)
408:476 (3%)
view
44 x 2 ipv4
ipv4
1585:1635 (2%)
1660:1710 (2%)
view
44 x 2 ipv6
ipv6
1854:1904 (2%)
1929:1979 (2%)
view
39 x 2 ipv4/netfilter
ipv6/netfilter
1720:1778 (2%)
1729:1784 (2%)
view
37 x 2 ipv4/netfilter
ipv6/netfilter
1114:1162 (2%)
1131:1179 (2%)
view
36 x 2 core
core
2870:2918 (1%)
2998:3046 (1%)
view
35 x 2 netrom
rose
766:816 (3%)
876:927 (3%)
view
33 x 2 mac80211
wireless
28:60 (17%)
173:205 (6%)
view
33 x 2 netfilter/ipset
netfilter/ipset
522:555 (8%)
578:611 (7%)
view
32 x 2 ipv6
ipv6
188:223 (<1%)
248:283 (<1%)
view
32 x 2 ipv4
ipv6
80:131 (3%)
97:148 (3%)
view
32 x 2 ipv4
ipv6
89:142 (38%)
85:138 (22%)
view
32 x 2 ipv4/netfilter
ipv6/netfilter
697:742 (2%)
714:759 (2%)
view
32 x 2 batman-adv
batman-adv
704:745 (4%)
1288:1329 (4%)
view
31 x 2 netfilter/ipset
netfilter/ipset
464:508 (8%)
418:462 (9%)
view
31 x 2 netfilter/ipset
netfilter/ipset
418:462 (9%)
520:564 (7%)
view
31 x 2 netfilter/ipset
netfilter/ipset
464:508 (8%)
520:564 (7%)
view
31 x 2 sunrpc
sunrpc
965:995 (4%)
998:1028 (4%)
view
30 x 2 ipv4/netfilter
ipv4/netfilter
344:385 (2%)
408:449 (2%)
view
30 x 2 ipv4/netfilter
ipv6/netfilter
344:385 (2%)
426:467 (2%)
view
30 x 2 ipv4
ipv6
1934:1975 (1%)
2376:2417 (<1%)
view
29 x 2 ipv4/netfilter
ipv6/netfilter
557:597 (2%)
714:754 (2%)
view
29 x 2 ipv4/netfilter
ipv6/netfilter
1498:1535 (2%)
1507:1544 (2%)
view
29 x 2 ipv4/netfilter
ipv6/netfilter
1257:1294 (2%)
1507:1544 (2%)
view
29 x 2 ipv4/netfilter
ipv6/netfilter
959:996 (2%)
1131:1168 (2%)
view
29 x 2 ax25
ax25
221:258 (9%)
376:413 (9%)
view
29 x 2 ipv4/netfilter
ipv4/netfilter
557:597 (2%)
697:737 (2%)
view
29 x 2 sctp
sctp
290:328 (3%)
679:717 (3%)
view
29 x 2 ipv4/netfilter
ipv4/netfilter
959:996 (2%)
1114:1151 (2%)
view
29 x 2 ipv4/netfilter
ipv4/netfilter
1257:1294 (2%)
1498:1535 (2%)
view
28 x 2 xfrm
xfrm
102:129 (5%)
2802:2829 (1%)
view
28 x 2 core
core
4889:4927 (<1%)
4966:5004 (<1%)
view
28 x 2 netrom
rose
720:762 (2%)
829:872 (2%)
view
28 x 2 netfilter/ipset
netfilter/ipset
298:337 (11%)
313:352 (10%)
view
27 x 2 ipv4/netfilter
ipv6/netfilter
1411:1444 (2%)
1426:1459 (2%)
view
26 x 2 core
core
9404:9429 (<1%)
9445:9470 (<1%)
view
26 x 2 netfilter/ipvs
netfilter/ipvs
55:104 (5%)
45:92 (8%)
view
26 x 2 sctp
sctp
4193:4230 (<1%)
4260:4297 (<1%)
view
26 x 2 l2tp
l2tp
122:165 (6%)
135:178 (5%)
view
26 x 2 netfilter
netfilter
748:778 (<1%)
2694:2724 (<1%)
view
26 x 2 ipv4
ipv6
198:242 (3%)
215:259 (3%)
view
25 x 2 ipv4
ipv6
265:301 (3%)
301:337 (3%)
view
25 x 2 xfrm
xfrm
214:239 (1%)
259:284 (1%)
view
25 x 2 netfilter
netfilter
568:596 (<1%)
744:772 (<1%)
view
Duplicated Units
The list of top 50 duplicated units.
See data for all 60 unit duplicates...
Size#FoldersFilesLinesCode
75 x 2 ipv4
ipv6
1045:1136 
1087:1178 
view
24 x 3 ipv4
ipv6
ipv6
452:483 
1991:2022 
1546:1577 
view
24 x 2 ipv4
ipv6
1239:1270 
1931:1962 
view
23 x 2 ipv4
ipv6
1014:1043 
1056:1085 
view
20 x 2 llc
llc
585:607 
621:643 
view
20 x 2 llc
llc
718:740 
742:764 
view
19 x 2 bluetooth
bluetooth
474:511 
861:897 
view
19 x 2 sctp
sctp
2323:2362 
2639:2678 
view
15 x 2 ipv4/netfilter
ipv6/netfilter
86:103 
109:127 
view
14 x 2 netfilter
netfilter
1135:1150 
1152:1167 
view
14 x 2 netfilter
netfilter
46:64 
44:62 
view
14 x 2 ipv4
ipv6
98:118 
115:135 
view
14 x 2 bluetooth
bluetooth
1944:1962 
704:722 
view
12 x 2 netfilter
netfilter
19:32 
50:63 
view
12 x 2 netfilter
netfilter
37:52 
853:868 
view
12 x 2 bluetooth
bluetooth
2396:2412 
1787:1803 
view
11 x 2 sctp
sctp
4807:4819 
4870:4882 
view
10 x 2 ieee802154
ieee802154
343:355 
752:764 
view
10 x 2 atm
atm
71:81 
83:93 
view
10 x 4 sched
sched
sched
sched
522:532 
580:590 
658:668 
1254:1264 
view
10 x 2 netfilter
netfilter
31:44 
29:42 
view
10 x 2 xfrm
xfrm
2819:2830 
2833:2844 
view
10 x 2 bluetooth
bluetooth
513:534 
838:859 
view
10 x 2 mac80211
mac80211
382:392 
620:630 
view
9 x 2 ipv4
ipv6
1637:1648 
4919:4930 
view
9 x 2 ipv4
ipv6
668:679 
332:343 
view
9 x 2 sctp
sctp
1728:1740 
1783:1795 
view
8 x 3 ieee802154
mctp
phonet
80:89 
24:34 
28:37 
view
8 x 2 core
mptcp
3112:3121 
1584:1593 
view
8 x 3 vmw_vsock
vmw_vsock
vmw_vsock
366:375 
377:386 
633:642 
view
8 x 4 netfilter
netfilter
netfilter
netfilter
102:111 
132:141 
38:47 
266:275 
view
8 x 2 netfilter
netfilter
158:166 
739:747 
view
8 x 2 key
xfrm
3106:3115 
1999:2009 
view
8 x 2 rxrpc
rxrpc
50:59 
61:70 
view
8 x 2 nfc
nfc
635:645 
1393:1403 
view
8 x 2 mac80211
mac80211
395:403 
632:640 
view
7 x 2 mpls
netfilter
119:128 
221:230 
view
7 x 2 core
sctp
183:190 
1558:1565 
view
7 x 2 decnet
decnet
825:835 
837:847 
view
7 x 2 ipv4
ipv6
211:218 
198:205 
view
7 x 2 ipv4
ipv6
223:236 
240:253 
view
7 x 2 ipv4
ipv6
285:293 
321:329 
view
7 x 2 ipv4
ipv6
545:553 
79:87 
view
7 x 2 ipv4
ipv6
540:549 
738:747 
view
7 x 2 ipv4
ipv6
102:110 
100:108 
view
7 x 2 bluetooth
bluetooth
2182:2191 
2253:2262 
view
7 x 2 bluetooth
bluetooth
434:443 
1853:1862 
view
6 x 2 netfilter
netfilter
61:69 
34:42 
view
6 x 2 netfilter
netfilter
2055:2063 
1318:1326 
view
6 x 2 netfilter
netfilter
224:231 
7211:7218 
view