aws-samples / amazon-eks-gmsa
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
  • 41% duplication:
    • 2,245 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 933 duplicated lines
  • 100 duplicates
system41% (933 lines)
Duplication per Extension
yaml56% (568 lines)
ps131% (250 lines)
cshtml42% (115 lines)
Duplication per Component (primary)
sample-applications77% (276 lines)
cloud-formation-templates45% (223 lines)
sample-applications/IIS-auth-application80% (155 lines)
sample-applications/frontend-mvc/ContainerMVC/Views42% (115 lines)
eks-deployments/webhook23% (100 lines)
eks-deployments/credspec19% (28 lines)
eks-deployments/patch-coredns21% (22 lines)
sample-applications/backend-sql-server15% (14 lines)
sample-applications/frontend-mvc/ContainerMVC/DataAccess0% (0 lines)
sample-applications/frontend-mvc/ContainerMVC/wwwroot0% (0 lines)
sample-applications/frontend-mvc/ContainerMVC/Controllers0% (0 lines)
sample-applications/frontend-mvc/ContainerMVC/Models0% (0 lines)
sample-applications/frontend-mvc/ContainerMVC0% (0 lines)

Duplication Between Components (50+ lines)

G sample-applications sample-applications sample-applications/IIS-auth-application sample-applications/IIS-auth-application sample-applications--sample-applications/IIS-auth-application 187 eks-deployments/webhook eks-deployments/webhook eks-deployments/webhook--sample-applications 76 eks-deployments/webhook--sample-applications/IIS-auth-application 71 sample-applications/backend-sql-server sample-applications/backend-sql-server eks-deployments/webhook--sample-applications/backend-sql-server 56 eks-deployments/credspec eks-deployments/credspec eks-deployments/credspec--sample-applications 72 eks-deployments/credspec--sample-applications/IIS-auth-application 69 eks-deployments/credspec--eks-deployments/webhook 60 eks-deployments/patch-coredns eks-deployments/patch-coredns eks-deployments/patch-coredns--sample-applications 60 eks-deployments/patch-coredns--sample-applications/IIS-auth-application 57 eks-deployments/patch-coredns--eks-deployments/webhook 60

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 100 duplicates...
Size#FoldersFilesLinesCode
40 x 2 sample-applications/fron...ContainerMVC/Views/Home
sample-applications/fron...ContainerMVC/Views/Home
cshtml
Edit.cshtml
View.cshtml
1:67 (90%)
1:67 (90%)
view
36 x 2 sample-applications
sample-applications
containersql-bookstore.yaml
containersql-bookstore_v14.yaml
40:75 (60%)
39:74 (61%)
view
29 x 2 sample-applications/fron...ContainerMVC/Views/Home
sample-applications/fron...ContainerMVC/Views/Home
cshtml
Create.cshtml
Edit.cshtml
24:59 (67%)
25:60 (65%)
view
29 x 2 sample-applications/fron...ContainerMVC/Views/Home
sample-applications/fron...ContainerMVC/Views/Home
cshtml
Create.cshtml
View.cshtml
24:59 (67%)
25:60 (65%)
view
27 x 2 sample-applications/IIS-auth-application
sample-applications/IIS-auth-application
windows-server-iis.yaml
windows-server-iis_v14.yaml
38:64 (55%)
37:63 (56%)
view
27 x 2 sample-applications
sample-applications
containermvc-web.yaml
containermvc-web_v14.yaml
40:66 (52%)
39:65 (54%)
view
22 x 2 cloud-formation-templates
cloud-formation-templates
ssm-document-adgroup-createandjoin.yaml
ssm-document-domain-join.yaml
34:59 (21%)
34:59 (18%)
view
21 x 2 cloud-formation-templates
cloud-formation-templates
ssm-document-adgroup-createandjoin.yaml
ssm-document-domain-join.yaml
61:89 (20%)
67:95 (17%)
view
19 x 2 sample-applications
sample-applications
containersql-bookstore.yaml
containersql-bookstore_v14.yaml
17:35 (31%)
17:35 (32%)
view
19 x 2 sample-applications
sample-applications
containermvc-web.yaml
containermvc-web_v14.yaml
17:35 (37%)
17:35 (38%)
view
19 x 2 cloud-formation-templates
cloud-formation-templates
ssm-document-credspec-generator.yaml
ssm-document-domain-join.yaml
38:60 (13%)
37:59 (16%)
view
19 x 2 cloud-formation-templates
cloud-formation-templates
ssm-document-adgroup-createandjoin.yaml
ssm-document-credspec-generator.yaml
37:59 (18%)
38:60 (13%)
view
17 x 2 sample-applications/IIS-auth-application
sample-applications/IIS-auth-application
windows-server-iis.yaml
windows-server-iis_v14.yaml
17:33 (34%)
17:33 (35%)
view
16 x 2 sample-applications
sample-applications/IIS-auth-application
Deploy-Applications.ps1
Deploy-Applications.ps1
47:65 (15%)
35:53 (23%)
view
16 x 2 eks-deployments/credspec
sample-applications
Deploy-CredSpec.ps1
Deploy-Applications.ps1
1:17 (15%)
1:16 (15%)
view
16 x 2 eks-deployments/credspec
eks-deployments/webhook
Deploy-CredSpec.ps1
Setup-Webhook.ps1
1:17 (15%)
1:17 (17%)
view
16 x 2 eks-deployments/webhook
sample-applications
Setup-Webhook.ps1
Deploy-Applications.ps1
1:17 (17%)
1:16 (15%)
view
16 x 2 sample-applications
sample-applications
Build-Container-Images.ps1
Deploy-Applications.ps1
1:17 (51%)
1:16 (15%)
view
16 x 2 sample-applications/IIS-auth-application
sample-applications/IIS-auth-application
Build-Container-Images.ps1
Deploy-Applications.ps1
1:17 (59%)
1:16 (23%)
view
16 x 2 eks-deployments/patch-coredns
eks-deployments/webhook
Patch-Coredns.ps1
Setup-Webhook.ps1
1:16 (22%)
1:17 (17%)
view