1391067c332600b9273d47221f2b27d4b1895414,brian2/utils/debugging.py,std_silent,__exit__,#std_silent#Any#Any#Any#,43

Before Change


            self.old_stdout.write(self.newout.getvalue())
            self.old_stderr.write(self.newerr.getvalue())
            self.old_stdout.flush()
            self.old_stderr.flush()
        RedirectStdStreams.__exit__(self, exc_type, exc_value, traceback)
        

After Change


            std_silent.dest_stderr.flush()
            if exc_type is not None:
                out = open(std_silent.dest_fname_stdout, "r").read()
                err = open(std_silent.dest_fname_stderr, "r").read()
            os.dup2(self.orig_out_fd, 1)
            os.dup2(self.orig_err_fd, 2)
            os.close(self.orig_out_fd)
            os.close(self.orig_err_fd)
            if exc_type is not None:
                sys.stdout.write(out)
                sys.stderr.write(err)
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: brian-team/brian2
Commit Name: 1391067c332600b9273d47221f2b27d4b1895414
Time: 2014-11-13
Author: dan.goodman@ens.fr
File Name: brian2/utils/debugging.py
Class Name: std_silent
Method Name: __exit__


Project Name: vatlab/SoS
Commit Name: bc823da8c38eae03a311d0ba0627b23b84939b56
Time: 2017-07-30
Author: ben.bog@gmail.com
File Name: src/sos/actions.py
Class Name: SoS_ExecuteScript
Method Name: run


Project Name: tyarkoni/pliers
Commit Name: 3b9d515623ea8421420b92d5e0b951842646a3e2
Time: 2017-01-11
Author: tyarkoni@gmail.com
File Name: pliers/extractors/models.py
Class Name: TensorFlowInceptionV3Extractor
Method Name: _download_pretrained_model