aws-samples / serverless-container-constructs
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
  • 13% duplication:
    • 435 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 60 duplicated lines
  • 5 duplicates
system13% (60 lines)
Duplication per Extension
ts15% (60 lines)
Duplication per Component (primary)
src16% (60 lines)
src/common0% (0 lines)
services/CommonService0% (0 lines)
services/OrderService0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
14 x 2 src
src
alb-fargate-svcs.ts
main.ts
160:175 (11%)
192:207 (12%)
view
7 x 2 src
src
integ.default.ts
integ.default.ts
52:58 (6%)
70:76 (6%)
view
6 x 2 src
src
alb-fargate-svcs.ts
main.ts
127:134 (5%)
182:189 (5%)
view
6 x 2 src
src
integ.default.ts
integ.default.ts
34:39 (5%)
53:58 (5%)
view
6 x 2 src
src
integ.default.ts
integ.default.ts
34:39 (5%)
71:76 (5%)
view