b68ab2b4e4cbea341e9b2d16cc58cd24a5859aa5,bears/general/AnnotationBear.py,AnnotationBear,run,#AnnotationBear#Any#Any#Any#Any#,15
Before Change
matches_found = strings_found | comments_found
// Remove Nested
unnested_annotations = set(filter(
lambda arg: not starts_within_ranges(
arg, matches_found),
matches_found))
// Yield different results for strings and comments
strings_found = tuple(filter(lambda arg: arg in unnested_annotations,
strings_found))
comments_found = tuple(filter(lambda arg: arg in unnested_annotations,
After Change
lang_dict["multiline_comment_delimiters"])
comment_delimiter = dict(lang_dict["comment_delimiter"])
string_ranges = comment_ranges = ()
try:
string_ranges, comment_ranges = self.find_annotation_ranges(
file,
filename,
string_delimiters,
multiline_string_delimiters,
comment_delimiter,
multiline_comment_delimiters)
except NoCloseError as e:
yield Result(self, str(e), severity=RESULT_SEVERITY.MAJOR,
affected_code=(e.code,))
content = {"strings": string_ranges, "comments": comment_ranges}
yield HiddenResult(self, content)
def find_annotation_ranges(self,
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 5
Instances
Project Name: coala/coala-bears
Commit Name: b68ab2b4e4cbea341e9b2d16cc58cd24a5859aa5
Time: 2016-07-27
Author: toabhayraizada@gmail.com
File Name: bears/general/AnnotationBear.py
Class Name: AnnotationBear
Method Name: run
Project Name: brian-team/brian2
Commit Name: 2db605d4a44e33306af74892eecbfef75a1d44d8
Time: 2014-02-19
Author: dan.goodman@ens.fr
File Name: brian2/equations/equations.py
Class Name: Equations
Method Name: _sort_static_equations
Project Name: bokeh/bokeh
Commit Name: dd5e27bff94075466bf549deb6dfaab7ad22ed1c
Time: 2017-05-13
Author: bryanv@continuum.io
File Name: bokeh/util/serialization.py
Class Name:
Method Name:
Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: 3ad234f30b3958752df3060b3e8ab751bffeec6c
Time: 2018-11-19
Author: contact@againstthecurrent.ch
File Name: category_encoders/hashing.py
Class Name: HashingEncoder
Method Name: fit
Project Name: polyaxon/polyaxon
Commit Name: d61c70fb1c0aacbdff26a645c030a05fa900e719
Time: 2019-05-30
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/dockerizer_scheduler.py
Class Name:
Method Name: start_dockerizer
Project Name: eth-cscs/reframe
Commit Name: 639af9a9c1bf22a02fed70ea4286510ac4a02297
Time: 2019-11-20
Author: manitaras@cscs.ch
File Name: reframe/core/schedulers/slurm.py
Class Name: SlurmJob
Method Name: get_all_nodes