aws-samples / aws-fault-injection-simulator-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
  • 35% duplication:
    • 7,406 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,651 duplicated lines
  • 357 duplicates
system35% (2,651 lines)
Duplication per Extension
css32% (1,141 lines)
yaml46% (715 lines)
go99% (692 lines)
js100% (47 lines)
html5% (40 lines)
py5% (16 lines)
Duplication per Component (primary)
workshop/themes/learn26% (1,181 lines)
resources/templates/goad-cdk98% (353 lines)
resources/templates/goad-redux86% (346 lines)
workshop/content/030_basic_content74% (316 lines)
resources/templates/api-failures54% (227 lines)
resources/templates/access-controls69% (109 lines)
resources/code/cdk11% (33 lines)
resources/templates/asg-cdk32% (23 lines)
resources/templates/cpu-stress12% (23 lines)
resources/templates/deploy-ee-codebuild9% (14 lines)
resources/templates/eks11% (7 lines)
resources/templates/rds9% (7 lines)
resources/templates/vpc9% (6 lines)
resources/templates/ecs12% (6 lines)
workshop0% (0 lines)
workshop/layouts/_default0% (0 lines)
resources/templates/spot0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G resources/templates/goad-cdk resources/templates/goad-cdk resources/templates/goad-redux resources/templates/goad-redux resources/templates/goad-cdk--resources/templates/goad-redux 692

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 357 duplicates...
Size#FoldersFilesLinesCode
299 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
loadgen.go
loadgen.go
21:406 (100%)
21:406 (100%)
view
82 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-green.css
theme-red.css
30:128 (79%)
30:128 (79%)
view
82 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-blue.css
theme-green.css
30:128 (79%)
30:128 (79%)
view
82 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-blue.css
theme-red.css
30:128 (79%)
30:128 (79%)
view
63 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
34 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
main.go
main.go
39:95 (66%)
34:90 (70%)
view
34 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
187:222 (13%)
189:224 (10%)
view
34 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
hugo-theme.css
theme-aws.css
83:121 (16%)
231:269 (14%)
view
33 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-aws.css
theme-green.css
114:148 (13%)
59:93 (32%)
view
33 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-aws.css
theme-blue.css
114:148 (13%)
59:93 (32%)
view
33 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-aws.css
theme-red.css
114:148 (13%)
59:93 (32%)
view
31 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view
29 x 2 workshop/content/030_bas...sues/020_impact_ec2-asg
workshop/content/030_bas...sues/020_impact_ec2-asg
ssm-template-tarpitted.yaml
ssm-template.yaml
110:140 (22%)
70:98 (29%)
view
29 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
224:252 (11%)
226:254 (8%)
view
21 x 2 resources/templates/api-failures
resources/templates/api-failures
api-throttling.yaml
api-unavailable.yaml
94:114 (16%)
246:266 (7%)
view
21 x 2 resources/templates/access-controls
resources/templates/access-controls
template.yaml
template.yaml
10:30 (13%)
46:66 (13%)
view
20 x 2 workshop/content/030_bas...sues/020_impact_ec2-asg
workshop/content/030_bas...sues/020_impact_ec2-asg
ssm-template-tarpitted.yaml
ssm-template.yaml
1:20 (15%)
1:20 (20%)
view
18 x 2 workshop/content/030_bas...sues/020_impact_ec2-asg
workshop/content/030_bas...sues/020_impact_ec2-asg
ssm-template-tarpitted.yaml
ssm-template.yaml
51:68 (14%)
35:52 (18%)
view
15 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.dark.css
mermaid.forest.css
254:272 (5%)
336:350 (4%)
view
15 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.dark.css
252:270 (5%)
254:272 (5%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
230 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
loadgen.go
loadgen.go
88:344 
88:344 
view
45 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
loadgen.go
loadgen.go
31:86 
31:86 
view
22 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
loadgen.go
loadgen.go
356:382 
356:382 
view
22 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
loadgen.go
loadgen.go
384:407 
384:407 
view
20 x 2 resources/templates/goad-cdk/load-gen
resources/templates/goad-redux/go-lambda/load-gen
main.go
main.go
67:98 
62:93 
view