244940504e919a9f5c4e191f3d121ecebec00950,tests/chunking/test_chunking.py,,load_input,#Any#,12
Before Change
def load_input(input_file):
if sys.version_info >= (3, 0):
content = [text.split("\t")[0] for text in open(input_file, "r", encoding="utf-8").read().strip().split("\n")]
content = " ".join(content)
return content
else:
content = [text.split("\t")[0].decode("utf-8") for text in open(input_file, "r").read().strip().split("\n")]
After Change
def load_input(input_file):
lines = read(input_file).strip().split("\n")
content = [line.split("\t")[0] for line in lines]
content = u" ".join(content)
return content
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances
Project Name: undertheseanlp/underthesea
Commit Name: 244940504e919a9f5c4e191f3d121ecebec00950
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/chunking/test_chunking.py
Class Name:
Method Name: load_input
Project Name: etal/cnvkit
Commit Name: fa662d348e088ad1709f554aa5268e7a774a0fe8
Time: 2015-08-13
Author: eric.talevich@gmail.com
File Name: cnvlib/reference.py
Class Name:
Method Name: bed2probes
Project Name: undertheseanlp/underthesea
Commit Name: 251a43f5bfa33fcbdf47d229cd969eb919e0f8ca
Time: 2017-07-07
Author: brother.rain.1024@gmail.com
File Name: underthesea/corpus/readers/dictionary_loader.py
Class Name: DictionaryLoader
Method Name: words
Project Name: minimaxir/textgenrnn
Commit Name: 6b1dda39d64647cb7b4e5b1d7feee759c77c41e4
Time: 2020-05-10
Author: josh.prewer@focusrite.com
File Name: textgenrnn/utils.py
Class Name:
Method Name: textgenrnn_texts_from_file