aws-samples / aws-deeplens-recipes
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
  • 20% duplication:
    • 8,266 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,720 duplicated lines
  • 83 duplicates
system20% (1,720 lines)
Duplication per Extension
css19% (1,185 lines)
py40% (374 lines)
html17% (161 lines)
Duplication per Component (primary)
themes/learn/static31% (1,011 lines)
static/code/worker-safety44% (187 lines)
static/code/trash-sorter82% (187 lines)
themes/learn/exampleSite50% (110 lines)
static/css3% (90 lines)
themes/learn/layouts12% (72 lines)
layouts90% (37 lines)
layouts/shortcodes21% (26 lines)
static/code/coffee-counter0% (0 lines)
static0% (0 lines)
ROOT0% (0 lines)
layouts/partials0% (0 lines)
themes/learn0% (0 lines)
themes/learn/i18n0% (0 lines)

Duplication Between Components (50+ lines)

G static/code/trash-sorter static/code/trash-sorter static/code/worker-safety static/code/worker-safety static/code/trash-sorter--static/code/worker-safety 374 themes/learn/exampleSite themes/learn/exampleSite themes/learn/static themes/learn/static themes/learn/exampleSite--themes/learn/static 304 static/css static/css static/css--themes/learn/exampleSite 131 static/css--themes/learn/static 303 layouts layouts themes/learn/layouts themes/learn/layouts layouts--themes/learn/layouts 74 layouts/shortcodes layouts/shortcodes layouts/shortcodes--themes/learn/exampleSite 52

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 83 duplicates...
Size#FoldersFilesLinesCode
84 x 2 themes/learn/exampleSite/static/css
themes/learn/static/css
theme-mine.css
theme-green.css
2:103 (100%)
2:103 (93%)
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
67 x 2 static/code/trash-sorter...sh-lambda/greengrasssdk
static/code/worker-safet...ns-lambda/greengrasssdk
Lambda.py
Lambda.py
18:135 (100%)
18:135 (100%)
view
67 x 2 static/code/trash-sorter...sh-lambda/greengrasssdk
static/code/worker-safet...ns-lambda/greengrasssdk
IoTDataPlane.py
IoTDataPlane.py
16:153 (100%)
16:153 (100%)
view
65 x 2 themes/learn/exampleSite/static/css
themes/learn/static/css
theme-mine.css
theme-red.css
27:103 (77%)
27:103 (72%)
view
65 x 2 themes/learn/exampleSite/static/css
themes/learn/static/css
theme-mine.css
theme-blue.css
27:103 (77%)
27:103 (72%)
view
63 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
101:168 (24%)
103:170 (18%)
view
52 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-blue.css
56:115 (28%)
52:111 (57%)
view
52 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-green.css
56:115 (28%)
52:111 (57%)
view
52 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-red.css
56:115 (28%)
52:111 (57%)
view
46 x 2 static/css
themes/learn/exampleSite/static/css
theme-mine.css
theme-mine.css
56:107 (25%)
52:103 (54%)
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 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
33:63 (11%)
35:65 (9%)
view
29 x 2 themes/learn/static/mermaid
themes/learn/static/mermaid
mermaid.css
mermaid.forest.css
224:252 (11%)
226:254 (8%)
view
26 x 2 static/code/trash-sorter/deeplens-trash-lambda
static/code/worker-safety/deeplens-lambda
utils.py
lambda_function.py
6:63 (100%)
40:97 (22%)
view
26 x 2 layouts/shortcodes
themes/learn/exampleSite/layouts/shortcodes
ghcontributors.html
ghcontributors.html
1:30 (100%)
1:30 (100%)
view
26 x 2 static/css
themes/learn/static/css
theme-mine.css
theme-blue.css
19:52 (14%)
19:52 (28%)
view
21 x 2 static/code/trash-sorter...bda/greengrasssdk/utils
static/code/worker-safet...bda/greengrasssdk/utils
testing.py
testing.py
10:35 (100%)
10:35 (100%)
view
Duplicated Units
The list of top 14 duplicated units.
See data for all 14 unit duplicates...
Size#FoldersFilesLinesCode
34 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
Lambda.py
Lambda.py
0:0 
0:0 
view
21 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
IoTDataPlane.py
IoTDataPlane.py
0:0 
0:0 
view
25 x 2 static/code/worker-safet...bda/greengrasssdk/utils
static/code/trash-sorter...bda/greengrasssdk/utils
testing.py
testing.py
0:0 
0:0 
view
25 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
Lambda.py
Lambda.py
0:0 
0:0 
view
26 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
IoTDataPlane.py
IoTDataPlane.py
0:0 
0:0 
view
20 x 2 static/code/worker-safety/deeplens-lambda
static/code/trash-sorter/deeplens-trash-lambda
lambda_function.py
utils.py
0:0 
0:0 
view
7 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
client.py
client.py
0:0 
0:0 
view
13 x 2 static/code/worker-safety/deeplens-lambda
static/code/trash-sorter/deeplens-trash-lambda
lambda_function.py
utils.py
0:0 
0:0 
view
14 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
IoTDataPlane.py
IoTDataPlane.py
0:0 
0:0 
view
17 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
IoTDataPlane.py
IoTDataPlane.py
0:0 
0:0 
view
14 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
IoTDataPlane.py
IoTDataPlane.py
0:0 
0:0 
view
9 x 2 static/code/worker-safety/deeplens-lambda
static/code/trash-sorter/deeplens-trash-lambda
lambda_function.py
utils.py
0:0 
0:0 
view
6 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
Lambda.py
Lambda.py
0:0 
0:0 
view
7 x 2 static/code/worker-safet...ns-lambda/greengrasssdk
static/code/trash-sorter...sh-lambda/greengrasssdk
Lambda.py
Lambda.py
0:0 
0:0 
view