aws-ia / workshop-taskcat
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
  • 40% duplication:
    • 5,357 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,169 duplicated lines
  • 85 duplicates
system40% (2,169 lines)
Duplication per Extension
css30% (986 lines)
yaml87% (843 lines)
py99% (300 lines)
html6% (40 lines)
Duplication per Component (primary)
themes/learn/static/mermaid62% (537 lines)
themes/learn/static/css19% (449 lines)
content/lab_assets/start/lab486% (399 lines)
content/lab_assets/start/lab592% (392 lines)
content/lab_assets/start/lab395% (199 lines)
content/lab_assets/start/lab297% (84 lines)
content/lab_assets/start/lab195% (69 lines)
themes/learn/layouts/shortcodes15% (28 lines)
themes/learn/layouts/partials2% (6 lines)
themes/learn/layouts9% (6 lines)
ROOT0% (0 lines)
content/lab_assets/start/lab60% (0 lines)
layouts/partials0% (0 lines)
themes/learn0% (0 lines)
themes/learn/layouts/_default0% (0 lines)
themes/learn/i18n0% (0 lines)

Duplication Between Components (50+ lines)

G content/lab_assets/start/lab4 content/lab_assets/start/lab4 content/lab_assets/start/lab5 content/lab_assets/start/lab5 content/lab_assets/start/lab4--content/lab_assets/start/lab5 784 content/lab_assets/start/lab3 content/lab_assets/start/lab3 content/lab_assets/start/lab3--content/lab_assets/start/lab4 230 content/lab_assets/start/lab3--content/lab_assets/start/lab5 216 content/lab_assets/start/lab2 content/lab_assets/start/lab2 content/lab_assets/start/lab2--content/lab_assets/start/lab3 168 content/lab_assets/start/lab1 content/lab_assets/start/lab1 content/lab_assets/start/lab1--content/lab_assets/start/lab3 138 content/lab_assets/start/lab1--content/lab_assets/start/lab2 138

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 85 duplicates...
Size#FoldersFilesLinesCode
109 x 2 content/lab_assets/start...3/cfn-project/templates
content/lab_assets/start...4/cfn-project/templates
copy-zips.template.yaml
copy-zips.template.yaml
14:123 (89%)
14:123 (89%)
view
98 x 2 content/lab_assets/start...4/cfn-project/templates
content/lab_assets/start...5/cfn-project/templates
survey.template.yaml
survey.template.yaml
76:173 (56%)
60:157 (62%)
view
77 x 2 content/lab_assets/start...4/cfn-project/templates
content/lab_assets/start...5/cfn-project/templates
copy-zips.template.yaml
copy-zips.template.yaml
46:123 (63%)
48:125 (62%)
view
77 x 2 content/lab_assets/start...3/cfn-project/templates
content/lab_assets/start...5/cfn-project/templates
copy-zips.template.yaml
copy-zips.template.yaml
46:123 (63%)
48:125 (62%)
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
70 x 2 content/lab_assets/start...functions/source/Survey
content/lab_assets/start...functions/source/Survey
survey.py
survey.py
4:93 (100%)
4:93 (100%)
view
68 x 2 content/lab_assets/start...2/cfn-project/templates
content/lab_assets/start...3/cfn-project/templates
lab2.template.yaml
lab3.template.yaml
1:68 (97%)
1:68 (97%)
view
63 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
38 x 2 content/lab_assets/start...4/cfn-project/templates
content/lab_assets/start...5/cfn-project/templates
copy-zips.template.yaml
copy-zips.template.yaml
1:38 (31%)
1:38 (30%)
view
35 x 2 content/lab_assets/start...1/cfn-project/templates
content/lab_assets/start...2/cfn-project/templates
lab1.template.yaml
lab2.template.yaml
21:55 (62%)
28:62 (50%)
view
35 x 2 content/lab_assets/start...1/cfn-project/templates
content/lab_assets/start...3/cfn-project/templates
lab1.template.yaml
lab3.template.yaml
21:55 (62%)
28:62 (50%)
view
34 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
187:222 (13%)
189:224 (10%)
view
31 x 2 content/lab_assets/start...4/cfn-project/templates
content/lab_assets/start...5/cfn-project/templates
survey.template.yaml
survey.template.yaml
26:56 (17%)
22:52 (19%)
view
31 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view
29 x 2 content/lab_assets/start...ons/source/SurveySubmit
content/lab_assets/start...ons/source/SurveySubmit
survey_submit.py
survey_submit.py
6:42 (50%)
7:43 (50%)
view
29 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
224:252 (11%)
226:254 (8%)
view
27 x 2 content/lab_assets/start...ons/source/SurveySubmit
content/lab_assets/start...ons/source/SurveySubmit
survey_submit.py
survey_submit.py
44:70 (47%)
46:72 (46%)
view
25 x 2 content/lab_assets/start...3/cfn-project/templates
content/lab_assets/start...5/cfn-project/templates
copy-zips.template.yaml
copy-zips.template.yaml
14:38 (20%)
14:38 (20%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
70 x 2 content/lab_assets/start...functions/source/Survey
content/lab_assets/start...functions/source/Survey
survey.py
survey.py
0:0 
0:0 
view
19 x 2 content/lab_assets/start...ons/source/SurveySubmit
content/lab_assets/start...ons/source/SurveySubmit
survey_submit.py
survey_submit.py
0:0 
0:0 
view
7 x 3 content/lab_assets/start...ctions/source/GenRandom
content/lab_assets/start...ctions/source/GenRandom
content/lab_assets/start...ctions/source/GenRandom
lambda_function.py
lambda_function.py
lambda_function.py
0:0 
0:0 
0:0 
view