9685df29213e5943d2774f80e21564f4204823ec,secuml/core/data/annotations.py,Annotations,get_annotated_ids,#Annotations#Any#Any#,155
Before Change
return families_prop
def get_annotated_ids(self, label="all", family=None):
annotated_ids = [i for i in self.ids.get_ids() if self.is_annotated(i)]
if label == MALICIOUS:
annotated_ids = [i for i in annotated_ids if self.get_label(i)]
elif label == BENIGN:
annotated_ids = [i for i in annotated_ids if not self.get_label(i)]
After Change
return families_prop
def get_annotated_ids(self, label="all", family=None):
if label == "all":
mask = self.labels != None // NOQA: 711
else:
mask = self.labels == label_str_to_bool(label)
if family is not None:
family_mask = self.families == family
mask = np.logical_and(mask, family_mask)
return self.ids.ids[mask]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: ANSSI-FR/SecuML
Commit Name: 9685df29213e5943d2774f80e21564f4204823ec
Time: 2019-09-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/core/data/annotations.py
Class Name: Annotations
Method Name: get_annotated_ids
Project Name: flow-project/flow
Commit Name: 1439884477e114f630a4dec1b043dc87d9254d98
Time: 2017-11-03
Author: kanaadp@gmail.com
File Name: flow/core/generator.py
Class Name: Generator
Method Name: make_routes
Project Name: flow-project/flow
Commit Name: 4374f3170aa68316014f8ea92074f8eb5882a112
Time: 2018-04-13
Author: vinitsky.eugene@gmail.com
File Name: flow/envs/bottleneck_env.py
Class Name: DesiredVelocityEnv
Method Name: _apply_rl_actions