5464fc26226597d26b4705b6cbce3dd092b9706c,ggplot/stats/stat.py,stat,__deepcopy__,#stat#Any#,41

Before Change


            // don"t make a deepcopy of data!
            if key == "data":
                result.__dict__[key] = self.__dict__[key]
                continue
            result.__dict__[key] = deepcopy(self.__dict__[key], memo)
        return result

    @classmethod

After Change


        Deep copy without copying the self.data dataframe
        
        cls = self.__class__
        result = cls.__new__(cls)
        memo[id(self)] = result

        for key, item in self.__dict__.items():
            if key == "_cache":
                result.__dict__[key] = self.__dict__[key]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/stats/stat.py
Class Name: stat
Method Name: __deepcopy__


Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/components/layer.py
Class Name: layer
Method Name: __deepcopy__


Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom.py
Class Name: geom
Method Name: __deepcopy__


Project Name: has2k1/plotnine
Commit Name: 5464fc26226597d26b4705b6cbce3dd092b9706c
Time: 2015-10-12
Author: has2k1@gmail.com
File Name: ggplot/ggplot.py
Class Name: ggplot
Method Name: __deepcopy__