aws-solutions / multi-region-infrastructure-deployment
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
  • 38% duplication:
    • 1,906 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 729 duplicated lines
  • 121 duplicates
system38% (729 lines)
Duplication per Extension
yaml38% (439 lines)
js30% (148 lines)
ts53% (142 lines)
Duplication per Component (primary)
deployment38% (439 lines)
source/uuid-generator/source71% (71 lines)
source/secondary-bucket-creator/source42% (71 lines)
source/changeset-validator46% (55 lines)
source/stage-artifact-creator41% (49 lines)
source/drift-detection36% (27 lines)
source/stage-artifact-putter41% (17 lines)
source/rollback-change0% (0 lines)
source/custom-resource0% (0 lines)

Duplication Between Components (50+ lines)

G source/secondary-bucket-creator/source source/secondary-bucket-creator/source source/uuid-generator/source source/uuid-generator/source source/secondary-bucket-creator/source--source/uuid-generator/source 142 source/changeset-validator source/changeset-validator source/stage-artifact-creator source/stage-artifact-creator source/changeset-validator--source/stage-artifact-creator 72

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 121 duplicates...
Size#FoldersFilesLinesCode
48 x 2 source/secondary-bucket-creator/source
source/uuid-generator/source
index.ts
index.ts
139:207 (32%)
50:118 (57%)
view
23 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
1037:1059 (1%)
1107:1129 (1%)
view
23 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
975:997 (1%)
1037:1059 (1%)
view
23 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
975:997 (1%)
1107:1129 (1%)
view
18 x 2 source/changeset-validator
source/stage-artifact-creator
index.js
index.js
69:97 (20%)
119:146 (15%)
view
17 x 2 source/drift-detection
source/stage-artifact-putter
index.js
index.js
52:72 (23%)
35:55 (41%)
view
15 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
896:910 (1%)
970:984 (1%)
view
15 x 2 source/secondary-bucket-creator/source
source/uuid-generator/source
custom-resource-handler.ts
custom-resource-handler.ts
7:38 (78%)
7:38 (93%)
view
12 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
912:923 (1%)
986:997 (1%)
view
12 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
785:796 (1%)
846:857 (1%)
view
12 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
912:923 (1%)
1048:1059 (1%)
view
12 x 2 source/changeset-validator
source/changeset-validator
index.js
index.js
44:58 (13%)
54:69 (13%)
view
12 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
912:923 (1%)
1118:1129 (1%)
view
11 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
714:724 (<1%)
1193:1203 (<1%)
view
11 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
620:630 (<1%)
665:675 (<1%)
view
11 x 2 source/stage-artifact-creator
source/stage-artifact-creator
index.js
index.js
43:59 (9%)
83:98 (9%)
view
10 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
901:910 (<1%)
1107:1116 (<1%)
view
10 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
848:857 (<1%)
1120:1129 (<1%)
view
10 x 2 deployment
deployment
multi-region-infrastructure-deploymen...
multi-region-infrastructure-deploymen...
774:783 (<1%)
835:844 (<1%)
view
10 x 2 source/drift-detection
source/drift-detection
index.js
index.js
24:36 (13%)
60:72 (13%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
19 x 2 source/uuid-generator/source
source/secondary-bucket-creator/source
index.ts
index.ts
79:102 
168:191 
view
14 x 2 source/uuid-generator/source
source/secondary-bucket-creator/source
index.ts
index.ts
62:77 
151:166 
view