awslabs / amazon-kinesis-video-streams-pic
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
  • 24% duplication:
    • 33,062 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 8,265 duplicated lines
  • 2,232 duplicates
system24% (8,265 lines)
Duplication per Extension
cpp40% (7,098 lines)
c7% (949 lines)
h6% (218 lines)
Duplication per Component (primary)
src/client33% (4,861 lines)
src/mkvgen25% (1,153 lines)
src/utils12% (890 lines)
src/view43% (819 lines)
src/heap13% (434 lines)
src/trace8% (43 lines)
src/common13% (38 lines)
src/state7% (27 lines)
CMake0% (0 lines)
src/duration0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 2,232 duplicates...
Size#FoldersFilesLinesCode
49 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
933:1020 (5%)
1032:1119 (5%)
view
44 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
846:921 (4%)
1144:1220 (4%)
view
44 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
846:921 (4%)
1043:1119 (4%)
view
44 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
846:921 (4%)
944:1020 (4%)
view
44 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
944:1020 (4%)
1144:1220 (4%)
view
44 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
1043:1119 (4%)
1144:1220 (4%)
view
44 x 2 src/view/tst
src/view/tst
ViewApiFunctionalityTest.cpp
ViewApiFunctionalityTest.cpp
139:197 (4%)
210:268 (4%)
view
38 x 2 src/mkvgen/tst
src/mkvgen/tst
AnnexBNalAdapterTest.cpp
SpsParserTest.cpp
313:357 (11%)
201:245 (16%)
view
37 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
310:368 (3%)
503:561 (3%)
view
37 x 2 src/mkvgen/tst
src/mkvgen/tst
AnnexBCpdNalAdapterTest.cpp
AnnexBNalAdapterTest.cpp
118:161 (27%)
313:356 (11%)
view
37 x 2 src/mkvgen/tst
src/mkvgen/tst
AnnexBCpdNalAdapterTest.cpp
SpsParserTest.cpp
118:161 (27%)
201:244 (15%)
view
37 x 2 src/view/tst
src/view/tst
ViewApiFunctionalityTest.cpp
ViewApiFunctionalityTest.cpp
781:827 (3%)
976:1022 (3%)
view
34 x 2 src/client/tst
src/client/tst
StreamRecoveryFunctionalityTest.cpp
StreamRecoveryFunctionalityTest.cpp
477:524 (4%)
596:643 (4%)
view
32 x 2 src/view/tst
src/view/tst
ViewDropPolicyFunctionalityTest.cpp
ViewDropPolicyFunctionalityTest.cpp
21:64 (17%)
83:125 (17%)
view
32 x 2 src/mkvgen/tst
src/mkvgen/tst
MkvgenApiFunctionalityTest.cpp
MkvgenApiFunctionalityTest.cpp
628:678 (2%)
711:761 (2%)
view
31 x 2 src/client/tst
src/client/tst
StreamPutGetTest.cpp
StreamPutGetTest.cpp
105:152 (3%)
200:247 (3%)
view
31 x 2 src/client/tst
src/client/tst
StreamApiFunctionalityTest.cpp
StreamApiFunctionalityTest.cpp
914:961 (2%)
1076:1123 (2%)
view
31 x 2 src/client/tst
src/client/tst
StreamApiFunctionalityTest.cpp
StreamApiFunctionalityTest.cpp
914:961 (2%)
1157:1204 (2%)
view
31 x 2 src/client/tst
src/client/tst
StreamApiFunctionalityTest.cpp
StreamApiFunctionalityTest.cpp
914:961 (2%)
1384:1431 (2%)
view
31 x 2 src/client/tst
src/client/tst
StreamRecoveryFunctionalityTest.cpp
StreamRecoveryFunctionalityTest.cpp
378:422 (3%)
599:643 (3%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
10 x 9 src/client/tst
src/client/tst
src/client/tst
src/client/tst
src/client/tst
src/client/tst
src/client/tst
src/client/tst
src/client/tst
AcksFunctionalityTest.cpp
StreamApiFunctionalityScenarioTest.cpp
StreamFunctionalityTest.cpp
StreamRecoveryFunctionalityTest.cpp
TokenRotationFunctionalityTest.cpp
IntermittentProducerFunctionalityTest...
CallbacksAndPressuresFunctionalityTes...
StreamStoppingFunctionalityTest.cpp
StateTransitionFunctionalityTest.cpp
11:22 
11:22 
12:23 
12:23 
12:23 
11:22 
12:23 
12:23 
11:22 
view
7 x 2 src/utils/src
src/utils/src
SingleLinkedList.c
DoubleLinkedList.c
286:296 
295:305 
view
7 x 2 src/utils/src
src/utils/src
SingleLinkedList.c
DoubleLinkedList.c
301:311 
310:320 
view
7 x 2 src/utils/src
src/utils/src
SingleLinkedList.c
DoubleLinkedList.c
352:362 
361:371 
view
7 x 2 src/utils/src
src/utils/src
SingleLinkedList.c
DoubleLinkedList.c
367:377 
376:386 
view
7 x 2 src/utils/src
src/utils/src
SingleLinkedList.c
DoubleLinkedList.c
382:392 
406:416 
view