kubernetes / utils
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
  • 4% duplication:
    • 2,836 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 118 duplicated lines
  • 7 duplicates
system4% (118 lines)
Duplication per Extension
go4% (118 lines)
Duplication per Component (primary)
mount6% (52 lines)
clock14% (38 lines)
net7% (28 lines)
field0% (0 lines)
strings0% (0 lines)
path0% (0 lines)
semantic0% (0 lines)
env0% (0 lines)
inotify0% (0 lines)
integer0% (0 lines)
temp0% (0 lines)
lru0% (0 lines)
pointer0% (0 lines)
diff0% (0 lines)
nsenter0% (0 lines)
exec0% (0 lines)
buffer0% (0 lines)
keymutex0% (0 lines)
trace0% (0 lines)
io0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
13 x 2 mount
mount
mount_helper_unix.go
mount_helper_windows.go
39:52 (16%)
44:58 (38%)
view
10 x 2 clock/testing
clock/testing
fake_clock.go
fake_clock.go
144:153 (5%)
160:169 (5%)
view
9 x 2 clock/testing
clock/testing
fake_clock.go
fake_clock.go
105:113 (4%)
122:131 (4%)
view
8 x 2 net/ebtables
net/ebtables
ebtables.go
ebtables.go
137:145 (6%)
156:165 (6%)
view
7 x 2 mount
mount
mount_helper_common.go
mount_helper_common.go
54:64 (15%)
76:84 (15%)
view
6 x 2 mount
mount
mount.go
mount.go
291:296 (3%)
303:308 (3%)
view
6 x 2 net
net
ipnet.go
ipnet.go
81:88 (6%)
180:187 (6%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 net
net
ipnet.go
ipnet.go
102:110 
201:209 
view
8 x 2 pointer
pointer
pointer.go
pointer.go
88:96 
118:126 
view
7 x 2 net
net
ipnet.go
ipnet.go
64:71 
163:170 
view
6 x 2 net
net
ipnet.go
ipnet.go
93:99 
192:198 
view