aws-samples / amazon-qldb-kvs-nodejs
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
  • 18% duplication:
    • 1,250 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 233 duplicated lines
  • 24 duplicates
system18% (233 lines)
Duplication per Extension
ts18% (233 lines)
Duplication per Component (primary)
src18% (233 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 24 duplicates...
Size#FoldersFilesLinesCode
28 x 2 src
src
GetMetadata.ts
GetMetadata.ts
147:177 (17%)
247:277 (17%)
view
13 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
501:517 (2%)
539:555 (2%)
view
9 x 2 src
src
GetMetadata.ts
GetMetadata.ts
118:130 (5%)
219:231 (5%)
view
9 x 2 src
src
Verifier.ts
VerifyRevisionHash.ts
76:86 (15%)
62:72 (18%)
view
8 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
487:494 (1%)
568:575 (1%)
view
8 x 2 src
src
GetMetadata.ts
VerifyLedgerMetadata.ts
154:162 (5%)
60:68 (9%)
view
8 x 2 src
src
GetMetadata.ts
VerifyLedgerMetadata.ts
254:262 (5%)
60:68 (9%)
view
7 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
208:214 (1%)
568:574 (1%)
view
7 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
364:374 (1%)
398:408 (1%)
view
7 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
539:549 (1%)
582:592 (1%)
view
7 x 2 src
src
Verifier.ts
VerifyRevisionHash.ts
121:129 (11%)
25:33 (14%)
view
7 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
208:214 (1%)
487:493 (1%)
view
7 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
501:511 (1%)
582:592 (1%)
view
6 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
285:294 (1%)
364:373 (1%)
view
6 x 2 src
src
GetRevision.ts
GetRevision.ts
74:80 (12%)
101:107 (12%)
view
6 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
261:266 (1%)
487:492 (1%)
view
6 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
244:253 (1%)
364:373 (1%)
view
6 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
261:266 (1%)
568:573 (1%)
view
6 x 2 src
src
GetDocument.ts
GetDocumentHistory.ts
154:160 (5%)
96:102 (11%)
view
6 x 2 src
src
QLDBKVS.ts
QLDBKVS.ts
285:294 (1%)
398:407 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
12 x 2 src
src
VerifyRevisionHash.ts
Verifier.ts
61:73 
75:87 
view