facebook / Ax
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
  • 15% duplication:
    • 45,446 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 7,233 duplicated lines
  • 2,844 duplicates
system15% (7,233 lines)
Duplication per Extension
py14% (5,799 lines)
ipynb34% (1,372 lines)
js5% (50 lines)
css<1% (12 lines)
Duplication per Component (primary)
ax/models27% (1,614 lines)
tutorials34% (1,372 lines)
ax/modelbridge18% (1,312 lines)
ax/plot19% (1,114 lines)
ax/storage10% (496 lines)
ax/service8% (353 lines)
ax/core7% (326 lines)
ax/utils7% (276 lines)
ax/benchmark12% (128 lines)
ax/early_stopping24% (112 lines)
ax/metrics9% (83 lines)
website/static1% (25 lines)
ax/benchmark24% (12 lines)
ax16% (10 lines)
ax/global_stopping0% (0 lines)
ax/exceptions0% (0 lines)
ax/runners0% (0 lines)
ROOT0% (0 lines)
website/core0% (0 lines)
website0% (0 lines)
website/pages0% (0 lines)
sphinx/source0% (0 lines)
scripts0% (0 lines)

Duplication Between Components (50+ lines)

G ax/modelbridge ax/modelbridge ax/utils ax/utils ax/modelbridge--ax/utils 82 ax/models ax/models ax/modelbridge--ax/models 76 ax/benchmark ax/benchmark ax/benchmark--ax/models 61

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 2,844 duplicates...
Size#FoldersFilesLinesCode
52 x 2 ax/plot
ax/plot
313:365 (6%)
415:467 (6%)
view
40 x 2 ax/service
ax/service
1254:1295 (4%)
513:554 (4%)
view
36 x 2 ax/modelbridge
ax/modelbridge
123:177 (7%)
633:684 (7%)
view
31 x 2 ax/plot
ax/plot
443:473 (2%)
653:683 (2%)
view
28 x 2 tutorials
tutorials
914:941 (2%)
931:958 (2%)
view
26 x 2 ax/plot
ax/plot
163:188 (6%)
653:678 (2%)
view
26 x 2 ax/plot
ax/plot
163:188 (6%)
443:468 (2%)
view
24 x 2 ax/plot
ax/plot
199:222 (3%)
756:779 (3%)
view
24 x 2 ax/utils/common
ax/utils/common
86:110 (19%)
121:145 (19%)
view
24 x 2 tutorials
tutorials
695:718 (2%)
744:767 (1%)
view
23 x 2 ax/storage/sqa_store
ax/storage/sqa_store
23:57 (2%)
20:52 (3%)
view
23 x 2 ax/modelbridge
ax/modelbridge
549:577 (4%)
587:616 (4%)
view
22 x 2 ax/plot
ax/plot
547:568 (2%)
682:703 (2%)
view
21 x 2 ax/models/torch
ax/models/torch
320:342 (7%)
222:244 (10%)
view
19 x 2 ax/plot
ax/plot
475:493 (1%)
685:703 (1%)
view
19 x 2 ax/storage/sqa_store
ax/storage/sqa_store
103:121 (2%)
153:171 (2%)
view
18 x 2 ax/models/torch
ax/models/torch
135:161 (14%)
68:94 (25%)
view
17 x 2 ax/models/torch
ax/models/torch
105:146 (6%)
177:219 (6%)
view
17 x 2 ax/modelbridge/transforms
ax/modelbridge/transforms
144:161 (13%)
50:67 (30%)
view
17 x 2 ax/models/torch
ax/models/torch
247:263 (3%)
323:339 (3%)
view
16 x 2 ax/modelbridge
ax/modelbridge
364:388 (3%)
653:677 (3%)
view
16 x 2 ax/modelbridge/transforms
ax/modelbridge/transforms
92:108 (12%)
97:114 (17%)
view
16 x 2 ax/plot
ax/plot
523:538 (2%)
652:667 (2%)
view
16 x 2 ax/modelbridge/transforms
ax/modelbridge/transforms
30:46 (31%)
31:47 (24%)
view
16 x 2 ax/modelbridge
ax/modelbridge
145:169 (3%)
364:388 (3%)
view
15 x 2 ax/models/torch
ax/models/torch
378:393 (4%)
359:374 (6%)
view
15 x 2 ax/metrics
ax/metrics
107:134 (7%)
230:258 (7%)
view
15 x 2 ax/models/torch
ax/models/torch
258:272 (4%)
218:232 (6%)
view
15 x 2 ax/models/torch
ax/models/torch
43:69 (5%)
41:67 (7%)
view
15 x 2 tutorials
tutorials
719:733 (1%)
769:783 (1%)
view
15 x 2 ax/metrics
ax/metrics
87:102 (14%)
84:99 (27%)
view
15 x 2 ax/early_stopping/strategies
ax/early_stopping/strategies
65:95 (12%)
45:75 (16%)
view
14 x 2 ax/models/torch
ax/models/torch
312:325 (4%)
171:184 (7%)
view
14 x 2 ax/early_stopping/strategies
ax/early_stopping/strategies
115:129 (11%)
83:97 (15%)
view
14 x 2 ax/plot
ax/plot
261:275 (2%)
856:870 (2%)
view
14 x 2 ax/models/torch
ax/models/torch
589:602 (2%)
55:69 (7%)
view
14 x 2 ax/modelbridge
ax/modelbridge
247:260 (2%)
86:99 (8%)
view
13 x 2 ax/modelbridge
ax/modelbridge
481:494 (2%)
885:898 (1%)
view
13 x 2 ax/plot
ax/plot
1284:1296 (1%)
1438:1450 (1%)
view
13 x 2 ax/models/torch
ax/models
172:184 (7%)
69:81 (17%)
view
13 x 2 ax/models/torch
ax/models
313:325 (3%)
69:81 (17%)
view
13 x 2 ax/storage/sqa_store
ax/storage/sqa_store
33:52 (1%)
27:43 (20%)
view
13 x 2 tutorials
tutorials
466:478 (2%)
1184:1196 (1%)
view
13 x 2 ax/modelbridge
ax/modelbridge
306:319 (2%)
468:481 (2%)
view
13 x 2 tutorials
tutorials
1127:1139 (1%)
615:627 (2%)
view
13 x 2 ax/models/torch
ax/models/torch/botorch_modular
411:424 (3%)
304:317 (4%)
view
13 x 2 ax/modelbridge/transforms
ax/modelbridge/transforms
27:40 (29%)
27:40 (29%)
view
13 x 2 ax/modelbridge/transforms
ax/modelbridge/transforms
101:114 (13%)
144:157 (12%)
view
13 x 2 ax/utils/testing
ax/utils/testing
41:53 (5%)
57:69 (5%)
view
13 x 2 tutorials
tutorials
615:627 (2%)
554:566 (2%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
9 x 3 ax/models/torch
ax/models/torch
ax/models/torch
0:0 
0:0 
0:0 
view
7 x 2 ax/models/discrete
ax/models
0:0 
0:0 
view
6 x 3 ax/models/random
ax/models/random
ax/models/random
0:0 
0:0 
0:0 
view