7ef05274835b2272b1b431d3633d0559db684197,textblob/translate.py,Translator,_get_translation_from_json5,#Translator#Any#,71

Before Change



    def _get_translation_from_json5(self, content):
        result = u""
        pos = 2
        while True:
            m = self.translation_pattern.match(content, pos)
            if not m:
                break
            result += m.group(1)
            pos = m.end()
        return _unescape(result)

    def _get_json5(self, url, host=None, type_=None, data=None):

After Change


    def _get_translation_from_json5(self, content):
        result = u""
        json_data = json.loads(content)
        if "sentences" in json_data:
            result = "".join([s["trans"] for s in json_data["sentences"]])
        return _unescape(result)

    def _get_json5(self, url, host=None, type_=None, data=None):
        encoded_data = urlencode(data).encode("utf-8")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: sloria/TextBlob
Commit Name: 7ef05274835b2272b1b431d3633d0559db684197
Time: 2015-06-08
Author: jschnurr@gmail.com
File Name: textblob/translate.py
Class Name: Translator
Method Name: _get_translation_from_json5


Project Name: sloria/TextBlob
Commit Name: 7ef05274835b2272b1b431d3633d0559db684197
Time: 2015-06-08
Author: jschnurr@gmail.com
File Name: textblob/translate.py
Class Name: Translator
Method Name: _get_translation_from_json5


Project Name: mlpack/benchmarks
Commit Name: a60c0d90de304b8d2768da0e2110527edea96910
Time: 2017-06-29
Author: ryan@ratml.org
File Name: methods/scikit/linear_ridge_regression.py
Class Name: LinearRidgeRegression
Method Name: RunMetrics


Project Name: mlpack/benchmarks
Commit Name: a60c0d90de304b8d2768da0e2110527edea96910
Time: 2017-06-29
Author: ryan@ratml.org
File Name: methods/shogun/linear_ridge_regression.py
Class Name: LinearRidgeRegression
Method Name: RunMetrics