aws-samples / eks-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
  • 19% duplication:
    • 6,734 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,316 duplicated lines
  • 89 duplicates
system19% (1,316 lines)
Duplication per Extension
yml46% (797 lines)
yaml23% (399 lines)
py77% (108 lines)
css<1% (12 lines)
Duplication per Component (primary)
templates47% (628 lines)
content/beginner29% (426 lines)
content/advanced57% (170 lines)
content/intermediate12% (80 lines)
static/css<1% (12 lines)
static0% (0 lines)
ROOT0% (0 lines)
layouts/partials0% (0 lines)
layouts/shortcodes0% (0 lines)
layouts0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 89 duplicates...
Size#FoldersFilesLinesCode
59 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
37:95 (11%)
159:217 (11%)
view
57 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
100:156 (10%)
161:217 (10%)
view
57 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
39:95 (10%)
100:156 (10%)
view
50 x 2 templates
templates
amazon-eks-nodegroup-with-mixed-insta...
amazon-eks-nodegroup-with-spot.yml
77:126 (13%)
167:216 (9%)
view
50 x 2 templates
templates
amazon-eks-nodegroup-with-mixed-insta...
amazon-eks-nodegroup-with-spot.yml
77:126 (13%)
106:155 (9%)
view
50 x 2 content/advanced/420_kubeflow/kubeflow.files
content/advanced/420_kubeflow/kubeflow.files
mnist-tensorflow-docker.py
mnist-tensorflow-jupyter.py
13:80 (86%)
13:80 (89%)
view
50 x 2 templates
templates
amazon-eks-nodegroup-with-mixed-insta...
amazon-eks-nodegroup-with-spot.yml
77:126 (13%)
45:94 (9%)
view
33 x 2 templates
templates
ci-cd-codepipeline.cfn.yml
weave_flux_pipeline.cfn.yml
246:278 (12%)
207:239 (22%)
view
32 x 2 content/beginner/080_scaling/deploy_ca.files
content/beginner/080_scaling/deploy_ca.files
cluster-autoscaler-autodiscover.yaml
cluster_autoscaler.yml
102:134 (20%)
90:122 (21%)
view
23 x 2 content/advanced/420_kubeflow/kubeflow.files
content/advanced/420_kubeflow/kubeflow.files
mnist-tensorflow.yaml
mnist-training.yaml
12:34 (67%)
13:35 (65%)
view
22 x 2 content/beginner/115_sg-per-pod/deployments.files
content/beginner/115_sg-per-pod/deployments.files
green-pod.yaml
red-pod.yaml
30:51 (43%)
30:51 (43%)
view
17 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
493:510 (3%)
521:538 (3%)
view
15 x 2 content/beginner/080_scaling/deploy_ca.files
content/beginner/080_scaling/deploy_ca.files
cluster-autoscaler-autodiscover.yaml
cluster_autoscaler.yml
85:100 (9%)
73:88 (10%)
view
13 x 2 content/intermediate/280.../backupandrestore.files
content/intermediate/280.../backupandrestore.files
mysql-deployment.yaml
wordpress-deployment.yaml
19:31 (19%)
19:31 (19%)
view
13 x 2 content/beginner/080_scaling/deploy_ca.files
content/beginner/080_scaling/deploy_ca.files
cluster-autoscaler-autodiscover.yaml
cluster_autoscaler.yml
67:79 (8%)
55:67 (8%)
view
12 x 2 content/beginner/115_sg-per-pod/deployments.files
content/beginner/115_sg-per-pod/deployments.files
green-pod.yaml
red-pod.yaml
17:28 (23%)
17:28 (23%)
view
12 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
523:535 (2%)
551:563 (2%)
view
12 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
495:507 (2%)
551:563 (2%)
view
11 x 2 content/beginner/150_spo...egroups/deployapp.files
content/beginner/150_spo...egroups/deployapp.files
ecsdemo-crystal-deployment.yml
ecsdemo-nodejs-deployment.yml
22:32 (28%)
22:32 (28%)
view
11 x 2 templates
templates
amazon-eks-nodegroup-with-spot.yml
amazon-eks-nodegroup-with-spot.yml
426:436 (2%)
450:460 (2%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
19 x 2 content/advanced/420_kubeflow/kubeflow.files
content/advanced/420_kubeflow/kubeflow.files
mnist-tensorflow-jupyter.py
mnist-tensorflow-docker.py
0:0 
0:0 
view
13 x 2 content/advanced/420_kubeflow/kubeflow.files
content/advanced/420_kubeflow/kubeflow.files
mnist-tensorflow-jupyter.py
mnist-tensorflow-docker.py
0:0 
0:0 
view
8 x 2 content/advanced/420_kubeflow/kubeflow.files
content/advanced/420_kubeflow/kubeflow.files
mnist-tensorflow-jupyter.py
mnist-tensorflow-docker.py
0:0 
0:0 
view