microsoft / pmwcas
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
  • 15% duplication:
    • 5,026 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 773 duplicated lines
  • 40 duplicates
system15% (773 lines)
Duplication per Extension
h20% (517 lines)
cc10% (256 lines)
Duplication per Component (primary)
src/mwcas24% (224 lines)
src/benchmarks25% (196 lines)
src/environment12% (190 lines)
src/common27% (157 lines)
src/util1% (6 lines)
include0% (0 lines)
src/double-linked-list0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 40 duplicates...
Size#FoldersFilesLinesCode
37 x 2 src/common
src/common
garbage_list.h
garbage_list_unsafe.h
104:213 (30%)
69:178 (36%)
view
34 x 2 src/environment
src/environment
environment_linux.h
environment_windows.h
118:165 (11%)
527:574 (7%)
view
26 x 2 src/mwcas
src/mwcas
mwcas.cc
mwcas.cc
482:530 (4%)
556:603 (4%)
view
22 x 2 src/mwcas
src/mwcas
mwcas.h
mwcas.h
674:703 (7%)
716:745 (7%)
view
19 x 2 src/mwcas
src/mwcas
mwcas.cc
mwcas.cc
671:710 (3%)
794:832 (3%)
view
19 x 2 src/benchmarks
src/benchmarks
benchmark.h
benchmark_linux.h
19:62 (18%)
15:58 (20%)
view
19 x 2 src/mwcas
src/mwcas
mwcas.h
mwcas.h
597:624 (6%)
631:656 (6%)
view
19 x 2 src/mwcas
src/mwcas
mwcas.cc
mwcas.cc
628:658 (3%)
760:788 (3%)
view
17 x 2 src/benchmarks
src/benchmarks
benchmark.h
benchmark_linux.h
152:192 (16%)
141:181 (18%)
view
13 x 2 src/environment
src/environment
environment_windows.cc
environment_windows.cc
484:497 (2%)
520:534 (2%)
view
11 x 2 src/common
src/common
garbage_list.h
garbage_list.h
226:248 (8%)
275:296 (8%)
view
10 x 2 src/common
src/common
garbage_list.h
garbage_list_unsafe.h
287:303 (8%)
238:254 (9%)
view
10 x 2 src/benchmarks
src/benchmarks
benchmark.h
benchmark_linux.h
196:228 (9%)
183:215 (10%)
view
10 x 2 src/environment
src/environment
environment_linux.h
environment_windows.h
208:220 (3%)
626:638 (2%)
view
9 x 2 src/environment
src/environment
environment_linux.cc
environment_windows.cc
104:115 (5%)
279:290 (1%)
view
9 x 2 src/common
src/common
garbage_list.h
garbage_list_unsafe.h
239:254 (7%)
196:211 (8%)
view
9 x 2 src/benchmarks
src/benchmarks
doubly_linked_list_benchmark.cc
doubly_linked_list_benchmark.cc
282:291 (2%)
348:357 (2%)
view
8 x 2 src/common
src/common
garbage_list.h
garbage_list_unsafe.h
57:92 (6%)
22:57 (7%)
view
8 x 2 src/benchmarks
src/benchmarks
benchmark.h
benchmark_linux.h
85:98 (7%)
77:90 (8%)
view
8 x 2 src/benchmarks
src/benchmarks
doubly_linked_list_benchmark.cc
mwcas_benchmark.cc
466:474 (2%)
312:320 (3%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
18 x 2 src/common
src/common
garbage_list.h
garbage_list_unsafe.h
161:183 
126:148 
view
16 x 2 src/common
src/common
garbage_list.h
garbage_list_unsafe.h
126:148 
91:113 
view
11 x 2 src/environment
src/environment
environment_linux.h
environment_windows.h
142:153 
551:562 
view
7 x 2 src/common
src/util
epoch.cc
hash.h
325:332 
8:15 
view
6 x 2 src/environment
src/environment
environment_linux.cc
environment_linux.cc
25:31 
33:39 
view