awslabs / amazon-pinpoint-preference-center
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,900 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 96 duplicated lines
  • 4 duplicates
system5% (96 lines)
Duplication per Extension
js6% (62 lines)
css4% (34 lines)
Duplication per Component (primary)
static-assets/css4% (34 lines)
static-assets/js10% (32 lines)
rest-api-handler8% (30 lines)
solution-helper0% (0 lines)
stream-processor0% (0 lines)
static-assets0% (0 lines)
Longest Duplicates
The list of 4 longest duplicates.
See data for all 4 duplicates...
Size#FoldersFilesLinesCode
17 x 2 source/static-assets/css
source/static-assets/css
main.css
milligram.css
9:26 (10%)
225:242 (3%)
view
16 x 2 source/static-assets/js
source/static-assets/js
main.js
main.js
60:78 (5%)
101:119 (5%)
view
8 x 2 source/rest-api-handler
source/rest-api-handler
index.js
index.js
368:375 (2%)
465:472 (2%)
view
7 x 2 source/rest-api-handler
source/rest-api-handler
index.js
index.js
385:393 (2%)
430:440 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 source/static-assets/js
source/static-assets/js
main.js
main.js
150:158 
161:169 
view