aws-samples / aws-serverless-workshop-innovator-island
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:
    • 5,814 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,361 duplicated lines
  • 83 duplicates
system23% (1,361 lines)
Duplication per Extension
css34% (1,211 lines)
yaml22% (110 lines)
html6% (40 lines)
Duplication per Component (primary)
hugo-site/themes28% (1,251 lines)
1-app-deploy/sam-app23% (70 lines)
6-eventbridge/1-eventbus24% (24 lines)
6-eventbridge/2-maintenance16% (16 lines)
5-park-stats/2-simulator0% (0 lines)
hugo-site0% (0 lines)
1-app-deploy/local-app0% (0 lines)
1-app-deploy/ride-controller0% (0 lines)
2-realtime0% (0 lines)
4-translate/local-app0% (0 lines)
3-photos/2-compositing0% (0 lines)
3-photos/3-postprocess0% (0 lines)
3-photos/1-chromakey0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 83 duplicates...
Size#FoldersFilesLinesCode
84 x 2 hugo-site/themes/learn/exampleSite/static/css
hugo-site/themes/learn/static/css
theme-mine.css
theme-green.css
2:103 (100%)
2:103 (93%)
view
71 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
theme-green.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
71 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
theme-blue.css
theme-green.css
27:111 (78%)
27:111 (78%)
view
71 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
theme-blue.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
65 x 2 hugo-site/themes/learn/exampleSite/static/css
hugo-site/themes/learn/static/css
theme-mine.css
theme-red.css
27:103 (77%)
27:103 (72%)
view
65 x 2 hugo-site/themes/learn/exampleSite/static/css
hugo-site/themes/learn/static/css
theme-mine.css
theme-blue.css
27:103 (77%)
27:103 (72%)
view
63 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
34 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
hugo-theme.css
theme-aws.css
83:121 (16%)
221:259 (14%)
view
34 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
187:222 (13%)
189:224 (10%)
view
33 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
theme-aws.css
theme-green.css
106:140 (14%)
56:90 (36%)
view
33 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
theme-aws.css
theme-red.css
106:140 (14%)
56:90 (36%)
view
33 x 2 hugo-site/themes/learn/exampleSite/static/css
hugo-site/themes/learn/static/css
theme-mine.css
theme-aws.css
56:90 (39%)
106:140 (14%)
view
33 x 2 hugo-site/themes/learn/static/css
hugo-site/themes/learn/static/css
theme-aws.css
theme-blue.css
106:140 (14%)
56:90 (36%)
view
31 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view
29 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
224:252 (11%)
226:254 (8%)
view
21 x 2 1-app-deploy/sam-app
1-app-deploy/sam-app
template.yaml
template.yaml
157:177 (8%)
196:216 (8%)
view
15 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.dark.css
mermaid.forest.css
254:272 (5%)
336:350 (4%)
view
15 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
252:270 (5%)
336:350 (4%)
view
15 x 2 hugo-site/themes/learn/static/mermaid
hugo-site/themes/learn/static/mermaid
mermaid.css
mermaid.dark.css
252:270 (5%)
254:272 (5%)
view
14 x 2 1-app-deploy/sam-app
1-app-deploy/sam-app
template.yaml
template.yaml
142:155 (5%)
181:194 (5%)
view