awslabs / cdk-serverless-clamscan
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:
    • 810 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 106 duplicated lines
  • 8 duplicates
system13% (106 lines)
Duplication per Extension
ts17% (74 lines)
py8% (32 lines)
Duplication per Component (primary)
src17% (74 lines)
assets/lambda/code/scan6% (16 lines)
assets/lambda/code/download_defs21% (16 lines)
assets/lambda/code/initialize_defs_cr0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
9 x 2 assets/lambda/code/download_defs
assets/lambda/code/scan
lambda.py
lambda.py
93:101 (12%)
212:220 (3%)
view
8 x 2 src
src
index.ts
index.ts
298:305 (1%)
330:337 (1%)
view
7 x 2 src
src
index.ts
index.ts
467:474 (1%)
509:516 (1%)
view
7 x 2 assets/lambda/code/download_defs
assets/lambda/code/scan
lambda.py
lambda.py
85:91 (9%)
204:210 (2%)
view
6 x 2 src
src
index.ts
index.ts
411:417 (1%)
477:483 (1%)
view
6 x 2 src
src
index.ts
index.ts
372:378 (1%)
435:441 (1%)
view
6 x 2 src
src
index.ts
index.ts
334:339 (1%)
347:352 (1%)
view
6 x 2 src
src
index.ts
index.ts
282:287 (1%)
317:322 (1%)
view