82a1499783ede1f2a0894de524df92a931a86e77,rllab/core/serializable.py,Serializable,clone,#Any#Any#,50

Before Change


    def clone(cls, obj, **kwargs):
        assert isinstance(obj, Serializable)
        d = obj.__getstate__()
        d["__kwargs"] = dict(d["__kwargs"], **kwargs)
        out = type(obj).__new__(type(obj))
        out.__setstate__(d)
        return out

After Change


        // Split the entries in kwargs between positional and keyword arguments
        // and update d["__args"] and d["__kwargs"], respectively.
        if sys.version_info >= (3, 0):
            spec = inspect.getfullargspec(obj.__init__)
        else:
            spec = inspect.getargspec(obj.__init__)
        in_order_args = spec.args[1:]

        d["__args"] = list(d["__args"])
        for kw, val in kwargs.items():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rlworkgroup/garage
Commit Name: 82a1499783ede1f2a0894de524df92a931a86e77
Time: 2017-07-18
Author: haarnoja@users.noreply.github.com
File Name: rllab/core/serializable.py
Class Name: Serializable
Method Name: clone


Project Name: keras-team/autokeras
Commit Name: 2f1f42eeb68c64ff991c0ae2e8253a9305e90f74
Time: 2019-07-04
Author: jhfjhfj1@gmail.com
File Name: autokeras/auto/tuner.py
Class Name: AutoTuner
Method Name: run_trial