aws-samples / aws-ecs-on-outposts
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,422 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 246 duplicated lines
  • 72 duplicates
system10% (246 lines)
Duplication per Extension
tf10% (246 lines)
Duplication per Component (primary)
terraform/modules/alb-ecs14% (141 lines)
terraform/modules/vpc7% (78 lines)
terraform/modules/docker-ecr-codebuild16% (27 lines)
terraform0% (0 lines)
terraform/vars0% (0 lines)
terraform/modules/docker-ecr-codebuild/buildspec0% (0 lines)

Duplication Between Components (50+ lines)

G terraform/modules/alb-ecs terraform/modules/alb-ecs terraform/modules/docker-ecr-codebuild terraform/modules/docker-ecr-codebuild terraform/modules/alb-ecs--terraform/modules/docker-ecr-codebuild 57

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 72 duplicates...
Size#FoldersFilesLinesCode
8 x 2 terraform/modules/alb-ecs
terraform/modules/docker-ecr-codebuild
8-iam.tf
4-docker-codebuild.tf
17:24 (9%)
66:73 (7%)
view
8 x 2 terraform/modules/alb-ecs
terraform/modules/docker-ecr-codebuild
8-iam.tf
4-docker-codebuild.tf
44:51 (9%)
66:73 (7%)
view
8 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
8-iam.tf
8-iam.tf
17:24 (9%)
44:51 (9%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
75:82 (4%)
99:106 (4%)
view
7 x 2 terraform/modules/vpc
terraform/modules/vpc
4-ssm.tf
4-ssm.tf
182:189 (3%)
228:235 (3%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
75:82 (4%)
199:206 (4%)
view
7 x 2 terraform/modules/vpc
terraform/modules/vpc
4-ssm.tf
4-ssm.tf
136:143 (3%)
205:212 (3%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
126:133 (4%)
150:157 (4%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
175:182 (4%)
199:206 (4%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
8-iam.tf
8-iam.tf
26:32 (7%)
57:63 (7%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
51:58 (4%)
199:206 (4%)
view
7 x 2 terraform/modules/vpc
terraform/modules/vpc
4-ssm.tf
4-ssm.tf
159:166 (3%)
205:212 (3%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
99:106 (4%)
175:182 (4%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
51:58 (4%)
75:82 (4%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/docker-ecr-codebuild
8-iam.tf
4-docker-codebuild.tf
57:63 (7%)
75:81 (6%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
75:82 (4%)
126:133 (4%)
view
7 x 2 terraform/modules/vpc
terraform/modules/vpc
4-ssm.tf
4-ssm.tf
182:189 (3%)
205:212 (3%)
view
7 x 2 terraform/modules/vpc
terraform/modules/vpc
4-ssm.tf
4-ssm.tf
205:212 (3%)
228:235 (3%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
75:82 (4%)
175:182 (4%)
view
7 x 2 terraform/modules/alb-ecs
terraform/modules/alb-ecs
9-endpoints.tf
9-endpoints.tf
150:157 (4%)
199:206 (4%)
view