aws / amazon-ecs-init
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
  • 24% duplication:
    • 3,480 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 860 duplicated lines
  • 9 duplicates
system24% (860 lines)
Duplication per Extension
spec71% (738 lines)
go5% (122 lines)
Duplication per Component (primary)
packaging/amazon-linux-ami65% (369 lines)
packaging/generic-rpm94% (369 lines)
ecs-init/exec36% (122 lines)
ecs-init0% (0 lines)
ecs-init/config0% (0 lines)
ecs-init/gpu0% (0 lines)
ecs-init/engine0% (0 lines)
ecs-init/version0% (0 lines)
ecs-init/cmd0% (0 lines)
ecs-init/volumes0% (0 lines)
ecs-init/backoff0% (0 lines)
ecs-init/docker0% (0 lines)
packaging/suse0% (0 lines)
scripts/changelog0% (0 lines)

Duplication Between Components (50+ lines)

G packaging/amazon-linux-ami packaging/amazon-linux-ami packaging/generic-rpm packaging/generic-rpm packaging/amazon-linux-ami--packaging/generic-rpm 738

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
311 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
280:713 (54%)
96:529 (79%)
view
32 x 2 ecs-init/exec/iptables
ecs-init/exec/sysctl
exec_mocks.go
exec_mocks.go
28:81 (100%)
28:81 (100%)
view
29 x 2 ecs-init/exec/iptables
ecs-init/exec/sysctl
cmd_mocks.go
cmd_mocks.go
27:76 (100%)
27:76 (100%)
view
13 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
1:13 (2%)
1:13 (3%)
view
10 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
37:47 (1%)
30:40 (2%)
view
10 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
176:188 (1%)
61:73 (2%)
view
10 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
162:174 (1%)
48:60 (2%)
view
9 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
23:32 (1%)
16:25 (2%)
view
6 x 2 packaging/amazon-linux-ami
packaging/generic-rpm
spec
ecs-init.spec
amazon-ecs-init.spec
203:208 (1%)
80:85 (1%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 ecs-init/exec/iptables
ecs-init/exec/sysctl
exec_mocks.go
exec_mocks.go
66:75 
66:75 
view
6 x 3 ecs-init/exec/iptables
ecs-init/exec/iptables
ecs-init/exec/sysctl
cmd_mocks.go
cmd_mocks.go
cmd_mocks.go
50:56 
65:71 
50:56 
view
6 x 2 ecs-init/exec/iptables
ecs-init/exec/sysctl
exec_mocks.go
exec_mocks.go
51:57 
51:57 
view
6 x 2 ecs-init/engine
ecs-init/engine
dependencies_mocks.go
dependencies_mocks.go
80:86 
95:101 
view