e7eefe879b9e5b7a279d80588af59d08f21365a1,aletheialib/attacks.py,,difference,#Any#Any#,133
Before Change
flip = (g + cmask) ^ np.abs(mask) - cmask
L.append(np.sign(smoothness(flip) - smoothness(g)))
N = len(L)
R = float(L.count(1))/N
S = float(L.count(-1))/N
return R-S
// }}}
After Change
cmask = - mask
cmask[(mask > 0)] = 0
abs_mask = np.abs(mask)
counts = {}
for g in groups(I, mask):
flip = (g + cmask) ^ abs_mask - cmask
result = np.sign(smoothness(flip) - smoothness(g))
if result not in counts:
counts[result] = 0
counts[result] += 1
N = sum(counts.values())
R = float(counts[1])/N
S = float(counts[-1])/N
return R-S
// }}}
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: daniellerch/aletheia
Commit Name: e7eefe879b9e5b7a279d80588af59d08f21365a1
Time: 2020-11-01
Author: kevin.clark@gmail.com
File Name: aletheialib/attacks.py
Class Name:
Method Name: difference
Project Name: WheatonCS/Lexos
Commit Name: da15160c068d5ffd9ff8fd2fae06a5a3e08cece3
Time: 2017-07-26
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/information.py
Class Name: FileInformation
Method Name: __init__
Project Name: senarvi/theanolm
Commit Name: 0816c636b7d7832a0177a08a08888840d717bed4
Time: 2017-01-24
Author: seppo.git@marjaniemi.com
File Name: theanolm/commands/score.py
Class Name:
Method Name: _score_text
Project Name: Pinafore/qb
Commit Name: 8a305b06b228f495160c777e65dfe22bf1414f44
Time: 2016-06-25
Author: ski.rodriguez@gmail.com
File Name: extract_features.py
Class Name:
Method Name: spark_execute