facebookresearch / alma
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
  • 42% duplication:
    • 4,305 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,829 duplicated lines
  • 258 duplicates
system42% (1,829 lines)
Duplication per Extension
py33% (1,210 lines)
yaml94% (619 lines)
Duplication per Component (primary)
crlapi/sl/clmodels52% (821 lines)
configs/mnist95% (421 lines)
configs/cifar1093% (232 lines)
crlapi/sl/architectures21% (120 lines)
crlapi/sl/streams52% (109 lines)
crlapi/sl/architectures/firefly_vgg/sp8% (69 lines)
crlapi12% (57 lines)
crlapi/sl/architectures/firefly_vgg0% (0 lines)

Duplication Between Components (50+ lines)

G configs/cifar10 configs/cifar10 configs/mnist configs/mnist configs/cifar10--configs/mnist 477

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 258 duplicates...
Size#FoldersFilesLinesCode
59 x 2 configs/cifar10
configs/cifar10
agg_ensemble_vgg.yaml
kensemble_vgg.yaml
24:96 (75%)
24:96 (75%)
view
46 x 2 crlapi/sl/clmodels
crlapi/sl/clmodels
bagging.py
k_ensemble.py
128:193 (32%)
101:167 (34%)
view
37 x 2 configs/mnist
configs/mnist
agg_ensemble.yaml
kensemble.yaml
46:89 (52%)
46:89 (52%)
view
36 x 2 configs/mnist
configs/mnist
bagging.yaml
ensemble_ensemble.yaml
45:87 (51%)
44:86 (52%)
view
36 x 2 configs/mnist
configs/mnist
boosting.yaml
ensemble_ensemble.yaml
45:87 (50%)
44:86 (52%)
view
36 x 2 configs/mnist
configs/mnist
bagging.yaml
boosting.yaml
45:87 (51%)
45:87 (50%)
view
29 x 2 configs/cifar10
configs/mnist
agg_ensemble_vgg.yaml
kensemble.yaml
63:96 (37%)
56:89 (40%)
view
29 x 2 configs/cifar10
configs/mnist
agg_ensemble_vgg.yaml
agg_ensemble.yaml
63:96 (37%)
56:89 (40%)
view
29 x 2 configs/cifar10
configs/mnist
kensemble_vgg.yaml
kensemble.yaml
63:96 (37%)
56:89 (40%)
view
29 x 2 configs/cifar10
configs/mnist
kensemble_vgg.yaml
agg_ensemble.yaml
63:96 (37%)
56:89 (40%)
view
29 x 2 crlapi/sl/clmodels
crlapi/sl/clmodels
adaboost.py
debug_ensemble.py
154:192 (20%)
107:146 (29%)
view
28 x 2 crlapi/sl/clmodels
crlapi/sl/clmodels
debug_ensemble.py
ensemble.py
92:133 (28%)
124:163 (22%)
view
28 x 2 crlapi/sl/architectures
crlapi/sl/architectures
mixture_model.py
mixture_model.py
103:134 (14%)
164:195 (14%)
view
27 x 2 crlapi/sl/clmodels
crlapi/sl/clmodels
finetune_grow.py
firefly.py
86:125 (30%)
111:150 (10%)
view
26 x 2 configs/cifar10
configs/mnist
agg_ensemble_vgg.yaml
ensemble.yaml
66:96 (33%)
56:86 (37%)
view
26 x 2 configs/mnist
configs/mnist
agg_ensemble.yaml
ensemble.yaml
59:89 (36%)
56:86 (37%)
view
26 x 2 configs/cifar10
configs/mnist
kensemble_vgg.yaml
ensemble.yaml
66:96 (33%)
56:86 (37%)
view
26 x 2 configs/mnist
configs/mnist
ensemble.yaml
kensemble.yaml
56:86 (37%)
59:89 (36%)
view
25 x 2 configs/cifar10
configs/mnist
transfer_subnet_vgg.yaml
bagging.yaml
62:93 (33%)
58:87 (35%)
view
25 x 2 configs/cifar10
configs/mnist
transfer_subnet_vgg.yaml
boosting.yaml
62:93 (33%)
58:87 (35%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
15 x 2 crlapi/sl/clmodels
crlapi/sl/clmodels
boosting.py
ensemble.py
0:0 
0:0 
view
13 x 2 crlapi/sl/architectures
crlapi/sl/architectures
mixture_model.py
mixture_model.py
0:0 
0:0 
view
10 x 2 crlapi/sl/architectures
crlapi/sl/architectures
mixture_model.py
mixture_model.py
0:0 
0:0 
view
9 x 2 configs/mnist
configs/cifar10
run.py
run.py
0:0 
0:0 
view
6 x 3 crlapi/sl/clmodels
crlapi/sl/clmodels
crlapi/sl/clmodels
firefly.py
finetune_grow.py
finetune.py
0:0 
0:0 
0:0 
view