facebookresearch / worldsheet
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
  • 18% duplication:
    • 23,832 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,353 duplicated lines
  • 597 duplicates
system18% (4,353 lines)
Duplication per Extension
py12% (2,563 lines)
yaml47% (1,790 lines)
Duplication per Component (primary)
mmf/configs42% (1,424 lines)
mmf/models17% (922 lines)
mmf/datasets15% (640 lines)
mmf/modules14% (416 lines)
mmf/neural_rendering14% (292 lines)
mmf/utils8% (253 lines)
projects/neural_rendering100% (183 lines)
mmf/projects100% (183 lines)
mmf/trainers2% (14 lines)
mmf/common2% (14 lines)
tools/sweeps2% (12 lines)
tools0% (0 lines)
tools/scripts0% (0 lines)
ROOT0% (0 lines)
run_realestate10k0% (0 lines)
mmf0% (0 lines)
mmf_cli0% (0 lines)

Duplication Between Components (50+ lines)

G mmf/datasets mmf/datasets mmf/utils mmf/utils mmf/datasets--mmf/utils 414 mmf/projects mmf/projects projects/neural_rendering projects/neural_rendering mmf/projects--projects/neural_rendering 366

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 597 duplicates...
Size#FoldersFilesLinesCode
199 x 2 mmf/datasets/processors
mmf/utils
processors.py
m4c_evaluators.py
953:1157 (23%)
16:220 (70%)
view
50 x 2 mmf/projects/neural_rend...gs/synsin_realestate10k
projects/neural_renderin...gs/synsin_realestate10k
realestate10k_defaults.yaml
realestate10k_defaults.yaml
1:53 (100%)
1:53 (100%)
view
40 x 2 mmf/projects/neural_rend.../configs/synsin_habitat
projects/neural_rendering/configs/synsin_habitat
mp3d_defaults.yaml
mp3d_defaults.yaml
1:43 (100%)
1:43 (100%)
view
37 x 2 mmf/configs/datasets/vqa2
mmf/configs/datasets/vqa2
defaults.yaml
train_val.yaml
32:70 (54%)
24:62 (61%)
view
33 x 2 mmf/models
mmf/models
pythia.py
pythia.py
216:267 (9%)
437:488 (9%)
view
33 x 2 mmf/models
mmf/models
mmf_bert.py
pythia.py
198:251 (11%)
218:271 (9%)
view
31 x 2 mmf/models
mmf/models
mmf_bert.py
pythia.py
198:247 (10%)
439:488 (8%)
view
30 x 2 mmf/models
mmf/models
vilbert.py
vilbert.py
986:1016 (3%)
1146:1176 (3%)
view
29 x 2 mmf/projects/neural_rend...gs/synsin_realestate10k
projects/neural_renderin...gs/synsin_realestate10k
realestate10k_dscale2_stride4ft_lower...
realestate10k_dscale2_stride4ft_lower...
1:32 (100%)
1:32 (100%)
view
28 x 2 mmf/configs/datasets/vqa2
mmf/configs/datasets/vqa2
defaults.yaml
masked_q.yaml
18:45 (41%)
11:38 (45%)
view
27 x 2 mmf/projects/neural_rend.../configs/synsin_habitat
projects/neural_rendering/configs/synsin_habitat
mp3d_nodepth_perceptual_l1laplacian_i...
mp3d_nodepth_perceptual_l1laplacian_i...
1:30 (100%)
1:30 (100%)
view
26 x 2 mmf/configs/datasets/coco
mmf/configs/datasets/conceptual_captions
masked.yaml
masked.yaml
26:53 (50%)
26:53 (50%)
view
26 x 2 mmf/models
mmf/models
visual_bert.py
visual_bert.py
158:183 (6%)
280:305 (6%)
view
26 x 2 mmf/neural_rendering/inpainting
mmf/neural_rendering
pix2pix_networks.py
losses.py
653:679 (5%)
144:171 (18%)
view
25 x 2 mmf/configs/models/m4c
mmf/configs/models/m4c_captioner
defaults.yaml
defaults.yaml
3:27 (92%)
3:27 (89%)
view
24 x 2 mmf/projects/neural_rend...gs/synsin_realestate10k
projects/neural_renderin...gs/synsin_realestate10k
realestate10k_dscale2_lowerL1_200.yaml
realestate10k_dscale2_lowerL1_200.yaml
1:26 (100%)
1:26 (100%)
view
23 x 2 mmf/projects/neural_rend...gs/synsin_realestate10k
projects/neural_rendering/configs/synsin_habitat
realestate10k_defaults.yaml
mp3d_defaults.yaml
17:41 (46%)
7:31 (57%)
view
23 x 2 projects/neural_rendering/configs/synsin_habitat
projects/neural_renderin...gs/synsin_realestate10k
mp3d_defaults.yaml
realestate10k_defaults.yaml
7:31 (57%)
17:41 (46%)
view
23 x 2 mmf/projects/neural_rend.../configs/synsin_habitat
projects/neural_renderin...gs/synsin_realestate10k
mp3d_defaults.yaml
realestate10k_defaults.yaml
7:31 (57%)
17:41 (46%)
view
23 x 2 mmf/projects/neural_rend.../configs/synsin_habitat
mmf/projects/neural_rend...gs/synsin_realestate10k
mp3d_defaults.yaml
realestate10k_defaults.yaml
7:31 (57%)
17:41 (46%)
view
Duplicated Units
The list of top 16 duplicated units.
See data for all 16 unit duplicates...
Size#FoldersFilesLinesCode
19 x 2 mmf/datasets/builders/mmimdb
mmf/datasets/builders/gqa
masked_dataset.py
masked_dataset.py
0:0 
0:0 
view
13 x 2 mmf/datasets/processors
mmf/utils
processors.py
m4c_evaluators.py
0:0 
0:0 
view
12 x 2 mmf/models
mmf/models
vilbert.py
vilbert.py
0:0 
0:0 
view
10 x 2 mmf/datasets/builders/gqa
mmf/datasets/builders/vqa2
builder.py
builder.py
0:0 
0:0 
view
10 x 2 mmf/datasets/processors
mmf/utils
processors.py
m4c_evaluators.py
0:0 
0:0 
view
10 x 2 mmf/models
mmf/models
visual_bert.py
visual_bert.py
0:0 
0:0 
view
10 x 2 mmf/modules
mmf/modules
fusions.py
fusions.py
0:0 
0:0 
view
8 x 2 mmf/datasets/builders/gqa
mmf/datasets/builders/vqa2
masked_dataset.py
masked_dataset.py
0:0 
0:0 
view
7 x 2 mmf/models
mmf/models
vilbert.py
vilbert.py
0:0 
0:0 
view
6 x 2 mmf/datasets/builders/okvqa
mmf/datasets/builders/vqacp_v2
dataset.py
dataset.py
0:0 
0:0 
view
6 x 2 mmf/models
mmf/models
vilbert.py
vilbert.py
0:0 
0:0 
view
6 x 2 mmf/models
mmf/models
movie_mcan.py
pythia.py
0:0 
0:0 
view
6 x 2 mmf/models
mmf/models
lxmert.py
vilbert.py
0:0 
0:0 
view
6 x 2 mmf/models
mmf/models
lxmert.py
vilbert.py
0:0 
0:0 
view
6 x 2 mmf/models
mmf/models
vilbert.py
vilbert.py
0:0 
0:0 
view
7 x 2 mmf/models
mmf/models
lxmert.py
vilbert.py
0:0 
0:0 
view