9c7f926d6d70a994c3710ce570bb9807519ef090,lib/matplotlib/backends/backend_agg.py,FigureCanvasAgg,print_png,#FigureCanvasAgg#Any#,456

Before Change



        version_str = (
            "matplotlib version " + __version__ + ", http://matplotlib.org/")
        metadata = OrderedDict({"Software": version_str})
        user_metadata = kwargs.pop("metadata", None)
        if user_metadata is not None:
            metadata.update(user_metadata)

After Change


            buf, size = self.print_to_buffer()
            // Only use the metadata kwarg if pnginfo is not set, because the
            // semantics of duplicate keys in pnginfo is unclear.
            if "pnginfo" not in pil_kwargs:
                pnginfo = PngInfo()
                for k, v in metadata.items():
                    pnginfo.add_text(k, v)
                pil_kwargs["pnginfo"] = pnginfo
            pil_kwargs.setdefault("dpi", (self.figure.dpi, self.figure.dpi))
            (Image.frombuffer("RGBA", size, buf, "raw", "RGBA", 0, 1)
             .save(filename_or_obj, format="png", **pil_kwargs))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: matplotlib/matplotlib
Commit Name: 9c7f926d6d70a994c3710ce570bb9807519ef090
Time: 2019-01-17
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/backends/backend_agg.py
Class Name: FigureCanvasAgg
Method Name: print_png


Project Name: Theano/Theano
Commit Name: 24e7ed3b8f62fd702b2fea624189f93d145ad8b5
Time: 2017-05-30
Author: nouiz@nouiz.org
File Name: theano/gof/fg.py
Class Name: FunctionGraph
Method Name: orderings


Project Name: tensorflow/cleverhans
Commit Name: 6667fb34f81f5c523c97952f1ea5fe0ba6d769bd
Time: 2017-06-21
Author: papernot@google.com
File Name: cleverhans/model.py
Class Name: KerasModelWrapper
Method Name: fprop