microsoft / cpprestsdk
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
  • 10% duplication:
    • 24,675 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,556 duplicated lines
  • 288 duplicates
system10% (2,556 lines)
Duplication per Extension
cpp8% (925 lines)
h9% (886 lines)
hpp19% (683 lines)
yml14% (46 lines)
cmake5% (16 lines)
Duplication per Component (primary)
Release/include/cpprest11% (1,064 lines)
Release/include/pplx12% (505 lines)
Release/src/http6% (397 lines)
Release/src/streams26% (310 lines)
Release/src/websockets15% (116 lines)
Release/src/json5% (52 lines)
Release/src/utilities5% (50 lines)
azure-devops25% (30 lines)
Release/cmake5% (16 lines)
ROOT8% (16 lines)
Release/src/pch0% (0 lines)
Release/src/pplx0% (0 lines)
Release/src/uri0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 288 duplicates...
Size#FoldersFilesLinesCode
49 x 2 Release/src/websockets/client
Release/src/websockets/client
ws_client_winrt.cpp
ws_client_wspp.cpp
235:336 (20%)
473:574 (12%)
view
29 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_winrt.cpp
563:605 (7%)
294:338 (5%)
view
27 x 2 Release/include/cpprest
Release/include/cpprest
http_msg.h
http_msg.h
645:724 (5%)
1074:1154 (5%)
view
24 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_winrt.cpp
665:711 (5%)
394:442 (4%)
view
23 x 2 Release/include/pplx
Release/include/pplx
pplxlinux.h
pplxwin.h
140:186 (19%)
143:190 (20%)
view
19 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_winrt.cpp
613:657 (4%)
343:389 (3%)
view
19 x 2 Release/include/cpprest/details
Release/include/cpprest/details
SafeInt3.hpp
SafeInt3.hpp
1833:1873 (<1%)
1876:1914 (<1%)
view
18 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
6580:6612 (<1%)
6664:6696 (<1%)
view
17 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_winrt.cpp
772:792 (4%)
498:518 (3%)
view
16 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_win32.cpp
605:632 (3%)
657:684 (3%)
view
16 x 2 Release/src/http/client
Release/src/http/client
http_client_winhttp.cpp
http_client_winhttp.cpp
2107:2127 (1%)
2143:2163 (1%)
view
14 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_winrt.cpp
713:740 (3%)
444:471 (2%)
view
14 x 2 Release/include/cpprest
Release/include/cpprest
json.h
json.h
812:892 (2%)
984:1064 (2%)
view
14 x 2 Release/include/pplx
Release/include/pplx
pplxlinux.h
pplxwin.h
205:234 (12%)
200:229 (12%)
view
13 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
6664:6686 (<1%)
6735:6757 (<1%)
view
13 x 2 Release/src/streams
Release/src/streams
fileio_winrt.cpp
fileio_winrt.cpp
338:362 (2%)
389:413 (2%)
view
13 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
5767:5783 (<1%)
5817:5833 (<1%)
view
13 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
6580:6602 (<1%)
6735:6757 (<1%)
view
13 x 2 Release/include/cpprest
Release/include/cpprest
containerstream.h
rawptrstream.h
190:225 (7%)
228:263 (6%)
view
13 x 2 Release/include/cpprest/details
Release/include/cpprest/details
SafeInt3.hpp
SafeInt3.hpp
2279:2307 (<1%)
2340:2368 (<1%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 28 unit duplicates...
Size#FoldersFilesLinesCode
16 x 2 Release/src/http/common
Release/src/http/common
http_compression.cpp
http_compression.cpp
116:134 
400:418 
view
16 x 2 Release/src/http/common
Release/src/http/common
http_compression.cpp
http_compression.cpp
218:236 
542:560 
view
13 x 2 Release/include/cpprest/details
Release/include/cpprest/details
SafeInt3.hpp
SafeInt3.hpp
1834:1852 
1877:1893 
view
13 x 2 Release/include/pplx
Release/include/pplx
pplxlinux.h
pplxwin.h
156:170 
160:174 
view
12 x 2 Release/include/cpprest/details
Release/include/cpprest/details
SafeInt3.hpp
SafeInt3.hpp
1855:1870 
1896:1911 
view
12 x 2 Release/include/cpprest
Release/include/cpprest
http_msg.h
http_msg.h
715:728 
1145:1158 
view
11 x 2 Release/src/http/common
Release/src/http/common
http_compression.cpp
http_compression.cpp
759:770 
772:783 
view
11 x 2 Release/src/streams
Release/src/streams
fileio_win32.cpp
fileio_win32.cpp
315:327 
336:348 
view
10 x 2 Release/include/pplx
Release/include/pplx
pplxlinux.h
pplxwin.h
172:184 
176:188 
view
8 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
5367:5375 
5413:5421 
view
8 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
5378:5386 
5424:5432 
view
7 x 2 Release/include/cpprest
Release/include/cpprest
oauth1.h
oauth2.h
558:565 
537:544 
view
7 x 2 Release/include/pplx
Release/include/pplx
pplxcancellation_token.h
pplxcancellation_token.h
721:728 
877:884 
view
7 x 2 Release/include/pplx
Release/include/pplx
pplxcancellation_token.h
pplxcancellation_token.h
730:737 
886:893 
view
7 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
5347:5354 
5393:5400 
view
7 x 2 Release/include/pplx
Release/include/pplx
pplxtasks.h
pplxtasks.h
5357:5364 
5403:5410 
view
6 x 2 Release/include/cpprest
Release/include/cpprest
http_msg.h
http_msg.h
613:619 
1042:1048 
view
6 x 2 Release/include/cpprest
Release/include/cpprest
http_msg.h
http_msg.h
628:634 
1057:1063 
view
6 x 2 Release/include/cpprest
Release/include/cpprest
http_msg.h
http_msg.h
643:649 
1072:1078 
view
6 x 2 Release/include/cpprest
Release/include/cpprest
http_msg.h
http_msg.h
657:663 
1086:1092 
view