facebookresearch / interaction-exploration
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
  • 9% duplication:
    • 3,777 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 363 duplicated lines
  • 32 duplicates
system9% (363 lines)
Duplication per Extension
py9% (363 lines)
Duplication per Component (primary)
rl/ppo18% (106 lines)
affordance_seg18% (105 lines)
interaction_exploration24% (71 lines)
envs6% (46 lines)
rl/common3% (23 lines)
rl/models6% (12 lines)
ROOT0% (0 lines)
interaction_exploration/tools0% (0 lines)
interaction_exploration/config0% (0 lines)
interaction_exploration/utils0% (0 lines)
interaction_exploration/models0% (0 lines)
rl/config0% (0 lines)
affordance_seg/tools0% (0 lines)

Duplication Between Components (50+ lines)

G affordance_seg affordance_seg rl/ppo rl/ppo affordance_seg--rl/ppo 196 interaction_exploration interaction_exploration affordance_seg--interaction_exploration 142 interaction_exploration--rl/ppo 122

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 32 duplicates...
Size#FoldersFilesLinesCode
29 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
158:193 (16%)
541:576 (6%)
view
29 x 2 interaction_exploration
rl/ppo
viz_trainer.py
ppo_trainer.py
164:198 (18%)
541:576 (6%)
view
29 x 2 affordance_seg
interaction_exploration
collect_dset.py
viz_trainer.py
158:193 (16%)
164:198 (18%)
view
23 x 2 affordance_seg
interaction_exploration
collect_dset.py
viz_trainer.py
106:134 (13%)
82:109 (14%)
view
22 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
113:138 (12%)
499:524 (5%)
view
19 x 2 interaction_exploration
rl/ppo
viz_trainer.py
ppo_trainer.py
88:109 (11%)
499:520 (4%)
view
18 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
227:244 (10%)
631:648 (4%)
view
16 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
195:214 (9%)
583:602 (3%)
view
13 x 2 affordance_seg
interaction_exploration
collect_dset.py
viz_trainer.py
207:222 (7%)
202:214 (8%)
view
11 x 2 envs
envs
thor_beacons.py
thor_beacons.py
288:304 (4%)
397:412 (4%)
view
8 x 2 rl/common
rl/ppo
rollout_storage.py
ppo.py
222:229 (4%)
79:86 (6%)
view
7 x 2 rl/common
rl/ppo
base_trainer.py
ppo_trainer.py
165:171 (7%)
642:648 (1%)
view
7 x 2 affordance_seg
affordance_seg
collect_dset.py
collect_dset.py
228:234 (4%)
237:243 (4%)
view
7 x 2 rl/common
rl/common
base_trainer.py
base_trainer.py
135:141 (7%)
164:170 (7%)
view
7 x 2 affordance_seg
rl/common
collect_dset.py
base_trainer.py
238:244 (4%)
165:171 (7%)
view
7 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
101:110 (4%)
483:492 (1%)
view
7 x 2 rl/ppo
rl/ppo
ppo_trainer.py
ppo_trainer.py
632:638 (1%)
641:647 (1%)
view
7 x 2 interaction_exploration
rl/ppo
viz_trainer.py
ppo_trainer.py
202:208 (4%)
595:602 (1%)
view
7 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
237:243 (4%)
632:638 (1%)
view
7 x 2 affordance_seg
rl/ppo
collect_dset.py
ppo_trainer.py
228:234 (4%)
641:647 (1%)
view