facebookresearch / augmentation-corruption
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
  • 48% duplication:
    • 6,985 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,394 duplicated lines
  • 177 duplicates
system48% (3,394 lines)
Duplication per Extension
py49% (3,189 lines)
yaml39% (205 lines)
Duplication per Component (primary)
experiments/overlap/augmentations43% (1,109 lines)
imagenet_c_bar65% (756 lines)
experiments/overlap45% (571 lines)
experiments52% (521 lines)
notebook_utils73% (108 lines)
imagenet_c_bar/utils100% (105 lines)
experiments/conf62% (76 lines)
experiments/conf/optim87% (55 lines)
experiments/conf/ft53% (44 lines)
experiments/tools10% (19 lines)
experiments/conf/train12% (17 lines)
experiments/conf/model54% (13 lines)
experiments/baseline_data0% (0 lines)
experiments/overlap/utils0% (0 lines)
experiments/conf/corrupt0% (0 lines)
experiments/conf/ft_augmentation0% (0 lines)
experiments/conf/ft_corrupt0% (0 lines)

Duplication Between Components (50+ lines)

G experiments/overlap/augmentations experiments/overlap/augmentations imagenet_c_bar imagenet_c_bar experiments/overlap/augmentations--imagenet_c_bar 1491 imagenet_c_bar/utils imagenet_c_bar/utils experiments/overlap/augmentations--imagenet_c_bar/utils 210 experiments/overlap experiments/overlap notebook_utils notebook_utils experiments/overlap--notebook_utils 216

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 177 duplicates...
Size#FoldersFilesLinesCode
108 x 2 experiments/overlap
notebook_utils
wideresnet.py
wideresnet.py
12:142 (100%)
13:143 (100%)
view
93 x 2 experiments
experiments
severity_scan.py
severity_scan_imagenet.py
22:122 (86%)
22:122 (84%)
view
56 x 2 experiments
experiments
train_imagenet.py
train_imagenet_jsd.py
20:80 (72%)
20:80 (70%)
view
55 x 2 experiments/overlap/augmentations
imagenet_c_bar
base.py
base.py
22:83 (85%)
22:83 (85%)
view
55 x 2 experiments/overlap/augmentations/utils
imagenet_c_bar/utils
noise.py
perlin_noise.py
8:80 (100%)
8:80 (100%)
view
55 x 2 experiments/overlap/augmentations
imagenet_c_bar
distortion.py
corrupt.py
24:96 (18%)
732:803 (6%)
view
46 x 2 experiments/overlap
experiments/overlap
train_net.py
train_net_jsd.py
33:82 (41%)
37:86 (33%)
view
39 x 2 experiments/overlap/augmentations
imagenet_c_bar
color.py
corrupt.py
133:180 (30%)
548:595 (4%)
view
37 x 2 experiments/overlap/augmentations
imagenet_c_bar
distortion.py
corrupt.py
263:310 (12%)
862:908 (4%)
view
37 x 2 experiments/overlap/augmentations
experiments/overlap/augmentations
pil.py
pil.py
480:519 (8%)
535:574 (8%)
view
35 x 2 experiments/overlap
experiments/overlap
datasets.py
datasets.py
74:115 (5%)
330:371 (5%)
view
34 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
243:286 (10%)
227:267 (3%)
view
33 x 2 experiments/overlap/augmentations
imagenet_c_bar
pil.py
corrupt.py
385:421 (7%)
1037:1073 (3%)
view
32 x 2 experiments/overlap/augmentations
imagenet_c_bar
color.py
corrupt.py
67:104 (25%)
484:521 (3%)
view
32 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
303:341 (9%)
280:318 (3%)
view
30 x 2 experiments/overlap/augmentations/utils
imagenet_c_bar/utils
converters.py
converters.py
10:44 (100%)
10:44 (100%)
view
29 x 2 experiments/overlap/augmentations
imagenet_c_bar
obscure.py
corrupt.py
134:169 (17%)
648:679 (3%)
view
27 x 2 experiments/overlap/augmentations
imagenet_c_bar
pil.py
corrupt.py
562:592 (6%)
999:1029 (3%)
view
27 x 2 experiments/overlap/augmentations
imagenet_c_bar
distortion.py
corrupt.py
161:197 (9%)
815:851 (3%)
view
25 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
81:111 (7%)
66:96 (2%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 43 unit duplicates...
Size#FoldersFilesLinesCode
36 x 2 experiments/overlap/augmentations
imagenet_c_bar
color.py
corrupt.py
0:0 
0:0 
view
30 x 2 experiments/overlap/augmentations
experiments/overlap/augmentations
pil.py
pil.py
0:0 
0:0 
view
33 x 2 experiments/overlap
notebook_utils
wideresnet.py
wideresnet.py
0:0 
0:0 
view
28 x 2 experiments/overlap/augmentations
imagenet_c_bar
base.py
base.py
0:0 
0:0 
view
25 x 2 experiments/overlap/augmentations
imagenet_c_bar
distortion.py
corrupt.py
0:0 
0:0 
view
25 x 2 experiments/overlap/augmentations/utils
imagenet_c_bar/utils
noise.py
perlin_noise.py
0:0 
0:0 
view
24 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
0:0 
0:0 
view
23 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
0:0 
0:0 
view
23 x 2 experiments/overlap
notebook_utils
wideresnet.py
wideresnet.py
0:0 
0:0 
view
21 x 4 experiments
experiments
experiments
experiments
train_imagenet_jsd.py
severity_scan_imagenet.py
severity_scan.py
train_imagenet.py
0:0 
0:0 
0:0 
0:0 
view
20 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
0:0 
0:0 
view
19 x 2 experiments/overlap
experiments/overlap
datasets.py
datasets.py
0:0 
0:0 
view
19 x 2 experiments/overlap/augmentations
imagenet_c_bar
color.py
corrupt.py
0:0 
0:0 
view
18 x 2 experiments/tools
experiments
get_target_error.py
sample_datasets.py
0:0 
0:0 
view
18 x 2 experiments/overlap/augmentations/utils
imagenet_c_bar/utils
noise.py
perlin_noise.py
0:0 
0:0 
view
18 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
0:0 
0:0 
view
18 x 2 experiments/overlap/augmentations
imagenet_c_bar
pil.py
corrupt.py
0:0 
0:0 
view
18 x 2 experiments/overlap/augmentations
imagenet_c_bar
pil.py
corrupt.py
0:0 
0:0 
view
17 x 2 experiments/overlap/augmentations
imagenet_c_bar
additive_noise.py
corrupt.py
0:0 
0:0 
view
15 x 2 experiments/overlap/augmentations/utils
imagenet_c_bar/utils
image.py
image.py
0:0 
0:0 
view