c076093d4e84a97e4d347d3db514bcfaf9cae965,src/gluonnlp/utils/registry.py,Registry,create,#Registry#Any#,133

Before Change


        ret
            The created object
        
        return self.get(name)(*args, **kwargs)

    def create_with_json(self, name: str, json_str: str):
        

After Change


        try:
            return obj(*args, **kwargs)
        except Exception as exp:
            print("Cannot create name="{}" --> {} with the provided arguments!\n"
                  "   args={},\n"
                  "   kwargs={},\n"
                  .format(name, obj, args, kwargs))
            raise exp

    def create_with_json(self, name: str, json_str: str):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/gluon-nlp
Commit Name: c076093d4e84a97e4d347d3db514bcfaf9cae965
Time: 2020-09-02
Author: xshiab@connect.ust.hk
File Name: src/gluonnlp/utils/registry.py
Class Name: Registry
Method Name: create


Project Name: ray-project/ray
Commit Name: 1b1466748f1db72835a594d73d502e9787e080a9
Time: 2020-09-04
Author: wlx65005@gmail.com
File Name: streaming/python/runtime/transfer.py
Class Name: DataReader
Method Name: __init__


Project Name: ray-project/ray
Commit Name: f31ee84bfdc6dc2325c8890412a965e509074d0a
Time: 2020-09-05
Author: wlx65005@gmail.com
File Name: streaming/python/runtime/transfer.py
Class Name: DataReader
Method Name: __init__