aws-samples / asynchronous-messaging-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
  • 35% duplication:
    • 5,799 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,035 duplicated lines
  • 153 duplicates
system35% (2,035 lines)
Duplication per Extension
css38% (1,421 lines)
yaml41% (297 lines)
html25% (200 lines)
py37% (117 lines)
Duplication per Component (primary)
workshop/themes/learn31% (1,400 lines)
code/lab-348% (140 lines)
workshop/static/css91% (138 lines)
workshop/layouts/partials96% (83 lines)
code/lab-273% (61 lines)
code/lab-429% (56 lines)
code/lab-154% (40 lines)
code/lab-1/unicorn-management-service100% (36 lines)
code/lab-2/unicorn-management-service100% (36 lines)
code/lab-1/extraordinary_rides_service93% (15 lines)
code/lab-1/customer_accounting_service93% (15 lines)
code/lab-1/customer_notification_service93% (15 lines)
code/lab-2/generic-backend-microservice0% (0 lines)
code/lab-00% (0 lines)
code/lab-4/account_credit0% (0 lines)
code/lab-4/payment_charge0% (0 lines)
code/lab-4/payment_refund0% (0 lines)
code/lab-3/quotes-response-service0% (0 lines)
code/lab-3/request-for-quotes-service0% (0 lines)
code/lab-3/query-for-quotes-service0% (0 lines)
code/lab-3/generic-unicorn-management-service0% (0 lines)
workshop0% (0 lines)
workshop/layouts/shortcodes0% (0 lines)

Duplication Between Components (50+ lines)

G workshop/static/css workshop/static/css workshop/themes/learn workshop/themes/learn workshop/static/css--workshop/themes/learn 531 workshop/layouts/partials workshop/layouts/partials workshop/layouts/partials--workshop/themes/learn 172 code/lab-1 code/lab-1 code/lab-2 code/lab-2 code/lab-1--code/lab-2 80 code/lab-1/unicorn-management-service code/lab-1/unicorn-management-service code/lab-2/unicorn-management-service code/lab-2/unicorn-management-service code/lab-1/unicorn-management-service--code/lab-2/unicorn-management-service 72

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 153 duplicates...
Size#FoldersFilesLinesCode
84 x 2 workshop/themes/learn/exampleSite/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-green.css
2:103 (100%)
2:103 (93%)
view
71 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-blue.css
theme-green.css
27:111 (78%)
27:111 (78%)
view
71 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-green.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
71 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-blue.css
theme-red.css
27:111 (78%)
27:111 (78%)
view
65 x 2 workshop/themes/learn/exampleSite/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-blue.css
27:103 (77%)
27:103 (72%)
view
65 x 2 workshop/themes/learn/exampleSite/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-red.css
27:103 (77%)
27:103 (72%)
view
63 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
57 x 2 workshop/layouts/partials
workshop/themes/learn/layouts/partials
header.html
header.html
35:104 (66%)
31:100 (67%)
view
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-blue.css
85:132 (28%)
56:103 (47%)
view
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-aws.css
132:184 (28%)
186:238 (17%)
view
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-red.css
85:132 (28%)
56:103 (47%)
view
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-green.css
85:132 (28%)
56:103 (47%)
view
43 x 2 workshop/static/css
workshop/themes/learn/exampleSite/static/css
theme-mine.css
theme-mine.css
85:132 (28%)
56:103 (51%)
view
36 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-aws.css
82:119 (23%)
120:157 (14%)
view
36 x 2 code/lab-1/unicorn-management-service
code/lab-2/unicorn-management-service
app.py
app.py
7:68 (100%)
7:68 (100%)
view
34 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
187:222 (13%)
189:224 (10%)
view
34 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
hugo-theme.css
theme-aws.css
83:121 (16%)
238:276 (13%)
view
34 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-aws.css
40:81 (22%)
77:118 (13%)
view
33 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-aws.css
theme-red.css
123:157 (13%)
56:90 (36%)
view
33 x 2 workshop/themes/learn/static/css
workshop/themes/learn/static/css
theme-aws.css
theme-green.css
123:157 (13%)
56:90 (36%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
13 x 3 code/lab-1/customer_notification_service
code/lab-1/extraordinary_rides_service
code/lab-1/customer_accounting_service
app.py
app.py
app.py
0:0 
0:0 
0:0 
view