aws-samples / cfn101-workshop
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
  • 77% duplication:
    • 2,709 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,099 duplicated lines
  • 365 duplicates
system77% (2,099 lines)
Duplication per Extension
yaml84% (2,099 lines)
Duplication per Component (primary)
code/solutions92% (542 lines)
code/workspace90% (352 lines)
code/solutions/nested-stacks80% (301 lines)
code/solutions/layered-stacks94% (285 lines)
code/workspace/layered-stacks89% (279 lines)
code/workspace/nested-stacks88% (246 lines)
code/workspace/linting-and-testing69% (32 lines)
code/solutions/linting-and-testing65% (32 lines)
code/workspace/troubleshooting-provisioning-errors75% (15 lines)
code/solutions/troubleshooting-provisioning-errors41% (15 lines)
code/workspace/package-and-deploy0% (0 lines)
code/workspace/policy-as-code-with-guard0% (0 lines)
code/workspace/pseudo-parameters0% (0 lines)
code/solutions/policy-as-code-with-guard0% (0 lines)
code/solutions/pseudo-parameters0% (0 lines)
workshop/static/css0% (0 lines)
workshop0% (0 lines)
workshop/layouts/partials0% (0 lines)
infrastructure0% (0 lines)

Duplication Between Components (50+ lines)

G code/solutions/layered-stacks code/solutions/layered-stacks code/solutions/nested-stacks code/solutions/nested-stacks code/solutions/layered-stacks--code/solutions/nested-stacks 569 code/workspace code/workspace code/solutions/layered-stacks--code/workspace 195 code/workspace/layered-stacks code/workspace/layered-stacks code/solutions/layered-stacks--code/workspace/layered-stacks 392 code/workspace/nested-stacks code/workspace/nested-stacks code/solutions/layered-stacks--code/workspace/nested-stacks 334 code/solutions/nested-stacks--code/workspace 193 code/solutions/nested-stacks--code/workspace/layered-stacks 390 code/solutions/nested-stacks--code/workspace/nested-stacks 348 code/solutions code/solutions code/solutions--code/solutions/layered-stacks 569 code/solutions--code/solutions/nested-stacks 560 code/solutions--code/workspace 552 code/solutions--code/workspace/layered-stacks 334 code/solutions--code/workspace/nested-stacks 270 code/workspace/layered-stacks--code/workspace 333 code/workspace/layered-stacks--code/workspace/nested-stacks 478 code/workspace/nested-stacks--code/workspace 263 code/solutions/linting-and-testing code/solutions/linting-and-testing code/workspace/linting-and-testing code/workspace/linting-and-testing code/solutions/linting-and-testing--code/workspace/linting-and-testing 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 365 duplicates...
Size#FoldersFilesLinesCode
94 x 2 code/workspace/layered-stacks
code/workspace/nested-stacks
vpc.yaml
vpc.yaml
36:139 (72%)
32:135 (79%)
view
91 x 2 code/solutions/layered-stacks
code/solutions/nested-stacks
vpc.yaml
vpc.yaml
33:135 (71%)
29:131 (77%)
view
74 x 2 code/solutions/layered-stacks
code/solutions/nested-stacks
ec2.yaml
ec2.yaml
32:109 (50%)
44:121 (47%)
view
60 x 2 code/solutions/layered-stacks
code/workspace/layered-stacks
ec2.yaml
ec2.yaml
47:109 (40%)
59:121 (37%)
view
60 x 2 code/solutions
code/workspace/nested-stacks
helper-scripts.yaml
ec2.yaml
71:133 (36%)
48:115 (40%)
view
60 x 2 code/solutions/nested-stacks
code/workspace/layered-stacks
ec2.yaml
ec2.yaml
59:121 (38%)
59:121 (37%)
view
58 x 2 code/solutions
code/solutions
session-manager.yaml
user-data.yaml
5:68 (77%)
5:68 (47%)
view
56 x 2 code/workspace/layered-stacks
code/workspace/nested-stacks
ec2.yaml
ec2.yaml
48:107 (35%)
37:98 (37%)
view
54 x 2 code/workspace
code/workspace
helper-scripts.yaml
user-data.yaml
5:66 (56%)
5:64 (72%)
view
51 x 2 code/solutions
code/solutions/layered-stacks
helper-scripts.yaml
ec2.yaml
66:119 (31%)
42:95 (34%)
view
51 x 2 code/solutions
code/solutions/nested-stacks
helper-scripts.yaml
ec2.yaml
66:119 (31%)
54:107 (32%)
view
46 x 2 code/solutions/nested-stacks
code/workspace/nested-stacks
ec2.yaml
ec2.yaml
59:107 (29%)
48:98 (31%)
view
46 x 2 code/solutions
code/workspace/layered-stacks
helper-scripts.yaml
ec2.yaml
71:119 (28%)
59:107 (29%)
view
46 x 2 code/solutions/layered-stacks
code/workspace/nested-stacks
ec2.yaml
ec2.yaml
47:95 (31%)
48:98 (31%)
view
42 x 2 code/solutions
code/solutions
helper-scripts.yaml
session-manager.yaml
20:66 (25%)
17:63 (56%)
view
42 x 2 code/solutions
code/solutions
helper-scripts.yaml
user-data.yaml
20:66 (25%)
17:63 (34%)
view
40 x 2 code/solutions
code/solutions
mappings.yaml
outputs.yaml
5:48 (95%)
5:48 (74%)
view
37 x 2 code/solutions
code/workspace
session-manager.yaml
user-data.yaml
30:70 (49%)
30:71 (49%)
view
35 x 2 code/workspace/layered-stacks
code/workspace/nested-stacks
ec2.yaml
ec2.yaml
124:163 (22%)
118:158 (23%)
view
35 x 2 code/solutions
code/workspace
user-data.yaml
user-data.yaml
30:68 (28%)
30:68 (46%)
view