aws-samples / amazon-ecs-fullstack-app-terraform
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
  • 10% duplication:
    • 2,460 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 255 duplicated lines
  • 20 duplicates
system10% (255 lines)
Duplication per Extension
tf10% (199 lines)
vue14% (56 lines)
Duplication per Component (primary)
Infrastructure/Modules/IAM23% (93 lines)
Code/client/src13% (56 lines)
Infrastructure/Modules/ECS16% (42 lines)
Infrastructure8% (34 lines)
Infrastructure/Modules/ALB11% (18 lines)
Infrastructure/Modules/CodePipeline4% (6 lines)
Infrastructure/Modules/CodeBuild4% (6 lines)
Code/client0% (0 lines)
Code/client/public0% (0 lines)
Code/server/src0% (0 lines)
Infrastructure/Templates0% (0 lines)
Infrastructure/Modules/SecurityGroup0% (0 lines)
Infrastructure/Modules/SNS0% (0 lines)
Infrastructure/Modules/CodeDeploy0% (0 lines)
Infrastructure/Modules/S30% (0 lines)
Infrastructure/Modules/Networking0% (0 lines)
Infrastructure/Modules/Dynamodb0% (0 lines)
Infrastructure/Modules/ECR0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 20 duplicates...
Size#FoldersFilesLinesCode
19 x 2 Code/client/src/components
Code/client/src/components
Main.vue
Main.vue
16:41 (20%)
47:72 (20%)
view
16 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
12:27 (5%)
39:54 (5%)
view
13 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
21:34 (4%)
79:91 (4%)
view
10 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
285:294 (3%)
315:324 (3%)
view
9 x 2 Infrastructure/Modules/ECS/Autoscaling
Infrastructure/Modules/ECS/Autoscaling
main.tf
main.tf
72:82 (11%)
91:101 (11%)
view
9 x 2 Infrastructure/Modules/ALB
Infrastructure/Modules/ALB
main.tf
main.tf
26:35 (14%)
44:53 (14%)
view
9 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
11:19 (2%)
95:103 (2%)
view
9 x 2 Infrastructure/Modules/ECS/Autoscaling
Infrastructure/Modules/ECS/Autoscaling
main.tf
main.tf
26:36 (11%)
45:55 (11%)
view
9 x 2 Code/client/src/views
Code/client/src/views
About.vue
EasterEgg.vue
15:24 (60%)
14:23 (64%)
view
8 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
39:46 (2%)
96:103 (2%)
view
7 x 2 Infrastructure
Infrastructure
main.tf
main.tf
67:73 (2%)
80:86 (2%)
view
7 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
48:54 (2%)
79:85 (2%)
view
7 x 2 Infrastructure
Infrastructure
main.tf
main.tf
41:47 (2%)
54:60 (2%)
view
6 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
48:53 (1%)
105:110 (1%)
view
6 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
79:84 (1%)
105:110 (1%)
view
6 x 2 Infrastructure/Modules/CodeBuild
Infrastructure/Modules/ECS/TaskDefinition
variables.tf
variables.tf
38:44 (10%)
6:12 (16%)
view
6 x 2 Infrastructure/Modules/CodePipeline
Infrastructure
variables.tf
variables.tf
17:23 (11%)
22:28 (7%)
view
6 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
21:26 (1%)
105:110 (1%)
view
6 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
66:71 (1%)
95:100 (1%)
view
6 x 2 Infrastructure/Modules/IAM
Infrastructure/Modules/IAM
main.tf
main.tf
11:16 (1%)
66:71 (1%)
view