facebookresearch / deep-variance-reduction
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
  • 30% duplication:
    • 3,527 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,070 duplicated lines
  • 115 duplicates
system30% (1,070 lines)
Duplication per Extension
py30% (1,070 lines)
Duplication per Component (primary)
ROOT23% (660 lines)
reproduce58% (410 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 115 duplicates...
Size#FoldersFilesLinesCode
39 x 2 reproduce
reproduce
plot_test_error.py
plot_test_error_with_bars.py
13:75 (48%)
13:77 (41%)
view
28 x 2 ROOT
ROOT
UpdatedDataLoader.py
UpdatedDataLoaderMult.py
239:279 (12%)
275:314 (10%)
view
18 x 2 reproduce
reproduce
plot_iterate_distance.py
plot_transform_locking.py
52:76 (29%)
54:77 (28%)
view
18 x 2 reproduce
reproduce
plot_test_error.py
plot_test_error_with_bars.py
105:134 (22%)
127:151 (19%)
view
17 x 2 reproduce
reproduce
plot_iterate_distance.py
plot_transform_locking.py
19:47 (27%)
19:47 (26%)
view
17 x 2 ROOT
ROOT
UpdatedDataLoader.py
UpdatedDataLoaderMult.py
105:125 (7%)
89:108 (6%)
view
17 x 2 ROOT
ROOT
resnet.py
resnet.py
167:184 (8%)
207:224 (8%)
view
15 x 2 ROOT
ROOT
scsg.py
scsg.py
178:199 (5%)
342:364 (5%)
view
15 x 2 ROOT
ROOT
UpdatedDataLoader.py
UpdatedDataLoaderMult.py
219:237 (6%)
255:273 (5%)
view
15 x 2 ROOT
ROOT
resnet.py
resnet.py
43:59 (7%)
126:142 (7%)
view
15 x 2 reproduce
reproduce
plot_iterate_distance.py
plot_variance_ratio.py
19:44 (24%)
20:45 (15%)
view
15 x 2 reproduce
reproduce
plot_transform_locking.py
plot_variance_ratio.py
19:44 (23%)
20:45 (15%)
view
13 x 2 ROOT
ROOT
UpdatedDataLoader.py
UpdatedDataLoaderMult.py
333:348 (5%)
401:416 (4%)
view
13 x 2 ROOT
ROOT
diagnostics.py
diagnostics.py
106:122 (6%)
185:201 (6%)
view
13 x 2 reproduce
reproduce
reproduce_test_error_imagenet.py
reproduce_test_error_imagenet_next.py
10:24 (52%)
10:24 (52%)
view
12 x 2 reproduce
reproduce
plot_iterate_distance.py
plot_variance_ratio.py
62:76 (19%)
76:90 (12%)
view
12 x 2 reproduce
reproduce
plot_transform_locking.py
plot_variance_ratio.py
63:77 (19%)
76:90 (12%)
view
12 x 2 ROOT
ROOT
recompute_svrg.py
scsg.py
151:167 (9%)
219:236 (4%)
view
11 x 2 reproduce
reproduce
reproduce_iterate_distance.py
reproduce_locking_plot.py
25:36 (45%)
25:36 (45%)
view
11 x 2 reproduce
reproduce
plot_iterate_distance.py
plot_transform_locking.py
91:107 (18%)
94:109 (17%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
10 x 2 ROOT
ROOT
UpdatedDataLoaderMult.py
UpdatedDataLoader.py
0:0 
0:0 
view
8 x 2 ROOT
ROOT
resnet.py
resnet.py
0:0 
0:0 
view
7 x 2 ROOT
ROOT
UpdatedDataLoaderMult.py
UpdatedDataLoader.py
0:0 
0:0 
view
6 x 2 ROOT
ROOT
UpdatedDataLoaderMult.py
UpdatedDataLoader.py
0:0 
0:0 
view