aws-samples / aws-modernization-workshop-sample
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
  • 34% duplication:
    • 2,825 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 984 duplicated lines
  • 92 duplicates
system34% (984 lines)
Duplication per Extension
yaml43% (900 lines)
toml65% (84 lines)
Duplication per Component (primary)
code-samples/cloudformation96% (215 lines)
code-samples/cloudformation/v194% (209 lines)
pipeline/bucket_sync81% (145 lines)
pipeline/webhosting45% (143 lines)
code-samples/cloudformation/master-stacks70% (117 lines)
hugo-docs-content70% (42 lines)
ROOT51% (42 lines)
code-samples/cloudformation/cloud969% (39 lines)
code-samples/cloudformation/iam56% (32 lines)
static/css0% (0 lines)
code-samples/codebuild0% (0 lines)
code-samples/cloudformation/vpc0% (0 lines)
code-samples/cloudformation/sample-web-app0% (0 lines)
code-samples/cloudformation/eks0% (0 lines)
code-samples/cloudformation/ee0% (0 lines)
content/70_Wild_Rydes/1_StaticWebHosting0% (0 lines)
content/70_Wild_Rydes/3_ServerlessBackend0% (0 lines)
layouts/partials0% (0 lines)

Duplication Between Components (50+ lines)

G code-samples/cloudformation/v1 code-samples/cloudformation/v1 code-samples/cloudformation code-samples/cloudformation code-samples/cloudformation/v1--code-samples/cloudformation 418 pipeline/bucket_sync pipeline/bucket_sync pipeline/webhosting pipeline/webhosting pipeline/bucket_sync--pipeline/webhosting 262 ROOT ROOT hugo-docs-content hugo-docs-content ROOT--hugo-docs-content 84 code-samples/cloudformation/cloud9 code-samples/cloudformation/cloud9 code-samples/cloudformation/iam code-samples/cloudformation/iam code-samples/cloudformation/cloud9--code-samples/cloudformation/iam 64

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 92 duplicates...
Size#FoldersFilesLinesCode
188 x 2 code-samples/cloudformation/v1
code-samples/cloudformation
modernization-vpc.yaml
vpc.yaml
1:188 (100%)
1:188 (100%)
view
42 x 2 ROOT
hugo-docs-content
config.toml
config.toml
10:57 (60%)
9:56 (70%)
view
33 x 2 pipeline/bucket_sync
pipeline/webhosting
pipeline.yaml
pipeline.yaml
24:57 (18%)
31:64 (16%)
view
33 x 2 pipeline/bucket_sync
pipeline/webhosting
pipeline.yaml
pipeline.yaml
76:109 (18%)
77:110 (16%)
view
32 x 2 code-samples/cloudformation/cloud9
code-samples/cloudformation/iam
cloud9.yaml
modernization-role.yaml
19:54 (57%)
6:41 (78%)
view
21 x 2 code-samples/cloudformation
code-samples/cloudformation/v1
cloud9.yaml
modernization-cloud9.yaml
1:21 (100%)
1:21 (100%)
view
16 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-cloud9-eks-QS-based.yaml
vpc-cloud9.yaml
1:20 (48%)
1:20 (94%)
view
15 x 2 pipeline/bucket_sync
pipeline/webhosting
pipeline.yaml
pipeline.yaml
132:147 (8%)
158:173 (7%)
view
14 x 2 pipeline/bucket_sync
pipeline/webhosting
pipeline.yaml
pipeline.yaml
166:180 (7%)
192:206 (6%)
view
13 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-cloud9-eks-QS-based.yaml
vpc-eks-QS-based.yaml
22:34 (39%)
20:32 (41%)
view
13 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-eks-QS-based-pipeline-user.yaml
vpc-eks-QS-based.yaml
20:32 (40%)
20:32 (41%)
view
13 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-cloud9-eks-QS-based.yaml
vpc-eks-QS-based-pipeline-user.yaml
22:34 (39%)
20:32 (40%)
view
12 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-eks-QS-based-pipeline-user.yaml
vpc-eks-region2.yaml
20:31 (37%)
19:30 (40%)
view
12 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-cloud9-eks-QS-based.yaml
vpc-eks-region2.yaml
22:33 (36%)
19:30 (40%)
view
12 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-eks-QS-based.yaml
vpc-eks-region2.yaml
20:31 (38%)
19:30 (40%)
view
11 x 2 pipeline/bucket_sync
pipeline/webhosting
pipeline.yaml
pipeline.yaml
154:164 (6%)
180:190 (5%)
view
9 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-cloud9.yaml
vpc-only.yaml
1:12 (52%)
1:12 (90%)
view
9 x 2 code-samples/cloudformation/master-stacks
code-samples/cloudformation/master-stacks
vpc-cloud9-eks-QS-based.yaml
vpc-only.yaml
1:12 (27%)
1:12 (90%)
view
9 x 2 code-samples/cloudformation/v1
code-samples/cloudformation
modernization-vpc.yaml
vpc.yaml
84:92 (4%)
118:126 (4%)
view
9 x 2 code-samples/cloudformation
code-samples/cloudformation
vpc.yaml
vpc.yaml
84:92 (4%)
118:126 (4%)
view