aws-samples / pcf-on-aws-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
  • 40% duplication:
    • 6,728 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,693 duplicated lines
  • 104 duplicates
system40% (2,693 lines)
Duplication per Extension
css46% (1,914 lines)
jade100% (390 lines)
js87% (271 lines)
adoc10% (50 lines)
html6% (40 lines)
yaml10% (28 lines)
Duplication per Component (primary)
themes/hugo-theme-learn26% (1,135 lines)
modules/40-Deploying-Service-Broker-Polly97% (480 lines)
modules/50-Deploying-Via-Apps-Manager-Console97% (480 lines)
modules/45-Deploying-Service-Broker-S392% (448 lines)
static/css58% (72 lines)
modules/webhosting10% (28 lines)
content/30-AWS-Service-Broker-Install-and-Config17% (24 lines)
content/40-Deploying-Service-Broker-Polly22% (13 lines)
content/45-Deploying-Service-Broker-S311% (7 lines)
content/50-Deploying-Via-Apps-Manager-Console8% (6 lines)
ROOT0% (0 lines)
content/10-Lab-Setup0% (0 lines)
content/20-Getting-Started0% (0 lines)
layouts/partials0% (0 lines)

Duplication Between Components (50+ lines)

G modules/40-Deploying-Service-Broker-Polly modules/40-Deploying-Service-Broker-Polly modules/50-Deploying-Via-Apps-Manager-Console modules/50-Deploying-Via-Apps-Manager-Console modules/40-Deploying-Service-Broker-Polly--modules/50-Deploying-Via-Apps-Manager-Console 960 modules/45-Deploying-Service-Broker-S3 modules/45-Deploying-Service-Broker-S3 modules/40-Deploying-Service-Broker-Polly--modules/45-Deploying-Service-Broker-S3 896 modules/45-Deploying-Service-Broker-S3--modules/50-Deploying-Via-Apps-Manager-Console 896 static/css static/css themes/hugo-theme-learn themes/hugo-theme-learn static/css--themes/hugo-theme-learn 344

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 104 duplicates...
Size#FoldersFilesLinesCode
249 x 2 modules/40-Deploying-Ser...public/font-mfizz-2.3.0
modules/50-Deploying-Via...public/font-mfizz-2.3.0
font-mfizz.css
font-mfizz.css
16:268 (100%)
16:268 (100%)
view
249 x 2 modules/45-Deploying-Ser...public/font-mfizz-2.3.0
modules/50-Deploying-Via...public/font-mfizz-2.3.0
font-mfizz.css
font-mfizz.css
16:268 (100%)
16:268 (100%)
view
249 x 2 modules/40-Deploying-Ser...public/font-mfizz-2.3.0
modules/45-Deploying-Ser...public/font-mfizz-2.3.0
font-mfizz.css
font-mfizz.css
16:268 (100%)
16:268 (100%)
view
97 x 2 modules/40-Deploying-Ser...er-Polly/views/partials
modules/50-Deploying-Via...-Console/views/partials
jade
content.jade
content.jade
1:97 (100%)
1:97 (100%)
view
97 x 2 modules/40-Deploying-Ser...er-Polly/views/partials
modules/45-Deploying-Ser...roker-S3/views/partials
jade
content.jade
content.jade
1:97 (100%)
1:97 (100%)
view
97 x 2 modules/45-Deploying-Ser...roker-S3/views/partials
modules/50-Deploying-Via...-Console/views/partials
jade
content.jade
content.jade
1:97 (100%)
1:97 (100%)
view
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/static/css
theme-mine.css
theme-blue.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
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
30 x 2 modules/40-Deploying-Service-Broker-Polly/app
modules/45-Deploying-Service-Broker-S3/app
vcap_application.js
vcap_application.js
2:41 (100%)
2:41 (100%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
11 x 3 modules/40-Deploying-Service-Broker-Polly/app
modules/50-Deploying-Via-Apps-Manager-Console/app
modules/45-Deploying-Service-Broker-S3/app
vcap_services.js
vcap_services.js
vcap_services.js
3:14 
3:14 
3:14 
view
11 x 3 modules/40-Deploying-Service-Broker-Polly/app
modules/50-Deploying-Via-Apps-Manager-Console/app
modules/45-Deploying-Service-Broker-S3/app
vcap_services.js
vcap_services.js
vcap_services.js
15:26 
15:26 
15:26 
view
11 x 3 modules/40-Deploying-Service-Broker-Polly/app
modules/50-Deploying-Via-Apps-Manager-Console/app
modules/45-Deploying-Service-Broker-S3/app
vcap_services.js
vcap_services.js
vcap_services.js
27:38 
27:38 
27:38 
view
12 x 3 modules/40-Deploying-Ser...olly/public/javascripts
modules/50-Deploying-Via...sole/public/javascripts
modules/45-Deploying-Ser...r-S3/public/javascripts
ping.js
ping.js
ping.js
1:15 
1:15 
1:15 
view