aws-samples / aws-serverless-books-api-sample
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
  • 14% duplication:
    • 505 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 72 duplicated lines
  • 5 duplicates
system14% (72 lines)
Duplication per Extension
ts13% (36 lines)
yml14% (36 lines)
Duplication per Component (primary)
ROOT14% (36 lines)
src/books/create45% (18 lines)
src/books/get-all46% (18 lines)
pipeline/lib0% (0 lines)
src/books/create-pre-traffic0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
9 x 2 src/books/create
src/books/get-all
index.ts
index.ts
48:60 (22%)
47:59 (23%)
view
9 x 2 src/books/create
src/books/get-all
index.ts
index.ts
8:19 (22%)
8:19 (23%)
view
6 x 2 ROOT
ROOT
template.yml
template.yml
220:225 (2%)
237:242 (2%)
view
6 x 2 ROOT
ROOT
template.yml
template.yml
85:90 (2%)
113:118 (2%)
view
6 x 2 ROOT
ROOT
template.yml
template.yml
229:234 (2%)
246:251 (2%)
view