aws-samples / aws-modernization-with-snyk-security
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
  • 36% duplication:
    • 1,653 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 604 duplicated lines
  • 48 duplicates
system36% (604 lines)
Duplication per Extension
yaml61% (536 lines)
py13% (68 lines)
Duplication per Component (primary)
templates89% (496 lines)
pipeline/webhosting12% (40 lines)
workshop-resources/cdk/snyk-codesuite-cdk/cdk_stack_deploy11% (34 lines)
workshop-resources/cdk/snyk-codesuite-cdk/cdk_snyk_construct34% (34 lines)
static/css0% (0 lines)
ROOT0% (0 lines)
workshop-resources/cdk/snyk-codesuite-cdk0% (0 lines)
workshop-resources/scripts0% (0 lines)
layouts/partials0% (0 lines)

Duplication Between Components (50+ lines)

G workshop-resources/cdk/snyk-codesuite-cdk/cdk_snyk_construct workshop-resources/cdk/snyk-codesuite-cdk/cdk_snyk_construct workshop-resources/cdk/snyk-codesuite-cdk/cdk_stack_deploy workshop-resources/cdk/snyk-codesuite-cdk/cdk_stack_deploy workshop-resources/cdk/snyk-codesuite-cdk/cdk_snyk_construct--workshop-resources/cdk/snyk-codesuite-cdk/cdk_stack_deploy 68

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 48 duplicates...
Size#FoldersFilesLinesCode
56 x 2 templates
templates
snyk-ecr.yaml
snyk-lambda.yaml
17:72 (52%)
14:69 (57%)
view
48 x 2 templates
templates
snyk-full.yaml
snyk-lambda.yaml
20:67 (44%)
14:61 (49%)
view
48 x 2 templates
templates
snyk-ecr.yaml
snyk-full.yaml
17:64 (44%)
20:67 (44%)
view
36 x 2 templates
templates
snyk-ecr.template.yaml
snyk-ecr.yaml
36:71 (50%)
72:107 (33%)
view
35 x 2 templates
templates
snyk-full.template.yaml
snyk-full.yaml
74:108 (32%)
74:108 (32%)
view
29 x 2 templates
templates
snyk-lambda.template.yaml
snyk-lambda.yaml
33:61 (47%)
69:97 (29%)
view
19 x 2 templates
templates
snyk-full.template.yaml
snyk-lambda.yaml
24:42 (17%)
14:32 (19%)
view
19 x 2 templates
templates
snyk-ecr.yaml
snyk-full.template.yaml
17:35 (17%)
24:42 (17%)
view
19 x 2 templates
templates
snyk-full.template.yaml
snyk-full.yaml
24:42 (17%)
20:38 (17%)
view
17 x 2 templates
templates
snyk-ecr.template.yaml
snyk-lambda.template.yaml
20:36 (23%)
17:33 (27%)
view
15 x 2 workshop-resources/cdk/s...-cdk/cdk_snyk_construct
workshop-resources/cdk/s...te-cdk/cdk_stack_deploy
cdk_snyk_construct_stack.py
cdk_snyk_codeartifact_stack.py
93:107 (15%)
273:287 (5%)
view
14 x 2 templates
templates
snyk-ecr.template.yaml
snyk-lambda.template.yaml
38:51 (19%)
35:48 (22%)
view
14 x 2 templates
templates
snyk-ecr.yaml
snyk-lambda.template.yaml
74:87 (13%)
35:48 (22%)
view
14 x 2 templates
templates
snyk-ecr.template.yaml
snyk-lambda.yaml
38:51 (19%)
71:84 (14%)
view
14 x 2 templates
templates
snyk-ecr.yaml
snyk-lambda.yaml
74:87 (13%)
71:84 (14%)
view
12 x 2 workshop-resources/cdk/s...-cdk/cdk_snyk_construct
workshop-resources/cdk/s...te-cdk/cdk_stack_deploy
cdk_snyk_construct_stack.py
cdk_snyk_codeartifact_stack.py
39:50 (12%)
190:201 (4%)
view
11 x 2 templates
templates
snyk-lambda.template.yaml
snyk-lambda.yaml
1:11 (18%)
1:11 (11%)
view
11 x 2 templates
templates
snyk-full.template.yaml
snyk-full.yaml
7:17 (10%)
7:17 (10%)
view
8 x 2 templates
templates
snyk-ecr.template.yaml
snyk-ecr.yaml
7:14 (11%)
7:14 (7%)
view
8 x 2 templates
templates
snyk-full.template.yaml
snyk-full.template.yaml
87:94 (7%)
102:109 (7%)
view