aws-samples / amazon-ivs-ecommerce-web-demo
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
  • 5% duplication:
    • 1,584 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 88 duplicated lines
  • 7 duplicates
system5% (88 lines)
Duplication per Extension
css5% (50 lines)
js24% (38 lines)
Duplication per Component (primary)
serverless/lambda67% (38 lines)
web-ui/src/components/productList13% (27 lines)
web-ui/src3% (23 lines)
serverless0% (0 lines)
web-ui/src/components0% (0 lines)
web-ui/src/components/videoPlayer0% (0 lines)
web-ui/src/components/modal0% (0 lines)
web-ui/src/components/navigation0% (0 lines)
web-ui/src/components/liveExperts0% (0 lines)
web-ui/src/components/webECommerce0% (0 lines)
web-ui/public0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
19 x 2 serverless/lambda
serverless/lambda
app.js
app.js
24:42 (33%)
49:67 (33%)
view
9 x 2 web-ui/src/components/productList
web-ui/src/components/productList
ProductList.css
ProductList.css
72:80 (10%)
83:91 (10%)
view
9 x 2 web-ui/src/components/productList
web-ui/src/components/productList
ProductList.css
ProductList.css
83:91 (10%)
94:102 (10%)
view
9 x 2 web-ui/src/components/productList
web-ui/src/components/productList
ProductList.css
ProductList.css
72:80 (10%)
94:102 (10%)
view
8 x 2 web-ui/src
web-ui/src
index.css
index.css
90:97 (1%)
107:114 (1%)
view
7 x 2 web-ui/src
web-ui/src
index.css
index.css
23:29 (1%)
91:97 (1%)
view
7 x 2 web-ui/src
web-ui/src
index.css
index.css
23:29 (1%)
108:114 (1%)
view