139259ac8ac83160502cbb896371ce4fa4027361,primelib/primelib.py,,sieveEr,#Any#,96
Before Change
beginList[j] = 0
// filters actual prime numbers.
ans = [x for x in beginList if x != 0]
// precondition
assert isinstance(ans, list), ""ans" must been from type list"
After Change
primes = [True for x in xrange(N + 1)]
for p in xrange(2, sqrt(N) + 1):
if (primes[p]):
for i in xrange(p*p, N + 1, p):
primes[i] = False
ret = []
for p in xrange(N + 1):
if primes[p]:
ret.append(p)
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances Project Name: geekcomputers/Python
Commit Name: 139259ac8ac83160502cbb896371ce4fa4027361
Time: 2019-10-10
Author: ml.smiley3@gmail.com
File Name: primelib/primelib.py
Class Name:
Method Name: sieveEr
Project Name: astroML/astroML
Commit Name: 4e70cb5fc9a9494e866ccd7d2e1a9046091b6337
Time: 2018-11-16
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/gauss_mixture.py
Class Name: GaussianMixture1D
Method Name: __init__
Project Name: pymc-devs/pymc3
Commit Name: f565c6fccb4dd503f13f01146d0a6c841c0e13f6
Time: 2016-10-03
Author: becker.mr@gmail.com
File Name: pymc3/diagnostics.py
Class Name:
Method Name: gelman_rubin
Project Name: soft-matter/trackpy
Commit Name: 42be11c7824427fb0a8490f3bcd635410ded57b3
Time: 2017-07-27
Author: caspervdw@gmail.com
File Name: trackpy/linking/find_link.py
Class Name: FindLinker
Method Name: get_relocate_candidates
Project Name: CamDavidsonPilon/lifelines
Commit Name: fef719bc6fab1e904ed3d587a696d9a87744514d
Time: 2020-08-24
Author: cam.davidson.pilon@gmail.com
File Name: lifelines/fitters/__init__.py
Class Name: ParametricUnivariateFitter
Method Name: _compute_confidence_bounds_of_transform