facebookresearch / PyTorch-BigGraph
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
  • 8% duplication:
    • 7,647 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 656 duplicated lines
  • 73 duplicates
system8% (656 lines)
Duplication per Extension
py8% (644 lines)
cpp3% (12 lines)
Duplication per Component (primary)
torchbiggraph7% (534 lines)
torchbiggraph/converters17% (122 lines)
ROOT0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 73 duplicates...
Size#FoldersFilesLinesCode
30 x 2 torchbiggraph/converters
torchbiggraph/converters
import_from_parquet.py
import_from_tsv.py
45:77 (46%)
45:77 (46%)
view
22 x 2 torchbiggraph
torchbiggraph
partitionserver.py
train.py
75:98 (32%)
46:69 (48%)
view
15 x 2 torchbiggraph
torchbiggraph
model.py
model.py
165:183 (2%)
195:213 (2%)
view
15 x 2 torchbiggraph/converters
torchbiggraph/converters
import_from_parquet.py
import_from_tsv.py
15:32 (23%)
15:32 (23%)
view
13 x 2 torchbiggraph
torchbiggraph
model.py
model.py
252:265 (2%)
284:297 (2%)
view
13 x 2 torchbiggraph
torchbiggraph
model.py
model.py
162:175 (2%)
284:297 (2%)
view
13 x 2 torchbiggraph
torchbiggraph
model.py
model.py
162:175 (2%)
252:265 (2%)
view
13 x 2 torchbiggraph
torchbiggraph
model.py
model.py
689:701 (2%)
724:736 (2%)
view
13 x 2 torchbiggraph
torchbiggraph
parameter_sharing.py
parameter_sharing.py
264:276 (2%)
384:396 (2%)
view
11 x 2 torchbiggraph
torchbiggraph
model.py
model.py
195:205 (1%)
287:297 (1%)
view
11 x 2 torchbiggraph
torchbiggraph
model.py
model.py
287:297 (1%)
317:327 (1%)
view
11 x 2 torchbiggraph
torchbiggraph
model.py
model.py
195:205 (1%)
255:265 (1%)
view
11 x 2 torchbiggraph
torchbiggraph
model.py
model.py
165:175 (1%)
317:327 (1%)
view
11 x 2 torchbiggraph
torchbiggraph
model.py
model.py
255:265 (1%)
317:327 (1%)
view
11 x 2 torchbiggraph
torchbiggraph
parameter_sharing.py
parameter_sharing.py
170:180 (2%)
216:226 (2%)
view
11 x 2 torchbiggraph
torchbiggraph
model.py
model.py
195:205 (1%)
317:327 (1%)
view
10 x 2 torchbiggraph
torchbiggraph
partitionserver.py
train_cpu.py
44:54 (14%)
310:320 (1%)
view
10 x 2 torchbiggraph
torchbiggraph
losses.py
losses.py
92:103 (9%)
130:142 (9%)
view
10 x 2 torchbiggraph
torchbiggraph
train_cpu.py
train_gpu.py
236:245 (1%)
417:426 (1%)
view
9 x 2 torchbiggraph
torchbiggraph
eval.py
partitionserver.py
243:252 (5%)
75:84 (13%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 torchbiggraph
torchbiggraph
train_gpu.py
train_cpu.py
0:0 
0:0 
view
7 x 2 torchbiggraph
torchbiggraph
distributed.py
distributed.py
0:0 
0:0 
view
7 x 2 torchbiggraph
torchbiggraph
checkpoint_storage.py
checkpoint_storage.py
0:0 
0:0 
view
6 x 2 torchbiggraph
torchbiggraph
checkpoint_manager.py
checkpoint_manager.py
0:0 
0:0 
view