facebookresearch / MTRF
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
  • 27% duplication:
    • 14,794 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,120 duplicated lines
  • 374 duplicates
system27% (4,120 lines)
Duplication per Extension
py28% (4,038 lines)
yaml36% (68 lines)
yml5% (14 lines)
Duplication per Component (primary)
MTRF/algorithms/softlearning/algorithms54% (1,422 lines)
MTRF/r3l/r3l/r3l_envs23% (726 lines)
MTRF/r3l/r3l/r3l_agents70% (632 lines)
MTRF/algorithms/softlearning/models39% (264 lines)
MTRF/algorithms/softlearning/replay_pools26% (219 lines)
MTRF/algorithms/softlearning/preprocessors28% (194 lines)
MTRF/algorithms/softlearning/samplers28% (178 lines)
MTRF/r3l/r3l/robot9% (108 lines)
MTRF/algorithms/softlearning/environments8% (108 lines)
MTRF/r3l/r3l/utils17% (94 lines)
MTRF/algorithms/config40% (46 lines)
MTRF/algorithms/softlearning/policies10% (44 lines)
MTRF/algorithms/docker23% (36 lines)
MTRF/algorithms/softlearning/value_functions17% (21 lines)
MTRF/algorithms/softlearning/misc6% (14 lines)
MTRF/algorithms/softlearning/utils28% (14 lines)
ROOT0% (0 lines)
MTRF/algorithms0% (0 lines)
MTRF/algorithms/scripts0% (0 lines)
MTRF/algorithms/softlearning0% (0 lines)
MTRF/algorithms/softlearning/rnd0% (0 lines)
MTRF/algorithms/softlearning/scripts0% (0 lines)
MTRF/algorithms/softlearning/distributions0% (0 lines)
MTRF/r3l/r3l0% (0 lines)
MTRF/r3l/r3l/sawyer_hardware0% (0 lines)

Duplication Between Components (50+ lines)

G MTRF/algorithms/softlearning/models MTRF/algorithms/softlearning/models MTRF/algorithms/softlearning/preprocessors MTRF/algorithms/softlearning/preprocessors MTRF/algorithms/softlearning/models--MTRF/algorithms/softlearning/preprocessors 364 MTRF/r3l/r3l/r3l_agents MTRF/r3l/r3l/r3l_agents MTRF/r3l/r3l/r3l_envs MTRF/r3l/r3l/r3l_envs MTRF/r3l/r3l/r3l_agents--MTRF/r3l/r3l/r3l_envs 100

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 374 duplicates...
Size#FoldersFilesLinesCode
182 x 2 MTRF/algorithms/softlearning/models
MTRF/algorithms/softlearning/preprocessors
normalization.py
normalization.py
26:366 (100%)
26:366 (100%)
view
150 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
432:635 (17%)
252:455 (21%)
view
63 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
68:167 (7%)
69:169 (9%)
view
62 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
871:951 (7%)
601:682 (8%)
view
54 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
187:253 (6%)
184:250 (7%)
view
44 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
965:1036 (5%)
700:772 (6%)
view
33 x 2 MTRF/r3l/r3l/r3l_envs/inhand_env
MTRF/r3l/r3l/r3l_envs/inhand_env
rotate.py
rotate.py
268:312 (10%)
387:430 (10%)
view
32 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
1039:1078 (3%)
787:826 (4%)
view
29 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
652:687 (3%)
457:492 (4%)
view
29 x 2 MTRF/r3l/r3l/robot
MTRF/r3l/r3l/robot
default_configs.py
default_configs.py
57:85 (11%)
89:117 (11%)
view
29 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
35:66 (3%)
35:65 (4%)
view
29 x 2 MTRF/algorithms/softlearning/replay_pools
MTRF/algorithms/softlearning/replay_pools
active_replay_pool.py
simple_replay_pool.py
21:50 (56%)
25:54 (46%)
view
26 x 2 MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
phased_evals_reorient.py
phased_evals_reposition.py
67:95 (25%)
69:97 (26%)
view
25 x 2 MTRF/r3l/r3l/r3l_envs/inhand_env
MTRF/r3l/r3l/r3l_envs/inhand_env
basket.py
bulb.py
568:600 (5%)
594:625 (5%)
view
24 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
1179:1208 (2%)
962:990 (3%)
view
24 x 2 MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
phased_evals_reorient.py
phased_evals_reposition.py
35:62 (23%)
35:62 (24%)
view
24 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
multi_sac.py
phased_sac.py
691:735 (2%)
503:547 (3%)
view
22 x 2 MTRF/r3l/r3l/r3l_agents
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
phased_evals.py
phased_evals_flipup.py
29:53 (28%)
31:55 (23%)
view
22 x 2 MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
phased_evals_reorient.py
phased_evals_reposition.py
114:155 (21%)
115:156 (22%)
view
22 x 2 MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
phased_evals_pickup.py
video_collection_flipup_evals.py
29:53 (25%)
36:60 (21%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 28 unit duplicates...
Size#FoldersFilesLinesCode
70 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
49 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
42 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
27 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
26 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
26 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
22 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
23 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
15 x 2 MTRF/algorithms/softlearning/misc
MTRF/r3l/r3l/utils
utils.py
misc.py
0:0 
0:0 
view
15 x 2 MTRF/algorithms/softlearning/samplers
MTRF/algorithms/softlearning/samplers
simple_sampler.py
pool_sampler.py
0:0 
0:0 
view
15 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
11 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
11 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
12 x 2 MTRF/algorithms/softlearning/algorithms
MTRF/algorithms/softlearning/algorithms
phased_sac.py
multi_sac.py
0:0 
0:0 
view
10 x 10 MTRF/r3l/r3l/r3l_envs/inhand_env
MTRF/r3l/r3l/r3l_envs/inhand_env
MTRF/r3l/r3l/r3l_agents
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
MTRF/r3l/r3l/r3l_agents/...ning/evaluation_scripts
rotate.py
rotate.py
phased_evals.py
phased_evals_flipup.py
video_collection_flipup_evals.py
phased_evals_reposition.py
phased_evals_pickup.py
phased_evals_reorient.py
phased_evals_midair.py
phased_evals_midair_slotted.py
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
0:0 
view
10 x 2 MTRF/r3l/r3l/r3l_envs/base_env
MTRF/r3l/r3l/r3l_envs/base_env
base_env.py
base_env_deltapos.py
0:0 
0:0 
view
9 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
8 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
8 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view
8 x 2 MTRF/algorithms/softlearning/preprocessors
MTRF/algorithms/softlearning/models
normalization.py
normalization.py
0:0 
0:0 
view