facebookresearch / mobile-vision
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
  • 24% duplication:
    • 11,067 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,744 duplicated lines
  • 839 duplicates
system24% (2,744 lines)
Duplication per Extension
py24% (2,744 lines)
Duplication per Component (primary)
mobile_cv/arch/fbnet_v238% (2,386 lines)
mobile_cv/lut/lib20% (226 lines)
mobile_cv/arch/utils4% (44 lines)
mobile_cv/common/misc5% (28 lines)
mobile_cv/model_zoo/tools3% (24 lines)
mobile_cv/arch/quantization17% (18 lines)
mobile_cv/arch/layers6% (18 lines)
mobile_cv0% (0 lines)
mobile_cv/lut0% (0 lines)
mobile_cv/model_zoo/tasks0% (0 lines)
mobile_cv/model_zoo/datasets0% (0 lines)
mobile_cv/model_zoo0% (0 lines)
mobile_cv/model_zoo/models0% (0 lines)
mobile_cv/common0% (0 lines)
mobile_cv/arch0% (0 lines)
mobile_cv/predictor0% (0 lines)
ROOT0% (0 lines)
runtime_lut/code0% (0 lines)
runtime_lut/scripts0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 839 duplicates...
Size#FoldersFilesLinesCode
68 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv3.py
fbnet_modeldef_cls_fbnetv3.py
434:501 (7%)
513:580 (7%)
view
55 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
578:637 (6%)
687:746 (6%)
view
48 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv3.py
fbnet_modeldef_cls_fbnetv3.py
816:863 (5%)
895:942 (5%)
view
46 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
730:777 (5%)
839:886 (5%)
view
42 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv3.py
fbnet_modeldef_cls_fbnetv3.py
54:95 (4%)
98:139 (4%)
view
40 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
243:286 (4%)
356:399 (4%)
view
39 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv2.py
fbnet_modeldef_cls_fbnetv2.py
230:268 (15%)
273:311 (15%)
view
37 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv3.py
fbnet_modeldef_cls_fbnetv3.py
592:628 (3%)
671:707 (3%)
view
31 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
481:512 (3%)
699:730 (3%)
view
31 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
514:545 (3%)
623:654 (3%)
view
31 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
33:64 (3%)
142:173 (3%)
view
31 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
481:512 (3%)
590:621 (3%)
view
31 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_efficient_net_v2.py
fbnet_modeldef_cls_efficient_net_v2.py
288:319 (3%)
401:432 (3%)
view
29 x 2 mobile_cv/lut/lib
mobile_cv/lut/lib
lut_ops.py
lut_ops.py
76:106 (6%)
154:184 (6%)
view
29 x 2 mobile_cv/lut/lib
mobile_cv/lut/lib
lut_ops.py
lut_ops.py
76:106 (6%)
220:250 (6%)
view
29 x 2 mobile_cv/lut/lib
mobile_cv/lut/lib
lut_ops.py
lut_ops.py
154:184 (6%)
220:250 (6%)
view
29 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv2.py
fbnet_modeldef_cls_fbnetv2.py
63:99 (11%)
104:140 (11%)
view
26 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv2.py
fbnet_modeldef_cls_fbnetv2.py
104:136 (10%)
145:177 (10%)
view
26 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
fbnet_modeldef_cls_fbnetv2.py
fbnet_modeldef_cls_fbnetv2.py
63:95 (10%)
145:177 (10%)
view
23 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
irf_spade.py
irf_spade.py
25:51 (20%)
80:106 (20%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
irf_spade.py
irf_spade.py
0:0 
0:0 
view
10 x 2 mobile_cv/lut/lib
mobile_cv/lut/lib
lut_ops.py
lut_ops.py
0:0 
0:0 
view
6 x 2 mobile_cv/arch/fbnet_v2
mobile_cv/arch/fbnet_v2
basic_blocks.py
basic_blocks.py
0:0 
0:0 
view
8 x 2 mobile_cv/arch/utils
mobile_cv/arch/utils
fuse_utils.py
fuse_utils.py
0:0 
0:0 
view