80ee39154b951c2c50ae2067f560aad81510a13f,tests/word_sent/test_word_sent.py,,load_output,#Any#,21

Before Change



def load_output(output_file):
    if sys.version_info >= (3, 0):
        return [text for text in open(output_file, "r").read().strip().split("\n")]
    else:
        return [text.decode("utf-8") for text in open(output_file, "r").read().strip().split("\n")]

After Change




def load_output(output_file):
    with io.open(output_file, "r", encoding="utf-8") as f:
        content = f.read().strip()
        return [text for text in content.split("\n")]


def save_temp(id, output):
    test_dir = join(dirname(__file__), "samples", "accuracy")
    temp_file = join(test_dir, "%s.tmp" % id)
    content = u"\n".join(output)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: undertheseanlp/underthesea
Commit Name: 80ee39154b951c2c50ae2067f560aad81510a13f
Time: 2017-07-04
Author: brother.rain.1024@gmail.com
File Name: tests/word_sent/test_word_sent.py
Class Name:
Method Name: load_output


Project Name: rlworkgroup/garage
Commit Name: e2035fd5afc6005ea810f85364e5d1cc5b0df9c6
Time: 2019-05-15
Author: ryanjulian@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name:


Project Name: GPflow/GPflow
Commit Name: 4e2d5aadad95f4a91e4043e7f473afc71e55fbcd
Time: 2019-06-07
Author: art.art.v@gmail.com
File Name: setup.py
Class Name:
Method Name: