facebookresearch / nevergrad
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
  • 6% duplication:
    • 15,841 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 952 duplicated lines
  • 127 duplicates
system6% (952 lines)
Duplication per Extension
py6% (952 lines)
Duplication per Component (primary)
nevergrad/optimization9% (451 lines)
nevergrad/benchmark11% (397 lines)
nevergrad/functions/photonics7% (34 lines)
nevergrad/functions/rl7% (28 lines)
nevergrad/functions/rocket10% (18 lines)
nevergrad/parametrization<1% (12 lines)
nevergrad/functions/images3% (12 lines)
ROOT0% (0 lines)
nevergrad/benchmark/additional0% (0 lines)
nevergrad/optimization/multiobjective0% (0 lines)
nevergrad0% (0 lines)
nevergrad/common0% (0 lines)
nevergrad/functions0% (0 lines)
nevergrad/functions/fishing0% (0 lines)
nevergrad/functions/stsp0% (0 lines)
nevergrad/functions/causaldiscovery0% (0 lines)
nevergrad/functions/iohprofiler0% (0 lines)
nevergrad/functions/pyomo0% (0 lines)
nevergrad/functions/unitcommitment0% (0 lines)
nevergrad/functions/mixsimulator0% (0 lines)
nevergrad/functions/ml0% (0 lines)
nevergrad/functions/olympussurfaces0% (0 lines)
nevergrad/functions/gym0% (0 lines)
nevergrad/functions/games0% (0 lines)
nevergrad/functions/arcoating0% (0 lines)
nevergrad/functions/control0% (0 lines)
nevergrad/functions/mlda0% (0 lines)
nevergrad/functions/multiobjective0% (0 lines)
nevergrad/functions/powersystems0% (0 lines)
nevergrad/ops0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 127 duplicates...
Size#FoldersFilesLinesCode
21 x 2 nevergrad/optimization
nevergrad/optimization
recastlib.py
recastlib.py
168:212 (9%)
296:340 (9%)
view
17 x 2 nevergrad/optimization
nevergrad/optimization
optimizerlib.py
optimizerlib.py
2777:2793 (<1%)
2849:2865 (<1%)
view
17 x 2 nevergrad/benchmark
nevergrad/benchmark
experiments.py
experiments.py
983:1001 (1%)
1014:1032 (1%)
view
16 x 2 nevergrad/optimization
nevergrad/optimization
recastlib.py
recastlib.py
214:250 (7%)
342:371 (7%)
view
13 x 2 nevergrad/benchmark
nevergrad/benchmark
experiments.py
frozenexperiments.py
1066:1080 (<1%)
252:266 (5%)
view
12 x 2 nevergrad/benchmark
nevergrad/benchmark
frozenexperiments.py
frozenexperiments.py
141:153 (5%)
166:178 (5%)
view
12 x 2 nevergrad/benchmark
nevergrad/benchmark
experiments.py
optgroups.py
1899:1910 (<1%)
189:200 (6%)
view
12 x 2 nevergrad/optimization
nevergrad/optimization
optimizerlib.py
optimizerlib.py
737:751 (<1%)
2273:2286 (<1%)
view
11 x 2 nevergrad/benchmark
nevergrad/benchmark
experiments.py
experiments.py
1284:1296 (<1%)
1306:1318 (<1%)
view
11 x 2 nevergrad/benchmark
nevergrad/benchmark
experiments.py
experiments.py
1044:1056 (<1%)
1068:1080 (<1%)
view
11 x 2 nevergrad/optimization
nevergrad/optimization
optimizerlib.py
optimizerlib.py
2297:2307 (<1%)
2309:2320 (<1%)
view
11 x 2 nevergrad/benchmark
nevergrad/benchmark
experiments.py
frozenexperiments.py
1044:1056 (<1%)
254:266 (5%)
view
10 x 2 nevergrad/benchmark
nevergrad/benchmark
frozenexperiments.py
frozenexperiments.py
119:128 (4%)
144:153 (4%)
view
10 x 2 nevergrad/benchmark
nevergrad/benchmark
frozenexperiments.py
frozenexperiments.py
95:104 (4%)
169:178 (4%)
view
10 x 2 nevergrad/benchmark
nevergrad/benchmark
frozenexperiments.py
frozenexperiments.py
95:104 (4%)
144:153 (4%)
view
10 x 2 nevergrad/optimization
nevergrad/optimization
oneshot.py
oneshot.py
254:263 (3%)
386:395 (3%)
view
10 x 2 nevergrad/benchmark
nevergrad/benchmark
frozenexperiments.py
frozenexperiments.py
95:104 (4%)
119:128 (4%)
view
10 x 2 nevergrad/optimization
nevergrad/optimization
optimizerlib.py
optimizerlib.py
714:726 (<1%)
2244:2256 (<1%)
view
10 x 2 nevergrad/benchmark
nevergrad/benchmark
frozenexperiments.py
frozenexperiments.py
119:128 (4%)
169:178 (4%)
view
9 x 2 nevergrad/functions/photonics
nevergrad/functions/photonics
photonics.py
photonics.py
365:373 (2%)
403:411 (2%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
8 x 2 nevergrad/optimization
nevergrad/optimization
optimizerlib.py
optimizerlib.py
0:0 
0:0 
view
6 x 2 nevergrad/optimization
nevergrad/optimization
recastlib.py
recastlib.py
0:0 
0:0 
view