aws-samples / aws-modernization-workshop-for-newrelic
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
  • 23% duplication:
    • 8,898 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,052 duplicated lines
  • 122 duplicates
system23% (2,052 lines)
Duplication per Extension
css19% (1,184 lines)
yml47% (652 lines)
html19% (161 lines)
yaml19% (55 lines)
Duplication per Component (primary)
themes/learn/static31% (1,011 lines)
templates49% (652 lines)
themes/learn/exampleSite50% (110 lines)
static/css3% (89 lines)
themes/learn/layouts12% (72 lines)
webhosting19% (55 lines)
layouts90% (37 lines)
layouts/shortcodes26% (26 lines)
static0% (0 lines)
ROOT0% (0 lines)
layouts/partials0% (0 lines)
themes/learn0% (0 lines)
themes/learn/i18n0% (0 lines)

Duplication Between Components (50+ lines)

G themes/learn/exampleSite themes/learn/exampleSite themes/learn/static themes/learn/static themes/learn/exampleSite--themes/learn/static 304 static/css static/css static/css--themes/learn/exampleSite 130 static/css--themes/learn/static 302 templates templates webhosting webhosting templates--webhosting 123 layouts layouts themes/learn/layouts themes/learn/layouts layouts--themes/learn/layouts 74 layouts/shortcodes layouts/shortcodes layouts/shortcodes--themes/learn/exampleSite 52

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 122 duplicates...
Size#FoldersFilesLinesCode
84 x 2 themes/learn/exampleSite/static/css
themes/learn/static/css
theme-mine.css
theme-green.css
2:103 (100%)
2:103 (93%)
view
77 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-blue.css
19:111 (49%)
19:111 (85%)
view
71 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-green.css
27:111 (45%)
27:111 (78%)
view
71 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-red.css
27:111 (45%)
27:111 (78%)
view
71 x 2 themes/learn/static/css
themes/learn/static/css
theme-blue.css
theme-green.css
27:111 (78%)
27:111 (78%)
view
71 x 2 themes/learn/static/css
themes/learn/static/css
theme-blue.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
71 x 2 themes/learn/static/css
themes/learn/static/css
theme-green.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
65 x 2 themes/learn/exampleSite/static/css
themes/learn/static/css
theme-mine.css
theme-red.css
27:103 (77%)
27:103 (72%)
view
65 x 2 themes/learn/exampleSite/static/css
themes/learn/static/css
theme-mine.css
theme-blue.css
27:103 (77%)
27:103 (72%)
view
65 x 2 static/css
themes/learn/exampleSite/static/css
theme-mine.css
theme-mine.css
27:103 (41%)
27:103 (77%)
view
63 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
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%)
45:94 (9%)
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
34 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
187:222 (13%)
189:224 (10%)
view
33 x 2 templates
templates
ci-cd-codepipeline.cfn.yml
weave_flux_pipeline.cfn.yml
246:278 (12%)
207:239 (22%)
view
31 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view