97f9d00c54118f6bd0bdb2f161a9a4b66fb0631e,estnltk/core.py,,as_binary,#Any#Any#,47

Before Change


    """
    if six.PY2 and isinstance(word, unicode):
        return s.encode(encoding)
    elif six.PY3 and isinstance(word, str):
        return s.encode(encoding) // bytes must be in utf8
    return s.decode(encoding).encode(encoding)

After Change


    """Convert the string to binary"""
    if isinstance(s, six.text_type):
        return s.encode(encoding)
    elif isinstance(s, six.binary_type):
        // make sure the binary is in required encoding
        return s.decode(encoding).encode(encoding)
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: estnltk/estnltk
Commit Name: 97f9d00c54118f6bd0bdb2f161a9a4b66fb0631e
Time: 2014-11-12
Author: brainscauseminds@gmail.com
File Name: estnltk/core.py
Class Name:
Method Name: as_binary


Project Name: matplotlib/matplotlib
Commit Name: d7162a562cbade626955d752bfc8a9e056ce1819
Time: 2018-02-26
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/category.py
Class Name: StrCategoryFormatter
Method Name: _text


Project Name: tensorflow/tensorboard
Commit Name: 005be3f794c134d26fc9adb98c4dffcbccd33f89
Time: 2019-05-10
Author: jameswex@users.noreply.github.com
File Name: tensorboard/plugins/interactive_inference/witwidget/notebook/visualization.py
Class Name: WitConfigBuilder
Method Name: _convert_json_to_tf_examples