aws-solutions / serverless-image-handler
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
  • 2% duplication:
    • 2,436 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 52 duplicated lines
  • 6 duplicates
system2% (52 lines)
Duplication per Extension
js29% (36 lines)
ts<1% (16 lines)
Duplication per Component (primary)
constructs/lib/back-end12% (16 lines)
solution-utils22% (12 lines)
custom-resource3% (12 lines)
image-handler<1% (6 lines)
constructs54% (6 lines)
constructs/lib/common-resources0% (0 lines)
constructs/lib0% (0 lines)
constructs/lib/front-end0% (0 lines)
constructs/utils0% (0 lines)
demo-ui0% (0 lines)
custom-resource/lib0% (0 lines)
image-handler/lib0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
12 x 2 source/custom-resource
source/solution-utils
jest.config.js
jest.config.js
1:12 (100%)
1:12 (100%)
view
8 x 2 source/constructs/lib/back-end
source/constructs/lib/back-end
back-end-construct.ts
back-end-construct.ts
99:107 (6%)
111:119 (6%)
view
6 x 2 source/custom-resource
source/image-handler
jest.config.js
jest.config.js
1:6 (50%)
1:6 (66%)
view
6 x 2 source/constructs
source/custom-resource
jest.config.js
jest.config.js
4:9 (54%)
4:9 (50%)
view
6 x 2 source/image-handler
source/solution-utils
jest.config.js
jest.config.js
1:6 (66%)
1:6 (50%)
view
6 x 2 source/constructs
source/solution-utils
jest.config.js
jest.config.js
4:9 (54%)
4:9 (50%)
view