microsoft / FASTER
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
  • 18% duplication:
    • 29,647 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,349 duplicated lines
  • 435 duplicates
system18% (5,349 lines)
Duplication per Extension
cs21% (4,393 lines)
h7% (550 lines)
yml85% (236 lines)
cc13% (130 lines)
vcxproj30% (40 lines)
Duplication per Component (primary)
cs/src/core20% (2,816 lines)
cs/remote/src21% (707 lines)
cs/benchmark45% (625 lines)
cc/src/core7% (385 lines)
cc/src/environment27% (258 lines)
ROOT85% (236 lines)
cs/remote/benchmark38% (183 lines)
cc/benchmark-dir8% (52 lines)
cs/playground/AsyncStress6% (30 lines)
cc/src/device2% (25 lines)
cs/src/devices3% (14 lines)
cs/playground/ClassRecoveryDurability4% (12 lines)
cs/benchmark/Properties85% (6 lines)
cc0% (0 lines)
cc/playground/sum_store-dir0% (0 lines)
cc/src/common0% (0 lines)
cs/benchmark/scripts0% (0 lines)
cs/playground/CacheStoreConcurrent0% (0 lines)
cs/playground/FasterLogMLSDTest0% (0 lines)
cs/playground/SumStore0% (0 lines)
cs/playground/TstRunner0% (0 lines)

Duplication Between Components (50+ lines)

G cs/benchmark cs/benchmark cs/remote/benchmark cs/remote/benchmark cs/benchmark--cs/remote/benchmark 491 cs/src/core cs/src/core cs/remote/benchmark--cs/src/core 54

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 435 duplicates...
Size#FoldersFilesLinesCode
174 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
146:797 (43%)
151:807 (41%)
view
52 x 2 cs/remote/src/FASTER.server
cs/remote/src/FASTER.server
BinaryServerSession.cs
WebsocketServerSession.cs
227:311 (17%)
548:633 (11%)
view
51 x 2 cs/benchmark
cs/benchmark
FasterSpanByteYcsbBenchmark.cs
FasterYcsbBenchmark.cs
250:340 (17%)
245:335 (18%)
view
51 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
45:141 (12%)
45:141 (12%)
view
49 x 2 cs/benchmark
cs/benchmark
FasterSpanByteYcsbBenchmark.cs
FasterYcsbBenchmark.cs
372:456 (17%)
366:450 (17%)
view
49 x 2 cs/benchmark
cs/remote/benchmark/FASTER.benchmark
FasterYcsbBenchmark.cs
FasterYcsbBenchmark.cs
366:450 (17%)
399:483 (15%)
view
49 x 2 cs/benchmark
cs/remote/benchmark/FASTER.benchmark
FasterSpanByteYcsbBenchmark.cs
FasterYcsbBenchmark.cs
372:456 (17%)
399:483 (15%)
view
46 x 2 cs/benchmark
cs/remote/benchmark/FASTER.benchmark
RandomGenerator.cs
RandomGenerator.cs
1:82 (100%)
1:77 (100%)
view
45 x 2 cs/benchmark
cs/benchmark
FasterSpanByteYcsbBenchmark.cs
FasterYcsbBenchmark.cs
172:245 (15%)
168:241 (16%)
view
45 x 2 ROOT
ROOT
azure-pipelines-full.yml
azure-pipelines.yml
1:53 (33%)
1:53 (31%)
view
43 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
801:898 (10%)
811:908 (10%)
view
38 x 2 ROOT
ROOT
azure-pipelines-full.yml
azure-pipelines.yml
115:156 (27%)
121:162 (26%)
view
38 x 2 cs/src/core/Allocator
cs/src/core/Allocator
BlittableAllocator.cs
VarLenBlittableAllocator.cs
155:234 (20%)
260:338 (15%)
view
35 x 2 ROOT
ROOT
azure-pipelines-full.yml
azure-pipelines.yml
56:96 (25%)
56:96 (24%)
view
33 x 2 cs/src/core/Allocator
cs/src/core/Allocator
MallocFixedPageSize.cs
MallocFixedPageSize.cs
255:320 (10%)
365:430 (10%)
view
27 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
1014:1065 (6%)
1092:1143 (6%)
view
24 x 2 cs/src/core/Index/Synchronization
cs/src/core/Index/Synchronization
HybridLogCheckpointTask.cs
HybridLogCheckpointTask.cs
226:266 (10%)
315:355 (10%)
view
22 x 2 cs/src/core/Device
cs/src/core/Device
ManagedLocalStorageDevice.cs
ManagedLocalStorageDevice.cs
285:326 (7%)
336:376 (7%)
view
21 x 2 cs/benchmark
cs/benchmark
FasterSpanByteYcsbBenchmark.cs
FasterYcsbBenchmark.cs
127:157 (7%)
123:153 (7%)
view
20 x 2 cs/remote/benchmark/FASTER.benchmark
cs/src/core/Utilities
Native32.cs
Native32.cs
17:50 (48%)
188:221 (7%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 67 unit duplicates...
Size#FoldersFilesLinesCode
66 x 2 cs/remote/src/FASTER.server
cs/remote/src/FASTER.server
BinaryServerSession.cs
WebsocketServerSession.cs
227:309 
548:630 
view
50 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
44:100 
44:100 
view
43 x 3 cs/benchmark
cs/benchmark
cs/remote/benchmark/FASTER.benchmark
FasterSpanByteYcsbBenchmark.cs
FasterYcsbBenchmark.cs
FasterYcsbBenchmark.cs
403:453 
397:447 
430:480 
view
29 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
788:817 
798:827 
view
28 x 2 cs/src/core/Index/Synchronization
cs/src/core/Index/Synchronization
HybridLogCheckpointTask.cs
HybridLogCheckpointTask.cs
231:267 
320:356 
view
23 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
102:126 
102:126 
view
21 x 2 cs/src/core/Allocator
cs/src/core/Allocator
BlittableScanIterator.cs
VarLenBlittableScanIterator.cs
175:201 
160:186 
view
20 x 2 cs/remote/src/FASTER.server/Servers
cs/remote/src/FASTER.server/Servers
GenericServer.cs
VarLenServer.cs
102:125 
90:113 
view
19 x 2 cs/remote/src/FASTER.client
cs/remote/src/FASTER.client
ClientSession.cs
ClientSession.cs
723:743 
837:857 
view
19 x 2 cs/remote/src/FASTER.client
cs/remote/src/FASTER.client
ClientSession.cs
ClientSession.cs
769:789 
814:834 
view
19 x 2 cs/src/core/ClientSession
cs/src/core/ClientSession
AdvancedClientSession.cs
ClientSession.cs
875:900 
885:910 
view
19 x 2 cs/src/core/Index/CheckpointManagement
cs/src/core/Index/Recovery
DeviceLogCommitCheckpointManager.cs
LocalCheckpointManager.cs
275:294 
280:299 
view
16 x 2 cs/src/core/Allocator
cs/src/core/Allocator
BlittableAllocator.cs
VarLenBlittableAllocator.cs
98:115 
205:222 
view
15 x 2 cs/benchmark
cs/remote/benchmark/FASTER.benchmark
RandomGenerator.cs
RandomGenerator.cs
63:83 
58:78 
view
15 x 2 cs/remote/src/FASTER.client
cs/remote/src/FASTER.server
FixedLenSerializer.cs
FixedLenSerializer.cs
86:102 
104:120 
view
14 x 2 cs/benchmark
cs/remote/benchmark/FASTER.benchmark
RandomGenerator.cs
RandomGenerator.cs
21:36 
16:31 
view
14 x 2 cs/src/core/Allocator
cs/src/core/Allocator
ScanIteratorBase.cs
ScanIteratorBase.cs
92:106 
213:227 
view
13 x 2 cc/src/core
cc/src/core
hash_table.h
malloc_fixed_page_size.h
183:196 
430:443 
view
13 x 2 cc/src/core
cc/src/core
hash_table.h
malloc_fixed_page_size.h
239:252 
498:511 
view
13 x 2 cs/src/core/VarLen
cs/src/core/VarLen
SpanByteAdvancedFunctions.cs
SpanByteFunctions.cs
26:49 
26:49 
view