154add50a17fec0754ab365ea88c3c485e49cd04,tpot/base.py,TPOTBase,__init__,#TPOTBase#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,76

Before Change


        // define operator dictionary
        if operator_dict_file:
            try:
                exec(open(operator_dict_file, "r").read())
            except:
                raise TypeError("The operator dictionary file is in bad format or not available! "
                                "Please check the dictionary file")
        self.operators = []

After Change


        // define operator dictionary
        if operator_dict_file:
            try:
                with open(operator_dict_file,"r") as inf:
                    file_string =  inf.read()
                    operator_dict = eval(file_string[file_string.find("{"):(file_string.rfind("}")+1)])
                self.operator_dict = operator_dict
            except Exception as e:
                print(e)
                raise TypeError("The operator dictionary file is in bad format or not available! "
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: EpistasisLab/tpot
Commit Name: 154add50a17fec0754ab365ea88c3c485e49cd04
Time: 2017-02-14
Author: weixuanf@upenn.edu
File Name: tpot/base.py
Class Name: TPOTBase
Method Name: __init__


Project Name: rlworkgroup/garage
Commit Name: e2035fd5afc6005ea810f85364e5d1cc5b0df9c6
Time: 2019-05-15
Author: ryanjulian@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name:


Project Name: GPflow/GPflow
Commit Name: 4e2d5aadad95f4a91e4043e7f473afc71e55fbcd
Time: 2019-06-07
Author: art.art.v@gmail.com
File Name: setup.py
Class Name:
Method Name: