edd74909eb1cef75e88e50af6fee48bb6615b7fb,my/tokenize.py,,main,#,47
Before Change
def main(unused_argv):
for line in STDIN:
STDOUT.write("\n%s" % line)
line = line.rstrip("\n")
end = 0
for match in TOKEN.finditer(line):
if match.start() != end:
unmatched = line[end:match.start()]
STDOUT.write("Unmatched: %s\n" % repr(unmatched))
kind_token = GetToken(match)
STDOUT.write("token %6s: %s\n" % kind_token)
end = match.end()
if end < len(line):
STDOUT.write("Unmatched: %s\n" % repr(line[end:]))
return
After Change
tokens = list(Tokenize(line))
if not tokens:
continue
if all(kind in ("native", "punct", "space") for (kind, token) in tokens):
STDOUT.write("%s\n" % " ".join(token for (kind, token) in tokens
if kind == "native"))
else:
STDERR.write("%s\n" % line)
return
if __name__ == "__main__":

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: google/language-resources
Commit Name: edd74909eb1cef75e88e50af6fee48bb6615b7fb
Time: 2016-05-26
Author: mjansche@google.com
File Name: my/tokenize.py
Class Name:
Method Name: main
Project Name: pyinstaller/pyinstaller
Commit Name: 5ae5a2d4af15e570a74bc4541ac153ad12cddec5
Time: 2021-01-05
Author: dan@yeaw.me
File Name: PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py
Class Name:
Method Name:
Project Name: comic/grand-challenge.org
Commit Name: 4d9d2a1fc4e0d9289000a235340235802d51a97a
Time: 2021-02-12
Author: 57257130+MikeOverkamp-diag@users.noreply.github.com
File Name: app/grandchallenge/cases/image_builders/dicom.py
Class Name:
Method Name: _create_itk_from_dcm