microsoft / SPTAG
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
  • 23% duplication:
    • 19,026 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,420 duplicated lines
  • 873 duplicates
system23% (4,420 lines)
Duplication per Extension
vcxproj78% (1,926 lines)
cpp19% (1,206 lines)
h8% (604 lines)
filters50% (410 lines)
hxx11% (188 lines)
i24% (86 lines)
Duplication per Component (primary)
AnnService68% (1,528 lines)
AnnService/src/Core34% (860 lines)
Wrappers76% (808 lines)
AnnService/inc/Core9% (543 lines)
AnnService/inc/Helper10% (142 lines)
AnnService/inc/SSDServing11% (107 lines)
AnnService/src/BalancedDataPartition14% (106 lines)
AnnService/src/Helper12% (105 lines)
Wrappers/inc17% (86 lines)
Wrappers/src10% (44 lines)
AnnService/src/Socket3% (24 lines)
AnnService/src/IndexBuilder29% (18 lines)
AnnService/src/IndexSearcher8% (18 lines)
AnnService/src/Aggregator5% (17 lines)
AnnService/src/Server1% (7 lines)
AnnService/src/Client4% (7 lines)
ROOT0% (0 lines)
AnnService/inc/Aggregator0% (0 lines)
AnnService/inc/Client0% (0 lines)
AnnService/inc/Server0% (0 lines)
AnnService/inc/Socket0% (0 lines)
AnnService/src/SSDServing0% (0 lines)

Duplication Between Components (50+ lines)

G AnnService AnnService Wrappers Wrappers AnnService--Wrappers 1307 AnnService/inc/SSDServing AnnService/inc/SSDServing AnnService/src/Core AnnService/src/Core AnnService/inc/SSDServing--AnnService/src/Core 130 AnnService/inc/Core AnnService/inc/Core AnnService/inc/Core--AnnService/src/Core 98

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 873 duplicates...
Size#FoldersFilesLinesCode
71 x 2 AnnService
AnnService
filters
CoreLibrary.vcxproj.filters
GPUCoreLibrary.vcxproj.filters
54:158 (37%)
57:161 (35%)
view
62 x 2 AnnService/src/Core/BKT
AnnService/src/Core/KDT
BKTIndex.cpp
KDTIndex.cpp
425:520 (18%)
351:447 (19%)
view
55 x 2 AnnService
AnnService
vcxproj
Client.vcxproj
Server.vcxproj
25:97 (49%)
25:97 (46%)
view
50 x 2 AnnService
AnnService
vcxproj
IndexBuilder.vcxproj
IndexSearcher.vcxproj
78:141 (37%)
79:142 (37%)
view
45 x 2 AnnService
AnnService
vcxproj
BalancedDataPartition.vcxproj
IndexSearcher.vcxproj
86:141 (39%)
87:142 (33%)
view
45 x 2 AnnService
AnnService
vcxproj
BalancedDataPartition.vcxproj
IndexBuilder.vcxproj
86:141 (39%)
86:141 (34%)
view
44 x 2 AnnService
AnnService
vcxproj
Aggregator.vcxproj
Server.vcxproj
25:80 (30%)
25:80 (36%)
view
44 x 2 AnnService
AnnService
vcxproj
Aggregator.vcxproj
Client.vcxproj
25:80 (30%)
25:80 (39%)
view
38 x 2 AnnService
AnnService
vcxproj
BalancedDataPartition.vcxproj
IndexBuilder.vcxproj
25:73 (33%)
25:73 (28%)
view
37 x 2 Wrappers
Wrappers
vcxproj
CsharpCore.vcxproj
PythonCore.vcxproj
25:72 (37%)
25:72 (37%)
view
37 x 2 Wrappers
Wrappers
vcxproj
JavaClient.vcxproj
PythonClient.vcxproj
25:72 (25%)
26:73 (25%)
view
37 x 2 Wrappers
Wrappers
vcxproj
CsharpClient.vcxproj
JavaClient.vcxproj
25:72 (25%)
25:72 (25%)
view
37 x 2 Wrappers
Wrappers
vcxproj
JavaCore.vcxproj
PythonCore.vcxproj
25:72 (37%)
25:72 (37%)
view
37 x 2 AnnService
AnnService
vcxproj
IndexBuilder.vcxproj
IndexSearcher.vcxproj
27:73 (28%)
28:74 (27%)
view
37 x 2 Wrappers
Wrappers
vcxproj
CsharpClient.vcxproj
PythonClient.vcxproj
25:72 (25%)
26:73 (25%)
view
37 x 2 AnnService
AnnService
vcxproj
BalancedDataPartition.vcxproj
IndexSearcher.vcxproj
27:73 (32%)
28:74 (27%)
view
37 x 2 Wrappers
Wrappers
vcxproj
CsharpCore.vcxproj
JavaCore.vcxproj
25:72 (37%)
25:72 (37%)
view
36 x 2 AnnService
AnnService
vcxproj
Aggregator.vcxproj
IndexBuilder.vcxproj
25:70 (25%)
25:70 (27%)
view
36 x 2 AnnService
AnnService
vcxproj
Aggregator.vcxproj
BalancedDataPartition.vcxproj
25:70 (25%)
25:70 (31%)
view
36 x 2 AnnService
AnnService
vcxproj
BalancedDataPartition.vcxproj
Server.vcxproj
25:70 (31%)
25:70 (30%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
16 x 2 AnnService/src/Core/BKT
AnnService/src/Core/KDT
BKTIndex.cpp
KDTIndex.cpp
275:292 
193:210 
view
14 x 2 AnnService/src/Core/BKT
AnnService/src/Core/KDT
BKTIndex.cpp
KDTIndex.cpp
47:63 
47:63 
view
13 x 2 AnnService/src/Core/BKT
AnnService/src/Core/KDT
BKTIndex.cpp
KDTIndex.cpp
436:450 
363:377 
view
12 x 2 AnnService/src/Core/BKT
AnnService/src/Core/KDT
BKTIndex.cpp
KDTIndex.cpp
30:44 
30:44 
view
11 x 2 AnnService/src/Core/BKT
AnnService/src/Core/KDT
BKTIndex.cpp
KDTIndex.cpp
83:96 
83:96 
view
8 x 2 AnnService/inc/Core/Common
AnnService/inc/Core
QueryResultSet.h
SearchQuery.h
45:53 
100:108 
view
6 x 2 AnnService/inc/Core/BKT
AnnService/inc/Core/KDT
Index.h
Index.h
114:121 
112:119 
view
6 x 2 AnnService/inc/Core/Common
AnnService/inc/Core/Common
BKTree.h
KDTree.h
550:556 
135:141 
view
6 x 2 AnnService/inc/Core/Common
AnnService/inc/Core/Common
BKTree.h
KDTree.h
591:597 
205:211 
view