facebookresearch / moolib
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
  • 3% duplication:
    • 8,921 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 277 duplicated lines
  • 23 duplicates
system3% (277 lines)
Duplication per Extension
cc3% (199 lines)
h2% (78 lines)
Duplication per Component (primary)
src3% (277 lines)
py/moolib0% (0 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 23 duplicates...
Size#FoldersFilesLinesCode
13 x 2 src
src
cc
rpc.cc
rpc.cc
197:214 (<1%)
260:277 (<1%)
view
8 x 2 src
src
cc
env.cc
env.cc
96:105 (2%)
115:124 (2%)
view
8 x 2 src
src
cc
moolib.cc
moolib.cc
1046:1054 (<1%)
1114:1122 (<1%)
view
8 x 2 src
src
cc
rpc.cc
rpc.cc
157:169 (<1%)
281:293 (<1%)
view
8 x 2 src
src
batchsizefinder.h
util.h
28:37 (4%)
60:69 (5%)
view
8 x 2 src
src
cc
moolib.cc
moolib.cc
994:1002 (<1%)
1043:1051 (<1%)
view
8 x 2 src
src
buffer.h
buffer.h
104:115 (5%)
158:169 (5%)
view
7 x 2 src
src
cc
moolib.cc
moolib.cc
636:642 (<1%)
709:715 (<1%)
view
7 x 2 src
src
cc
rpc.cc
rpc.cc
83:92 (<1%)
471:480 (<1%)
view
7 x 2 src
src
cc
rpc.cc
rpc.cc
221:230 (<1%)
284:293 (<1%)
view
7 x 2 src
src
group.h
group.h
592:598 (1%)
726:732 (1%)
view
7 x 2 src
src
cc
rpc.cc
rpc.cc
160:169 (<1%)
221:230 (<1%)
view
7 x 2 src
src
batchsizefinder.h
util.h
17:25 (4%)
49:57 (4%)
view
6 x 2 src
src
shm.h
synchronization.h
103:112 (3%)
115:122 (4%)
view
6 x 2 src
src
cc
accumulator.cc
rpc.cc
328:335 (<1%)
98:105 (<1%)
view
6 x 2 src
src
cc
moolib.cc
moolib.cc
996:1002 (<1%)
1064:1070 (<1%)
view
6 x 2 src
src
cc
env.cc
env.cc
113:118 (2%)
132:137 (2%)
view
6 x 2 src
src
logging.h
rpc.cc
52:58 (9%)
36:42 (<1%)
view
6 x 2 src
src
cc
moolib.cc
moolib.cc
1037:1043 (<1%)
1105:1111 (<1%)
view
6 x 2 src
src
cc
moolib.cc
moolib.cc
517:525 (<1%)
1369:1377 (<1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 src
src
cc
rpc.cc
accumulator.cc
95:106 
325:336 
view
7 x 2 src
src
serialization.h
serialization.h
113:120 
131:138 
view