aws-samples / amazon-fraud-detector-with-cognito
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
  • 12% duplication:
    • 591 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 73 duplicated lines
  • 4 duplicates
system12% (73 lines)
Duplication per Extension
js12% (73 lines)
Duplication per Component (primary)
src/afd-post-signup-verification28% (42 lines)
lib3% (12 lines)
src/afd-cog-pre-signup15% (10 lines)
src/afd-ip-user-agent56% (9 lines)
config0% (0 lines)
Longest Duplicates
The list of 4 longest duplicates.
See data for all 4 duplicates...
Size#FoldersFilesLinesCode
14 x 2 src/afd-post-signup-verification
src/afd-post-signup-verification
afd-post-signup-verification.js
afd-post-signup-verification.js
169:184 (9%)
180:196 (9%)
view
10 x 2 src/afd-cog-pre-signup
src/afd-post-signup-verification
afd-cog-pre-signup.js
afd-post-signup-verification.js
49:60 (15%)
118:129 (6%)
view
9 x 2 src/afd-ip-user-agent
src/afd-post-signup-verification
afd-ip-user-agent.js
afd-post-signup-verification.js
19:30 (56%)
24:35 (6%)
view
6 x 2 lib
lib
afd-friction-cdk-stack.js
afd-friction-cdk-stack.js
223:229 (2%)
250:256 (2%)
view