aws-samples / aws-microservices-deploy-options
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
  • 57% duplication:
    • 5,567 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,200 duplicated lines
  • 253 duplicates
system57% (3,200 lines)
Duplication per Extension
yaml64% (2,817 lines)
yml100% (279 lines)
jsonnet82% (66 lines)
js71% (38 lines)
Duplication per Component (primary)
apps/ecs/deployment55% (790 lines)
apps/ecs/ec285% (654 lines)
apps/lambda55% (479 lines)
apps/ecs/fargate91% (442 lines)
apps/ecs/ecs-cli61% (207 lines)
apps/k8s/istio68% (163 lines)
apps/k8s/standalone100% (142 lines)
apps/k8s/kubepack91% (137 lines)
apps/k8s/helm48% (82 lines)
apps/k8s/ksonnet72% (66 lines)
apps/lambda/hooks71% (38 lines)
ROOT0% (0 lines)
config/xray0% (0 lines)

Duplication Between Components (50+ lines)

G apps/ecs/ec2 apps/ecs/ec2 apps/ecs/fargate apps/ecs/fargate apps/ecs/ec2--apps/ecs/fargate 738 apps/ecs/ecs-cli apps/ecs/ecs-cli apps/ecs/ec2--apps/ecs/ecs-cli 408 apps/ecs/deployment apps/ecs/deployment apps/ecs/deployment--apps/ecs/ec2 411 apps/ecs/deployment--apps/ecs/fargate 233 apps/ecs/deployment--apps/ecs/ecs-cli 176 apps/lambda apps/lambda apps/ecs/deployment--apps/lambda 54 apps/ecs/ecs-cli--apps/ecs/fargate 394 apps/k8s/kubepack apps/k8s/kubepack apps/k8s/standalone apps/k8s/standalone apps/k8s/kubepack--apps/k8s/standalone 274 apps/k8s/istio apps/k8s/istio apps/k8s/istio--apps/k8s/kubepack 250 apps/k8s/istio--apps/k8s/standalone 266 apps/k8s/helm apps/k8s/helm apps/k8s/helm--apps/k8s/kubepack 68 apps/k8s/helm--apps/k8s/standalone 68 apps/k8s/helm--apps/k8s/istio 79

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 253 duplicates...
Size#FoldersFilesLinesCode
168 x 2 apps/ecs/ecs-cli
apps/ecs/fargate/templates
infra.yaml
infrastructure.yaml
1:168 (57%)
1:168 (83%)
view
141 x 2 apps/ecs/ec2/templates
apps/ecs/fargate/templates
infrastructure.yaml
infrastructure.yaml
73:213 (35%)
39:179 (69%)
view
130 x 2 apps/ecs/ec2/templates
apps/ecs/ecs-cli
infrastructure.yaml
infra.yaml
73:202 (32%)
39:168 (44%)
view
47 x 2 apps/k8s/istio
apps/k8s/standalone
manifest.yaml
manifest.yml
1:47 (27%)
1:47 (33%)
view
45 x 2 apps/lambda
apps/lambda
name-sam.yaml
sam.yaml
31:75 (52%)
71:116 (24%)
view
42 x 2 apps/ecs/deployment
apps/ecs/deployment
deployment-pipeline-name.yaml
deployment-pipeline-webapp.yaml
7:58 (35%)
7:58 (35%)
view
40 x 2 apps/lambda
apps/lambda
sam.yaml
webapp-sam.yaml
140:180 (21%)
33:73 (53%)
view
40 x 2 apps/k8s/kubepack/manifests/app
apps/k8s/standalone
webapp.deployment.yml
manifest.yml
1:40 (100%)
103:142 (28%)
view
33 x 2 apps/ecs/deployment
apps/ecs/ec2/templates
ecs-cluster.yaml
infrastructure.yaml
35:69 (21%)
3:35 (8%)
view
32 x 2 apps/ecs/ec2/templates
apps/ecs/ec2/templates
infrastructure.yaml
infrastructure.yaml
273:304 (8%)
339:370 (8%)
view
32 x 2 apps/k8s/istio
apps/k8s/kubepack/manifests/app
manifest.yaml
webapp.deployment.yml
141:172 (18%)
9:40 (80%)
view
32 x 2 apps/k8s/istio
apps/k8s/standalone
manifest.yaml
manifest.yml
141:172 (18%)
111:142 (22%)
view
31 x 2 apps/ecs/deployment
apps/ecs/deployment
deployment-pipeline-name.yaml
deployment-pipeline-webapp.yaml
96:126 (25%)
96:126 (25%)
view
31 x 2 apps/ecs/deployment
apps/ecs/deployment
deployment-pipeline-webapp.yaml
deployment-pipeline.yaml
96:126 (25%)
169:199 (15%)
view
31 x 2 apps/ecs/deployment
apps/ecs/deployment
deployment-pipeline-name.yaml
deployment-pipeline.yaml
96:126 (25%)
169:199 (15%)
view
30 x 2 apps/ecs/deployment
apps/ecs/deployment
deployment-pipeline-name.yaml
deployment-pipeline-webapp.yaml
64:94 (25%)
64:94 (25%)
view
28 x 2 apps/k8s/istio
apps/k8s/standalone
manifest.yaml
manifest.yml
112:139 (16%)
82:109 (19%)
view
28 x 2 apps/k8s/kubepack/manifests/app
apps/k8s/standalone
greeting.deployment.yml
manifest.yml
1:28 (100%)
45:72 (19%)
view
28 x 2 apps/k8s/kubepack/manifests/app
apps/k8s/standalone
name.deployment.yml
manifest.yml
1:28 (100%)
74:101 (19%)
view
27 x 2 apps/ecs/ec2/templates
apps/ecs/ecs-cli
infrastructure.yaml
infra.yaml
35:61 (6%)
3:29 (9%)
view