facebookresearch / torchbeast
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
  • 10% duplication:
    • 2,657 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 280 duplicated lines
  • 20 duplicates
system10% (280 lines)
Duplication per Extension
py15% (254 lines)
h7% (26 lines)
Duplication per Component (primary)
torchbeast19% (240 lines)
nest/nest7% (26 lines)
torchbeast/core4% (14 lines)
ROOT0% (0 lines)
nest0% (0 lines)
src/py0% (0 lines)
src/proto0% (0 lines)
src/cc0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 20 duplicates...
Size#FoldersFilesLinesCode
14 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
107:125 (2%)
113:131 (3%)
view
10 x 2 torchbeast
torchbeast
polybeast_learner.py
polybeast_learner.py
165:174 (2%)
175:184 (2%)
view
9 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
450:458 (1%)
535:543 (1%)
view
9 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
616:627 (1%)
253:264 (1%)
view
9 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
319:327 (1%)
392:400 (1%)
view
8 x 2 torchbeast
torchbeast
polybeast_learner.py
polybeast_learner.py
296:303 (1%)
510:517 (1%)
view
8 x 2 torchbeast
torchbeast
polybeast_learner.py
polybeast_learner.py
150:157 (1%)
177:184 (1%)
view
8 x 2 torchbeast
torchbeast
polybeast_learner.py
polybeast_learner.py
150:157 (1%)
167:174 (1%)
view
8 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
86:93 (1%)
89:96 (1%)
view
7 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
44:52 (1%)
43:51 (1%)
view
7 x 2 nest/nest
nest/nest
nest.h
nest.h
246:252 (2%)
309:315 (2%)
view
7 x 2 torchbeast/core
torchbeast/core
vtrace.py
vtrace.py
62:68 (8%)
94:100 (8%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
389:395 (1%)
474:480 (1%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
97:102 (1%)
105:110 (1%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
599:607 (1%)
237:245 (1%)
view
6 x 2 nest/nest
nest/nest
nest.h
nest.h
238:243 (2%)
302:307 (2%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
575:580 (1%)
207:212 (1%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
57:62 (1%)
56:61 (1%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
651:658 (1%)
614:621 (1%)
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
289:295 (1%)
363:369 (1%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
7 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
0:0 
0:0 
view
6 x 2 torchbeast
torchbeast
monobeast.py
polybeast_learner.py
0:0 
0:0 
view