golang / 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
  • 15% duplication:
    • 48,454 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,530 duplicated lines
  • 2,028 duplicates
system15% (7,530 lines)
Duplication per Extension
go15% (7,518 lines)
s28% (12 lines)
Duplication per Component (primary)
ipv671% (1,856 lines)
ipv464% (1,613 lines)
route52% (1,161 lines)
internal32% (976 lines)
idna67% (714 lines)
publicsuffix3% (419 lines)
html4% (323 lines)
dns9% (154 lines)
webdav2% (124 lines)
lif19% (76 lines)
nettest7% (40 lines)
trace3% (38 lines)
http2<1% (36 lines)
netutil0% (0 lines)
websocket0% (0 lines)
xsrftoken0% (0 lines)
dict0% (0 lines)
proxy0% (0 lines)
context0% (0 lines)
icmp0% (0 lines)
http0% (0 lines)
bpf0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G ipv4 ipv4 ipv6 ipv6 ipv4--ipv6 1249 lif lif route route lif--route 112

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 2,028 duplicates...
Size#FoldersFilesLinesCode
101 x 2 route
route
zsys_freebsd_amd64.go
zsys_freebsd_arm64.go
6:123 (100%)
6:123 (100%)
view
70 x 2 route
route
zsys_freebsd_386.go
zsys_freebsd_arm.go
6:85 (69%)
6:85 (69%)
view
63 x 2 route
route
zsys_freebsd_amd64.go
zsys_freebsd_arm.go
6:77 (62%)
6:77 (62%)
view
63 x 2 route
route
zsys_freebsd_386.go
zsys_freebsd_arm64.go
6:77 (62%)
6:77 (62%)
view
63 x 2 route
route
zsys_freebsd_arm.go
zsys_freebsd_arm64.go
6:77 (62%)
6:77 (62%)
view
63 x 2 route
route
zsys_freebsd_386.go
zsys_freebsd_amd64.go
6:77 (62%)
6:77 (62%)
view
61 x 2 idna
idna
idna10.0.0.go
idna9.0.0.go
540:634 (14%)
490:582 (15%)
view
61 x 2 idna
idna
idna10.0.0.go
idna9.0.0.go
638:705 (14%)
583:650 (15%)
view
49 x 2 ipv4
ipv4
zsys_linux_arm64.go
zsys_linux_riscv64.go
6:73 (100%)
9:76 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_loong64.go
zsys_linux_ppc64.go
9:76 (100%)
6:73 (100%)
view
49 x 2 ipv6
ipv6
zsys_linux_amd64.go
zsys_linux_arm64.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_mips64le.go
zsys_linux_ppc64le.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_arm64.go
zsys_linux_mips64.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_ppc64.go
zsys_linux_s390x.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_amd64.go
zsys_linux_riscv64.go
6:73 (100%)
9:76 (100%)
view
49 x 2 ipv6
ipv6
zsys_linux_mips64.go
zsys_linux_mips64le.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_amd64.go
zsys_linux_ppc64le.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_mips64le.go
zsys_linux_riscv64.go
6:73 (100%)
9:76 (100%)
view
49 x 2 ipv6
ipv6
zsys_linux_arm64.go
zsys_linux_s390x.go
6:73 (100%)
6:73 (100%)
view
49 x 2 ipv4
ipv4
zsys_linux_amd64.go
zsys_linux_s390x.go
6:73 (100%)
6:73 (100%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 38 unit duplicates...
Size#FoldersFilesLinesCode
47 x 2 ipv4
ipv4
control_unix.go
control_zos.go
19:66 
41:88 
view
28 x 2 ipv6
ipv4
gen.go
gen.go
41:69 
41:69 
view
27 x 2 ipv6
ipv4
gen.go
gen.go
81:108 
81:108 
view
22 x 2 idna
idna
idna9.0.0.go
idna10.0.0.go
552:575 
602:625 
view
21 x 2 dns/dnsmessage
dns/dnsmessage
message.go
message.go
1339:1360 
1363:1384 
view
20 x 2 idna
idna
idna9.0.0.go
idna10.0.0.go
245:265 
245:265 
view
20 x 2 ipv6
ipv4
batch.go
batch.go
96:116 
108:128 
view
17 x 2 ipv6
ipv4
sys_ssmreq.go
sys_ssmreq.go
19:36 
17:34 
view
17 x 2 ipv6
ipv4
sys_ssmreq.go
sys_ssmreq.go
38:55 
36:53 
view
16 x 2 ipv6
ipv4
helper.go
helper.go
42:58 
61:77 
view
14 x 2 idna
idna
idna9.0.0.go
idna10.0.0.go
86:102 
87:103 
view
14 x 2 ipv6
ipv4
payload_cmsg.go
payload_cmsg.go
57:71 
71:85 
view
13 x 2 ipv6
ipv4
dgramopt.go
dgramopt.go
67:80 
67:80 
view
12 x 2 idna
idna
idna9.0.0.go
idna10.0.0.go
528:540 
578:590 
view
10 x 2 idna
idna
idna9.0.0.go
idna10.0.0.go
515:525 
565:575 
view
9 x 2 ipv6
ipv4
dgramopt.go
dgramopt.go
41:50 
41:50 
view
9 x 2 ipv6
ipv4
dgramopt.go
dgramopt.go
54:63 
54:63 
view
9 x 2 ipv6
ipv4
dgramopt.go
dgramopt.go
84:93 
84:93 
view
9 x 2 ipv6
ipv4
dgramopt.go
dgramopt.go
266:275 
228:237 
view
9 x 2 ipv6
ipv4
dgramopt.go
dgramopt.go
278:287 
241:250 
view