aws-samples / ai-services-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
  • 28% duplication:
    • 4,803 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,385 duplicated lines
  • 78 duplicates
system28% (1,385 lines)
Duplication per Extension
css34% (1,167 lines)
html26% (204 lines)
yml3% (14 lines)
Duplication per Component (primary)
themes/hugo-theme-learn/static31% (1,011 lines)
themes/hugo-theme-learn/exampleSite50% (110 lines)
themes/hugo-theme-learn/layouts16% (93 lines)
static/css58% (72 lines)
layouts/partials59% (59 lines)
layouts/shortcodes83% (26 lines)
etc4% (14 lines)
ROOT0% (0 lines)
themes/hugo-theme-learn0% (0 lines)
themes/hugo-theme-learn/i18n0% (0 lines)

Duplication Between Components (50+ lines)

G themes/hugo-theme-learn/exampleSite themes/hugo-theme-learn/exampleSite themes/hugo-theme-learn/static themes/hugo-theme-learn/static themes/hugo-theme-learn/exampleSite--themes/hugo-theme-learn/static 304 static/css static/css static/css--themes/hugo-theme-learn/exampleSite 131 static/css--themes/hugo-theme-learn/static 279 layouts/partials layouts/partials themes/hugo-theme-learn/layouts themes/hugo-theme-learn/layouts layouts/partials--themes/hugo-theme-learn/layouts 124 layouts/shortcodes layouts/shortcodes layouts/shortcodes--themes/hugo-theme-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 78 duplicates...
Size#FoldersFilesLinesCode
84 x 2 themes/hugo-theme-learn/exampleSite/static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-green.css
2:103 (100%)
2:103 (93%)
view
71 x 2 themes/hugo-theme-learn/static/css
themes/hugo-theme-learn/static/css
theme-blue.css
theme-green.css
27:111 (78%)
27:111 (78%)
view
71 x 2 themes/hugo-theme-learn/static/css
themes/hugo-theme-learn/static/css
theme-green.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
71 x 2 themes/hugo-theme-learn/static/css
themes/hugo-theme-learn/static/css
theme-blue.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
65 x 2 themes/hugo-theme-learn/exampleSite/static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-blue.css
27:103 (77%)
27:103 (72%)
view
65 x 2 themes/hugo-theme-learn/exampleSite/static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-red.css
27:103 (77%)
27:103 (72%)
view
63 x 2 themes/hugo-theme-learn/static/mermaid
themes/hugo-theme-learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
43 x 2 static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-red.css
85:132 (34%)
56:103 (47%)
view
43 x 2 static/css
themes/hugo-theme-learn/exampleSite/static/css
theme-mine.css
theme-mine.css
85:132 (34%)
56:103 (51%)
view
43 x 2 static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-green.css
85:132 (34%)
56:103 (47%)
view
43 x 2 static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-blue.css
85:132 (34%)
56:103 (47%)
view
42 x 2 layouts/partials
themes/hugo-theme-learn/layouts/partials
delete_header.html
header.html
6:53 (51%)
6:52 (45%)
view
34 x 2 themes/hugo-theme-learn/static/mermaid
themes/hugo-theme-learn/static/mermaid
mermaid.css
mermaid.forest.css
187:222 (13%)
189:224 (10%)
view
31 x 2 themes/hugo-theme-learn/static/mermaid
themes/hugo-theme-learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view
29 x 2 static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-blue.css
19:56 (23%)
19:56 (32%)
view
29 x 2 themes/hugo-theme-learn/static/mermaid
themes/hugo-theme-learn/static/mermaid
mermaid.css
mermaid.forest.css
224:252 (11%)
226:254 (8%)
view
26 x 2 layouts/shortcodes
themes/hugo-theme-learn/...Site/layouts/shortcodes
ghcontributors.html
ghcontributors.html
1:30 (100%)
1:30 (100%)
view
23 x 2 static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-red.css
27:56 (18%)
27:56 (25%)
view
23 x 2 static/css
themes/hugo-theme-learn/exampleSite/static/css
theme-mine.css
theme-mine.css
27:56 (18%)
27:56 (27%)
view
23 x 2 static/css
themes/hugo-theme-learn/static/css
theme-mine.css
theme-green.css
27:56 (18%)
27:56 (25%)
view