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: 4
Non-data size: 4
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: MTG/freesound
Commit Name: ad76d9b9f2442e0c938ef100415f35055b823c11
Time: 2017-11-10
Author: andres.ferraro@upf.edu
File Name: search/management/commands/post_dirty_sounds_to_solr.py
Class Name: Command
Method Name: handle
Project Name: azavea/raster-vision
Commit Name: abc8d4b4289dad5535c56a878e9459eeda5d63f5
Time: 2018-09-20
Author: rdemanuele@gmail.com
File Name: src/rastervision/filesystem/s3_filesystem.py
Class Name: S3FileSystem
Method Name: file_exists
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 5b396e9125b9d5f7aa6a46f9d0dc1e1728b3f0b3
Time: 2016-05-11
Author: jonwayne@google.com
File Name: dns/api/main.py
Class Name:
Method Name: get_zone