facebookresearch / adversarially-motivated-intrinsic-goals
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
  • 6% duplication:
    • 1,391 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 84 duplicated lines
  • 6 duplicates
system6% (84 lines)
Duplication per Extension
py6% (84 lines)
Duplication per Component (primary)
monobeast/minigrid6% (58 lines)
torchbeast/core6% (20 lines)
ROOT4% (6 lines)
monobeast0% (0 lines)
Longest Duplicates
The list of 6 longest duplicates.
See data for all 6 duplicates...
Size#FoldersFilesLinesCode
9 x 2 monobeast/minigrid
monobeast/minigrid
monobeast_amigo.py
monobeast_amigo.py
994:1003 (<1%)
1142:1151 (<1%)
view
8 x 2 monobeast/minigrid
monobeast/minigrid
monobeast_amigo.py
monobeast_amigo.py
508:515 (<1%)
526:533 (<1%)
view
7 x 2 torchbeast/core
torchbeast/core
vtrace.py
vtrace.py
64:70 (8%)
96:102 (8%)
view
6 x 2 monobeast/minigrid
monobeast/minigrid
monobeast_amigo.py
monobeast_amigo.py
1017:1022 (<1%)
1165:1170 (<1%)
view
6 x 2 monobeast/minigrid
monobeast/minigrid
monobeast_amigo.py
monobeast_amigo.py
985:992 (<1%)
1153:1160 (<1%)
view
6 x 2 ROOT
torchbeast/core
env_utils.py
environment.py
57:62 (4%)
31:36 (13%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 monobeast/minigrid
monobeast/minigrid
monobeast_amigo.py
monobeast_amigo.py
0:0 
0:0 
view
7 x 2 monobeast/minigrid
monobeast/minigrid
monobeast_amigo.py
monobeast_amigo.py
0:0 
0:0 
view