microsoft / ctsTraffic
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
  • 36% duplication:
    • 28,112 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 10,388 duplicated lines
  • 6,741 duplicates
system36% (10,388 lines)
Duplication per Extension
cpp33% (4,332 lines)
vcxproj96% (4,037 lines)
h25% (1,389 lines)
hpp10% (523 lines)
filters35% (107 lines)
Duplication per Component (primary)
MSTest/ctsIOPatternUnitTest_Client89% (1,419 lines)
SdkChanges31% (1,247 lines)
MSTest/ctsIOPatternProtocolPolicyUnitTest71% (1,096 lines)
ctsTraffic12% (1,081 lines)
MSTest/ctsIOPatternUnitTest_Server92% (853 lines)
MSTest/ctsIOPatternStateUnitTest71% (812 lines)
MSTest/ctsSocketBrokerUnitTest68% (687 lines)
ctsPerf21% (596 lines)
MSTest/ctsIOPatternRateLimitPolicyUnitTest66% (495 lines)
MSTest/ctsMediaStreamServerConnectedSocketUnitTest76% (460 lines)
MSTest/ctsSocketUnitTest78% (362 lines)
MSTest/ctsSocketStateUnitTest79% (350 lines)
MSTest/ctsStatisticsUnitTest94% (331 lines)
MSTest/ctsMediaStreamSendBuffer76% (323 lines)
ctl8% (276 lines)

Duplication Between Components (50+ lines)

G MSTest/ctsIOPatternUnitTest_Client MSTest/ctsIOPatternUnitTest_Client MSTest/ctsIOPatternUnitTest_Server MSTest/ctsIOPatternUnitTest_Server MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsIOPatternUnitTest_Server 1141 MSTest/ctsSocketUnitTest MSTest/ctsSocketUnitTest MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsSocketUnitTest 592 MSTest/ctsStatisticsUnitTest MSTest/ctsStatisticsUnitTest MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsStatisticsUnitTest 592 MSTest/ctsSocketStateUnitTest MSTest/ctsSocketStateUnitTest MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsSocketStateUnitTest 586 MSTest/ctsSocketBrokerUnitTest MSTest/ctsSocketBrokerUnitTest MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsSocketBrokerUnitTest 580 MSTest/ctsMediaStreamServerConnectedSocketUnitTest MSTest/ctsMediaStreamServerConnectedSocketUnitTest MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsMediaStreamServerConnectedSocketUnitTest 561 MSTest/ctsMediaStreamSendBuffer MSTest/ctsMediaStreamSendBuffer MSTest/ctsIOPatternUnitTest_Client--MSTest/ctsMediaStreamSendBuffer 546 MSTest/ctsIOPatternUnitTest_Server--MSTest/ctsSocketUnitTest 592 MSTest/ctsIOPatternUnitTest_Server--MSTest/ctsStatisticsUnitTest 592 MSTest/ctsIOPatternUnitTest_Server--MSTest/ctsSocketStateUnitTest 586 MSTest/ctsIOPatternUnitTest_Server--MSTest/ctsSocketBrokerUnitTest 580 MSTest/ctsIOPatternUnitTest_Server--MSTest/ctsMediaStreamServerConnectedSocketUnitTest 561 MSTest/ctsIOPatternUnitTest_Server--MSTest/ctsMediaStreamSendBuffer 546 MSTest/ctsIOPatternProtocolPolicyUnitTest MSTest/ctsIOPatternProtocolPolicyUnitTest MSTest/ctsIOPatternStateUnitTest MSTest/ctsIOPatternStateUnitTest MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsIOPatternStateUnitTest 704 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsStatisticsUnitTest 640 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsIOPatternUnitTest_Server 612 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsIOPatternUnitTest_Client 612 MSTest/ctsIOPatternRateLimitPolicyUnitTest MSTest/ctsIOPatternRateLimitPolicyUnitTest MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsIOPatternRateLimitPolicyUnitTest 604 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsSocketUnitTest 602 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsMediaStreamServerConnectedSocketUnitTest 593 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsSocketStateUnitTest 562 MSTest/ctsIOPatternProtocolPolicyUnitTest--MSTest/ctsSocketBrokerUnitTest 556 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsStatisticsUnitTest 638 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsIOPatternUnitTest_Client 618 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsIOPatternUnitTest_Server 618 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsSocketUnitTest 610 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsMediaStreamServerConnectedSocketUnitTest 609 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsSocketStateUnitTest 568 MSTest/ctsIOPatternStateUnitTest--MSTest/ctsSocketBrokerUnitTest 562 ctsPerf ctsPerf ctsTraffic ctsTraffic ctsPerf--ctsTraffic 646 MSTest/ctsSocketStateUnitTest--MSTest/ctsSocketUnitTest 618 MSTest/ctsSocketStateUnitTest--MSTest/ctsStatisticsUnitTest 568 MSTest/ctsSocketUnitTest--MSTest/ctsStatisticsUnitTest 610 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsStatisticsUnitTest 616 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsSocketUnitTest 602 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsIOPatternStateUnitTest 602 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsIOPatternUnitTest_Client 586 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsIOPatternUnitTest_Server 586 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsMediaStreamServerConnectedSocketUnitTest 571 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsSocketStateUnitTest 562 MSTest/ctsIOPatternRateLimitPolicyUnitTest--MSTest/ctsSocketBrokerUnitTest 556 MSTest/ctsSocketBrokerUnitTest--MSTest/ctsSocketStateUnitTest 610 MSTest/ctsSocketBrokerUnitTest--MSTest/ctsSocketUnitTest 562 MSTest/ctsSocketBrokerUnitTest--MSTest/ctsStatisticsUnitTest 562 MSTest/ctsMediaStreamServerConnectedSocketUnitTest--MSTest/ctsStatisticsUnitTest 593 MSTest/ctsMediaStreamServerConnectedSocketUnitTest--MSTest/ctsSocketUnitTest 579 MSTest/ctsMediaStreamServerConnectedSocketUnitTest--MSTest/ctsSocketStateUnitTest 525 MSTest/ctsMediaStreamServerConnectedSocketUnitTest--MSTest/ctsSocketBrokerUnitTest 524 MSTest/ctsMediaStreamSendBuffer--MSTest/ctsSocketStateUnitTest 552 MSTest/ctsMediaStreamSendBuffer--MSTest/ctsSocketBrokerUnitTest 548

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 6,741 duplicates...
Size#FoldersFilesLinesCode
274 x 2 MSTest/ctsIOPatternProtocolPolicyUnitTest
MSTest/ctsIOPatternRateLimitPolicyUnitTest
vcxproj
ctsIOPatternProtocolPolicyUnitTest.vc...
ctsIOPatternRateLimitPolicyUnitTest.v...
48:379 (88%)
48:379 (88%)
view
272 x 2 MSTest/ctsIOPatternUnitTest_Client
MSTest/ctsIOPatternUnitTest_Server
vcxproj
ctsIOPatternUnitTest_Client.vcxproj
ctsIOPatternUnitTest_Server.vcxproj
39:366 (87%)
39:366 (87%)
view
268 x 2 MSTest/ctsSocketUnitTest
MSTest/ctsStatisticsUnitTest
vcxproj
ctsSocketUnitTest.vcxproj
ctsStatisticsUnitTest.vcxproj
41:364 (86%)
41:364 (86%)
view
268 x 2 MSTest/ctsIOPatternStateUnitTest
MSTest/ctsSocketUnitTest
vcxproj
ctsIOPatternStateUnitTest.vcxproj
ctsSocketUnitTest.vcxproj
41:364 (86%)
41:364 (86%)
view
268 x 2 MSTest/ctsIOPatternStateUnitTest
MSTest/ctsStatisticsUnitTest
vcxproj
ctsIOPatternStateUnitTest.vcxproj
ctsStatisticsUnitTest.vcxproj
41:364 (86%)
41:364 (86%)
view
267 x 2 MSTest/ctsIOPatternRateLimitPolicyUnitTest
MSTest/ctsSocketUnitTest
vcxproj
ctsIOPatternRateLimitPolicyUnitTest.v...
ctsSocketUnitTest.vcxproj
48:368 (86%)
41:361 (86%)
view
267 x 2 MSTest/ctsIOPatternProtocolPolicyUnitTest
MSTest/ctsSocketUnitTest
vcxproj
ctsIOPatternProtocolPolicyUnitTest.vc...
ctsSocketUnitTest.vcxproj
48:368 (86%)
41:361 (86%)
view
267 x 2 MSTest/ctsIOPatternRateLimitPolicyUnitTest
MSTest/ctsIOPatternStateUnitTest
vcxproj
ctsIOPatternRateLimitPolicyUnitTest.v...
ctsIOPatternStateUnitTest.vcxproj
48:368 (86%)
41:361 (86%)
view
267 x 2 MSTest/ctsIOPatternProtocolPolicyUnitTest
MSTest/ctsIOPatternStateUnitTest
vcxproj
ctsIOPatternProtocolPolicyUnitTest.vc...
ctsIOPatternStateUnitTest.vcxproj
48:368 (86%)
41:361 (86%)
view
267 x 2 MSTest/ctsIOPatternRateLimitPolicyUnitTest
MSTest/ctsStatisticsUnitTest
vcxproj
ctsIOPatternRateLimitPolicyUnitTest.v...
ctsStatisticsUnitTest.vcxproj
48:368 (86%)
41:361 (86%)
view
267 x 2 MSTest/ctsIOPatternProtocolPolicyUnitTest
MSTest/ctsStatisticsUnitTest
vcxproj
ctsIOPatternProtocolPolicyUnitTest.vc...
ctsStatisticsUnitTest.vcxproj
48:368 (86%)
41:361 (86%)
view
199 x 2 MSTest/ctsIOPatternProtocolPolicyUnitTest
MSTest/ctsIOPatternUnitTest_Server
vcxproj
ctsIOPatternProtocolPolicyUnitTest.vc...
ctsIOPatternUnitTest_Server.vcxproj
48:291 (64%)
41:284 (63%)
view
199 x 2 MSTest/ctsIOPatternUnitTest_Server
MSTest/ctsSocketUnitTest
vcxproj
ctsIOPatternUnitTest_Server.vcxproj
ctsSocketUnitTest.vcxproj
41:284 (63%)
41:284 (64%)
view
199 x 2 MSTest/ctsIOPatternUnitTest_Server
MSTest/ctsStatisticsUnitTest
vcxproj
ctsIOPatternUnitTest_Server.vcxproj
ctsStatisticsUnitTest.vcxproj
41:284 (63%)
41:284 (64%)
view
199 x 2 MSTest/ctsIOPatternRateLimitPolicyUnitTest
MSTest/ctsIOPatternUnitTest_Client
vcxproj
ctsIOPatternRateLimitPolicyUnitTest.v...
ctsIOPatternUnitTest_Client.vcxproj
48:291 (64%)
41:284 (63%)
view
199 x 2 MSTest/ctsIOPatternStateUnitTest
MSTest/ctsIOPatternUnitTest_Client
vcxproj
ctsIOPatternStateUnitTest.vcxproj
ctsIOPatternUnitTest_Client.vcxproj
41:284 (64%)
41:284 (63%)
view
199 x 2 MSTest/ctsIOPatternStateUnitTest
MSTest/ctsIOPatternUnitTest_Server
vcxproj
ctsIOPatternStateUnitTest.vcxproj
ctsIOPatternUnitTest_Server.vcxproj
41:284 (64%)
41:284 (63%)
view
199 x 2 MSTest/ctsIOPatternProtocolPolicyUnitTest
MSTest/ctsIOPatternUnitTest_Client
vcxproj
ctsIOPatternProtocolPolicyUnitTest.vc...
ctsIOPatternUnitTest_Client.vcxproj
48:291 (64%)
41:284 (63%)
view
199 x 2 MSTest/ctsIOPatternUnitTest_Client
MSTest/ctsSocketUnitTest
vcxproj
ctsIOPatternUnitTest_Client.vcxproj
ctsSocketUnitTest.vcxproj
41:284 (63%)
41:284 (64%)
view
199 x 2 MSTest/ctsIOPatternRateLimitPolicyUnitTest
MSTest/ctsIOPatternUnitTest_Server
vcxproj
ctsIOPatternRateLimitPolicyUnitTest.v...
ctsIOPatternUnitTest_Server.vcxproj
48:291 (64%)
41:284 (63%)
view
Duplicated Units
The list of top 19 duplicated units.
See data for all 19 unit duplicates...
Size#FoldersFilesLinesCode
29 x 2 ctsTraffic
ctsTraffic
ctsPrintStatus.hpp
ctsPrintStatus.hpp
252:285 
287:320 
view
24 x 2 MSTest/ctsSocketStateUnitTest
MSTest/ctsSocketUnitTest
ctsSocketStateUnitTest.cpp
ctsSocketUnitTest.cpp
85:109 
105:129 
view
20 x 2 MSTest/ctsIOPatternUnitTest_Client
MSTest/ctsIOPatternUnitTest_Server
ctsIOPatternUnitTest_Client.cpp
ctsIOPatternUnitTest_Server.cpp
35:55 
33:53 
view
14 x 2 ctsTraffic
ctsTraffic
ctsIOPattern.cpp
ctsIOPattern.cpp
817:833 
879:895 
view
13 x 2 MSTest/ctsMediaStreamServerConnectedSocketUnitTest
MSTest/ctsMediaStreamServerConnectedSocketUnitTest
ctsMediaStreamServerConnectedSocketUn...
ctsMediaStreamServerConnectedSocketUn...
310:326 
356:372 
view
13 x 2 ctsTraffic
ctsTraffic
ctsIOPattern.cpp
ctsIOPattern.cpp
835:849 
897:911 
view
11 x 2 ctl
ctl
ctSockaddr.hpp
ctSockaddr.hpp
247:258 
456:467 
view
10 x 2 ctl
ctl
ctWmiPerformance.hpp
ctWmiPerformance.hpp
1375:1386 
1389:1400 
view
10 x 2 ctsTraffic
ctsTraffic
ctsPrintStatus.hpp
ctsPrintStatus.hpp
240:250 
322:332 
view
9 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
64:73 
83:92 
view
9 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
102:111 
121:130 
view
9 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
140:149 
159:168 
view
8 x 2 MSTest/ctsSocketBrokerUnitTest
MSTest/ctsSocketStateUnitTest
ctsSocketBrokerUnitTest.cpp
ctsSocketStateUnitTest.cpp
39:48 
48:57 
view
7 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
267:274 
288:295 
view
7 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
309:316 
331:338 
view
6 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
56:62 
75:81 
view
6 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
132:138 
170:176 
view
6 x 2 ctl
ctl
ctWmiVariant.hpp
ctWmiVariant.hpp
151:157 
189:195 
view
6 x 2 ctsTraffic
ctsTraffic
ctsIOPatternProtocolPolicy.hpp
ctsIOPatternState.hpp
342:348 
247:253 
view