awslabs / fargatecli
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
  • 1% duplication:
    • 22,920 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 374 duplicated lines
  • 30 duplicates
system1% (374 lines)
Duplication per Extension
go1% (374 lines)
Duplication per Component (primary)
cmd7% (178 lines)
ecs11% (64 lines)
elbv23% (61 lines)
route531% (37 lines)
ecr22% (12 lines)
acm1% (11 lines)
ec2<1% (11 lines)
cloudwatchlogs0% (0 lines)
git0% (0 lines)
console0% (0 lines)
doc0% (0 lines)
iam0% (0 lines)
ROOT0% (0 lines)
docker0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 30 duplicates...
Size#FoldersFilesLinesCode
16 x 2 ecs
ecs
task_definition.go
task_definition.go
130:148 (8%)
205:223 (8%)
view
16 x 2 ecs
ecs
task_definition.go
task_definition.go
166:184 (8%)
205:223 (8%)
view
16 x 2 ecs
ecs
task_definition.go
task_definition.go
130:148 (8%)
166:184 (8%)
view
16 x 2 ecs
ecs
task_definition.go
task_definition.go
205:223 (8%)
254:272 (8%)
view
16 x 2 ecs
ecs
task_definition.go
task_definition.go
130:148 (8%)
254:272 (8%)
view
16 x 2 ecs
ecs
task_definition.go
task_definition.go
166:184 (8%)
254:272 (8%)
view
15 x 2 cmd
cmd
service_ps.go
task_ps.go
49:67 (38%)
52:70 (39%)
view
13 x 2 cmd
cmd
service_create.go
task_run.go
161:175 (4%)
71:85 (8%)
view
13 x 2 route53
route53
hosted_zone.go
hosted_zone.go
69:86 (15%)
100:117 (15%)
view
12 x 2 elbv2
elbv2
listener.go
listener.go
110:126 (6%)
277:293 (6%)
view
12 x 2 cmd
cmd
service_logs.go
task_logs.go
31:45 (24%)
31:45 (25%)
view
11 x 2 acm/mock/client
route53/mock/client
client.go
client.go
14:33 (20%)
14:33 (28%)
view
11 x 2 ec2/mock/client
route53/mock/client
client.go
client.go
13:32 (20%)
14:33 (28%)
view
11 x 2 ec2/mock/client
elbv2/mock/client
client.go
client.go
13:32 (20%)
14:33 (16%)
view
11 x 2 acm/mock/client
elbv2/mock/client
client.go
client.go
14:33 (20%)
14:33 (16%)
view
11 x 2 acm/mock/client
ec2/mock/client
client.go
client.go
14:33 (20%)
13:32 (20%)
view
11 x 2 elbv2/mock/client
route53/mock/client
client.go
client.go
14:33 (16%)
14:33 (28%)
view
10 x 2 cmd
cmd
service_create.go
task_run.go
316:329 (3%)
177:190 (6%)
view
7 x 2 cmd
cmd
service_info.go
task_ps.go
141:147 (6%)
60:66 (18%)
view
7 x 2 cmd
cmd
service_info.go
service_ps.go
141:147 (6%)
57:63 (17%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
10 x 2 ec2/mock/sdk
ec2/mock/sdk
ec2iface.go
ec2iface.go
1204:1214 
15728:15738 
view
9 x 4 acm/mock/sdk
elbv2/mock/sdk
ec2/mock/sdk
route53/mock/sdk
acmiface.go
elbv2iface.go
ec2iface.go
route53iface.go
403:412 
753:762 
7653:7662 
1953:1962 
view
9 x 4 acm/mock/sdk
elbv2/mock/sdk
ec2/mock/sdk
route53/mock/sdk
acmiface.go
elbv2iface.go
ec2iface.go
route53iface.go
736:745 
1852:1861 
23008:23017 
2952:2961 
view
8 x 2 cmd
cmd
task_run.go
service_create.go
30:40 
60:70 
view
6 x 3 acm/mock/sdk
elbv2/mock/sdk
route53/mock/sdk
paginators.go
paginators.go
paginators.go
14:22 
20:28 
14:22 
view
6 x 4 elbv2/mock/client
elbv2/mock/client
ec2/mock/client
route53/mock/client
client.go
client.go
client.go
client.go
37:43 
52:58 
95:101 
37:43 
view
6 x 2 ec2/mock/client
ec2/mock/client
client.go
client.go
50:56 
65:71 
view
6 x 2 ec2/mock/sdk
ec2/mock/sdk
ec2iface.go
ec2iface.go
1189:1195 
15713:15719 
view
6 x 2 ec2/mock/sdk
ec2/mock/sdk
ec2iface.go
ec2iface.go
1224:1230 
15748:15754 
view