aws-samples / route-53-application-recovery-controller-codepipeline-with-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
  • 20% duplication:
    • 1,326 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 275 duplicated lines
  • 37 duplicates
system20% (275 lines)
Duplication per Extension
tf25% (275 lines)
Duplication per Component (primary)
3_ci_cd33% (135 lines)
2_app_stack/region-290% (27 lines)
1_database_stack53% (25 lines)
0_code_to_s360% (25 lines)
2_app_stack/region-185% (23 lines)
4_arc_terraform10% (22 lines)
modules/application_stack5% (18 lines)
nodejs-sample-app/views0% (0 lines)
nodejs-sample-app0% (0 lines)
nodejs-sample-app/static0% (0 lines)

Duplication Between Components (50+ lines)

G 0_code_to_s3 0_code_to_s3 3_ci_cd 3_ci_cd 0_code_to_s3--3_ci_cd 50 1_database_stack 1_database_stack 0_code_to_s3--1_database_stack 50 1_database_stack--3_ci_cd 50

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 37 duplicates...
Size#FoldersFilesLinesCode
27 x 2 3_ci_cd
3_ci_cd
codedeploy.tf
codedeploy.tf
39:72 (30%)
87:121 (30%)
view
15 x 2 2_app_stack/region-1
2_app_stack/region-2
main.tf
main.tf
5:23 (83%)
5:23 (83%)
view
13 x 2 0_code_to_s3
3_ci_cd
provider.tf
provider.tf
5:18 (100%)
5:18 (72%)
view
13 x 2 1_database_stack
3_ci_cd
provider.tf
provider.tf
5:18 (100%)
5:18 (72%)
view
13 x 2 0_code_to_s3
1_database_stack
provider.tf
provider.tf
5:18 (100%)
5:18 (100%)
view
12 x 2 2_app_stack/region-2
3_ci_cd
variables.tf
variables.tf
5:19 (100%)
5:19 (66%)
view
12 x 2 0_code_to_s3
2_app_stack/region-2
variables.tf
variables.tf
5:19 (100%)
5:19 (100%)
view
12 x 2 1_database_stack
2_app_stack/region-2
variables.tf
variables.tf
5:19 (100%)
5:19 (100%)
view
12 x 2 2_app_stack/region-2
4_arc_terraform
variables.tf
variables.tf
5:19 (100%)
1:15 (25%)
view
12 x 2 0_code_to_s3
3_ci_cd
variables.tf
variables.tf
5:19 (100%)
5:19 (66%)
view
12 x 2 3_ci_cd
4_arc_terraform
variables.tf
variables.tf
5:19 (66%)
1:15 (25%)
view
12 x 2 0_code_to_s3
4_arc_terraform
variables.tf
variables.tf
5:19 (100%)
1:15 (25%)
view
12 x 2 1_database_stack
4_arc_terraform
variables.tf
variables.tf
5:19 (100%)
1:15 (25%)
view
12 x 2 0_code_to_s3
1_database_stack
variables.tf
variables.tf
5:19 (100%)
5:19 (100%)
view
12 x 2 1_database_stack
3_ci_cd
variables.tf
variables.tf
5:19 (100%)
5:19 (66%)
view
10 x 2 3_ci_cd
4_arc_terraform
provider.tf
arc-readiness-checks.tf
5:15 (55%)
8:19 (14%)
view
10 x 2 3_ci_cd
modules/application_stack
provider.tf
provider.tf
5:15 (55%)
5:15 (76%)
view
10 x 2 0_code_to_s3
modules/application_stack
provider.tf
provider.tf
5:15 (76%)
5:15 (76%)
view
10 x 2 1_database_stack
4_arc_terraform
provider.tf
arc-readiness-checks.tf
5:15 (76%)
8:19 (14%)
view
10 x 2 4_arc_terraform
modules/application_stack
arc-readiness-checks.tf
provider.tf
8:19 (14%)
5:15 (76%)
view