aws-samples / aws-cdk-intro-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
  • 24% duplication:
    • 8,482 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,052 duplicated lines
  • 151 duplicates
system24% (2,052 lines)
Duplication per Extension
css19% (1,179 lines)
py68% (220 lines)
js96% (208 lines)
java59% (162 lines)
html15% (116 lines)
ts27% (107 lines)
cs42% (60 lines)
Duplication per Component (primary)
workshop/themes27% (1,170 lines)
code/java68% (240 lines)
code/python68% (220 lines)
code/typescript68% (185 lines)
code/csharp58% (112 lines)
workshop/static3% (84 lines)
workshop/layouts37% (41 lines)
cdkworkshop.com0% (0 lines)
workshop/data0% (0 lines)
workshop0% (0 lines)

Duplication Between Components (50+ lines)

G workshop/static workshop/static workshop/themes workshop/themes workshop/static--workshop/themes 344 code/csharp code/csharp code/java code/java code/csharp--code/java 130 code/typescript code/typescript code/csharp--code/typescript 90 code/java--code/typescript 108 workshop/layouts workshop/layouts workshop/layouts--workshop/themes 88

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 151 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
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-blue.css
85:132 (34%)
56:103 (47%)
view
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-red.css
85:132 (34%)
56:103 (47%)
view
43 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-green.css
85:132 (34%)
56:103 (47%)
view
43 x 2 workshop/static/css
workshop/themes/learn/exampleSite/static/css
theme-mine.css
theme-mine.css
85:132 (34%)
56:103 (51%)
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
31 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view
31 x 2 workshop/layouts/partials
workshop/themes/learn/layouts/partials
header.html
header.html
41:77 (36%)
36:72 (32%)
view
29 x 2 code/python/main-workshop/cdk_workshop
code/python/pipelines-workshop/cdk_workshop
hitcounter.py
hitcounter.py
5:38 (100%)
8:41 (90%)
view
29 x 2 workshop/themes/learn/static/mermaid
workshop/themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
224:252 (11%)
226:254 (8%)
view
29 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-blue.css
19:56 (23%)
19:56 (32%)
view
26 x 2 code/java/main-workshop/src/main/java/com/myorg
code/java/pipelines-work...src/main/java/com/myorg
HitCounter.java
HitCounter.java
15:58 (100%)
15:58 (100%)
view
23 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-red.css
27:56 (18%)
27:56 (25%)
view
23 x 2 workshop/static/css
workshop/themes/learn/static/css
theme-mine.css
theme-green.css
27:56 (18%)
27:56 (25%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
24 x 2 code/csharp/main-workshop/src/CdkWorkshop
code/csharp/pipelines-workshop/src/CdkWorkshop
HitCounter.cs
HitCounter.cs
20:49 
20:49 
view
19 x 2 code/java/main-workshop/src/main/java/com/myorg
code/java/pipelines-work...src/main/java/com/myorg
HitCounter.java
HitCounter.java
19:45 
19:45 
view
18 x 2 code/typescript/main-workshop/lib
code/typescript/tests-workshop/lib
cdk-workshop-stack.ts
cdk-workshop-stack.ts
8:32 
8:32 
view
17 x 2 code/java/main-workshop/src/main/java/com/myorg
code/java/tests-workshop/src/main/java/com/myorg
CdkWorkshopStack.java
CdkWorkshopStack.java
19:44 
19:44 
view
14 x 2 code/python/main-workshop/cdk_workshop
code/python/tests-workshop/cdk_workshop
cdk_workshop_stack.py
cdk_workshop_stack.py
0:0 
0:0 
view
13 x 3 code/python/main-workshop/lambda
code/python/pipelines-workshop/lambda
code/python/tests-workshop/lambda
hitcount.py
hitcount.py
hitcount.py
0:0 
0:0 
0:0 
view
10 x 2 code/java/main-workshop/src/main/java/com/myorg
code/java/pipelines-work...src/main/java/com/myorg
HitCounterProps.java
HitCounterProps.java
23:34 
23:34 
view
8 x 3 code/python/main-workshop/lambda
code/python/pipelines-workshop/lambda
code/python/tests-workshop/lambda
hello.py
hello.py
hello.py
0:0 
0:0 
0:0 
view