awslabs / ec2-spot-workshops
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
  • 19% duplication:
    • 8,406 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,654 duplicated lines
  • 163 duplicates
system19% (1,654 lines)
Duplication per Extension
yaml34% (1,301 lines)
yml26% (329 lines)
css<1% (24 lines)
Duplication per Component (primary)
workshops/running-amazon-ec2-workloads-at-scale60% (398 lines)
workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options75% (359 lines)
content/using_ec2_spot_instances_with_eks27% (329 lines)
workshops/amazon-ec2-spot-cicd-workshop18% (212 lines)
static/config33% (144 lines)
workshops/ecs-spot-capacity-providers18% (104 lines)
content/rendering-with-batch12% (84 lines)
static/css<1% (24 lines)
ROOT0% (0 lines)
content/running_spark_apps_with_emr_on_spot_instances0% (0 lines)
workshops/using-sagemaker-managed-spot-training0% (0 lines)
layouts/_default0% (0 lines)
layouts/partials0% (0 lines)
layouts/shortcodes0% (0 lines)

Duplication Between Components (50+ lines)

G workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options workshops/running-amazon-ec2-workloads-at-scale workshops/running-amazon-ec2-workloads-at-scale workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options--workshops/running-amazon-ec2-workloads-at-scale 720 workshops/ecs-spot-capacity-providers workshops/ecs-spot-capacity-providers workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options--workshops/ecs-spot-capacity-providers 148 static/config static/config static/config--workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options 272 static/config--workshops/running-amazon-ec2-workloads-at-scale 288 static/config--workshops/ecs-spot-capacity-providers 102 workshops/ecs-spot-capacity-providers--workshops/running-amazon-ec2-workloads-at-scale 156 content/using_ec2_spot_instances_with_eks content/using_ec2_spot_instances_with_eks content/using_ec2_spot_instances_with_eks--workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options 50

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 163 duplicates...
Size#FoldersFilesLinesCode
58 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
spot-interruption-handler.yaml
spot-interruption-handler.yaml
20:88 (52%)
9:77 (59%)
view
58 x 2 content/using_ec2_spot_i...hspot/spotworkers.files
content/using_ec2_spot_i...hspot/spotworkers.files
eksctl_mixed_workers_bootstrap.yml
eksctl_mixed_workers_bootstrap.yml
17:75 (42%)
85:143 (42%)
view
37 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
123:159 (13%)
283:319 (6%)
view
32 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
spot-interruption-handler.yaml
spot-interruption-handler.yaml
91:123 (28%)
79:111 (32%)
view
31 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
59:89 (11%)
93:123 (5%)
view
30 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/ec2-auto-scali...es-and-purchase-options
monte-carlo-workshop.yaml
ec2-auto-scaling-with-multiple-instan...
145:174 (7%)
216:245 (10%)
view
30 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/running-amazon-ec2-workloads-at-scale
monte-carlo-workshop.yaml
running-amazon-ec2-workloads-at-scale...
145:174 (7%)
452:481 (5%)
view
30 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
216:245 (10%)
452:481 (5%)
view
29 x 2 content/using_ec2_spot_i...ions_and_affinity.files
content/using_ec2_spot_i...ions_and_affinity.files
monte-carlo-pi-service-final-self-man...
monte-carlo-pi-service-final.yml
1:29 (43%)
1:29 (46%)
view
23 x 2 content/using_ec2_spot_i...ions_and_affinity.files
content/using_ec2_spot_i...ions_and_affinity.files
monte-carlo-pi-service-final-self-man...
monte-carlo-pi-service-final.yml
45:67 (34%)
40:62 (37%)
view
22 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
101:122 (8%)
227:248 (4%)
view
19 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/ec2-auto-scali...es-and-purchase-options
monte-carlo-workshop.yaml
ec2-auto-scaling-with-multiple-instan...
125:143 (4%)
195:213 (6%)
view
19 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/running-amazon-ec2-workloads-at-scale
monte-carlo-workshop.yaml
running-amazon-ec2-workloads-at-scale...
125:143 (4%)
432:450 (3%)
view
19 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
195:213 (6%)
432:450 (3%)
view
19 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
174:192 (6%)
412:430 (3%)
view
17 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
18:36 (6%)
18:36 (3%)
view
15 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/ec2-auto-scali...es-and-purchase-options
monte-carlo-workshop.yaml
ec2-auto-scaling-with-multiple-instan...
109:123 (3%)
178:192 (5%)
view
15 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/running-amazon-ec2-workloads-at-scale
monte-carlo-workshop.yaml
running-amazon-ec2-workloads-at-scale...
109:123 (3%)
416:430 (2%)
view
14 x 2 workshops/ec2-auto-scali...es-and-purchase-options
workshops/running-amazon-ec2-workloads-at-scale
ec2-auto-scaling-with-multiple-instan...
running-amazon-ec2-workloads-at-scale...
248:261 (5%)
483:496 (2%)
view
14 x 2 static/config/monte-carlo-on-ec2-spot-fleet
workshops/ec2-auto-scali...es-and-purchase-options
monte-carlo-workshop.yaml
ec2-auto-scaling-with-multiple-instan...
176:189 (3%)
248:261 (5%)
view