aws-solutions / live-streaming-on-aws-with-mediastore
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
  • 16% duplication:
    • 870 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 142 duplicated lines
  • 13 duplicates
system16% (142 lines)
Duplication per Extension
js19% (90 lines)
ts12% (52 lines)
Duplication per Component (primary)
source/custom-resource/lib/medialive27% (76 lines)
source/constructs/lib12% (52 lines)
source/custom-resource/lib/cfn21% (7 lines)
source/custom-resource/lib/metrics22% (7 lines)
source/constructs0% (0 lines)
source/custom-resource0% (0 lines)
deployment/cdk-solution-helper0% (0 lines)
Longest Duplicates
The list of 13 longest duplicates.
See data for all 13 duplicates...
Size#FoldersFilesLinesCode
17 x 2 source/custom-resource/lib/medialive
source/custom-resource/lib/medialive
index.js
index.js
60:76 (6%)
100:116 (6%)
view
9 x 2 source/custom-resource/lib/medialive
source/custom-resource/lib/medialive
index.js
index.js
39:48 (3%)
181:190 (3%)
view
8 x 2 source/custom-resource/lib/medialive
source/custom-resource/lib/medialive
index.js
index.js
61:68 (2%)
150:157 (2%)
view
8 x 2 source/custom-resource/lib/medialive
source/custom-resource/lib/medialive
index.js
index.js
200:207 (2%)
359:366 (2%)
view
8 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
390:397 (1%)
410:417 (1%)
view
8 x 2 source/custom-resource/lib/medialive
source/custom-resource/lib/medialive
index.js
index.js
101:108 (2%)
150:157 (2%)
view
7 x 2 source/custom-resource/lib/cfn
source/custom-resource/lib/metrics
index.js
index.js
37:47 (21%)
37:47 (22%)
view
6 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
441:446 (1%)
459:464 (1%)
view
6 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
450:455 (1%)
459:464 (1%)
view
6 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
441:446 (1%)
450:455 (1%)
view
6 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
392:397 (1%)
432:437 (1%)
view
6 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
381:386 (1%)
401:406 (1%)
view
6 x 2 source/constructs/lib
source/constructs/lib
live-streaming.ts
live-streaming.ts
412:417 (1%)
432:437 (1%)
view