facebookresearch / LearningToLearn
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:
    • 1,891 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 203 duplicated lines
  • 10 duplicates
system10% (203 lines)
Duplication per Extension
py9% (146 lines)
urdf19% (57 lines)
Duplication per Component (primary)
ml39% (67 lines)
mbirl/env/kuka_iiwa/urdf19% (57 lines)
ml3/envs12% (46 lines)
ml3/experiments19% (33 lines)
ROOT0% (0 lines)
mbirl/experiments0% (0 lines)
mbirl0% (0 lines)
mbirl/env0% (0 lines)

Duplication Between Components (50+ lines)

G ml3/experiments ml3/experiments ml3 ml3 ml3/experiments--ml3 66

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 10 longest duplicates.
See data for all 10 duplicates...
Size#FoldersFilesLinesCode
19 x 2 mbirl/env/kuka_iiwa/urdf
mbirl/env/kuka_iiwa/urdf
urdf
iiwa7_ft_with_obj_keypts.urdf
iiwa7_ft_with_obj_keypts.urdf
294:316 (6%)
322:344 (6%)
view
19 x 2 mbirl/env/kuka_iiwa/urdf
mbirl/env/kuka_iiwa/urdf
urdf
iiwa7_ft_with_obj_keypts.urdf
iiwa7_ft_with_obj_keypts.urdf
322:344 (6%)
349:371 (6%)
view
19 x 2 mbirl/env/kuka_iiwa/urdf
mbirl/env/kuka_iiwa/urdf
urdf
iiwa7_ft_with_obj_keypts.urdf
iiwa7_ft_with_obj_keypts.urdf
294:316 (6%)
349:371 (6%)
view
17 x 2 ml3/experiments
ml3
run_sine_regression_exp.py
sine_regression_task.py
10:29 (70%)
182:201 (12%)
view
16 x 2 ml3/experiments
ml3
run_shaped_sine_exp.py
shaped_sine_utils.py
24:42 (30%)
11:29 (23%)
view
9 x 2 ml3
ml3
mbrl_utils.py
mbrl_utils.py
16:26 (4%)
110:120 (4%)
view
9 x 2 ml3/envs
ml3/envs
bullet_sim.py
bullet_sim.py
72:81 (3%)
88:98 (3%)
view
8 x 2 ml3
ml3
learnable_losses.py
optimizee.py
7:16 (10%)
8:17 (8%)
view
7 x 2 ml3/envs
ml3/envs
bullet_sim.py
bullet_sim.py
285:291 (2%)
317:323 (2%)
view
7 x 2 ml3/envs
ml3/envs
bullet_sim.py
bullet_sim.py
162:168 (2%)
171:177 (2%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
16 x 2 ml3/experiments
ml3
run_shaped_sine_exp.py
shaped_sine_utils.py
0:0 
0:0 
view
7 x 2 ml3/envs
ml3/envs
bullet_sim.py
bullet_sim.py
0:0 
0:0 
view