c4920ea11ef69a5597b83af961685034c8330e99,openml/setups/setup.py,OpenMLParameter,__str__,#OpenMLParameter#,84

Before Change


        parameter_data_type = "{}Data Type".format(indent)
        parameter_default = "{}Default".format(indent)
        parameter_value = "{}Value".format(indent)
        fields = fields.append(pd.Series({parameter_data_type: self.data_type,
                                          parameter_default: self.default_value,
                                          parameter_value: self.value}))

        order = ["ID", "Flow ID", "Flow Name", "Flow URL", "Parameter Name",
                 parameter_data_type, parameter_default, parameter_value]
        fields = list(fields.reindex(order).dropna().iteritems())
        
        longest_field_name_length = max(len(name) for name, value in fields)
        field_line_format = "{{:.<{}}}: {{}}".format(longest_field_name_length)
        body = "\n".join(field_line_format.format(name, value) for name, value in fields)
        return header + body

After Change


        // determines the order in which the information will be printed
        order = ["ID", "Flow ID", "Flow Name", "Flow URL", "Parameter Name",
                 parameter_data_type, parameter_default, parameter_value]
        fields = [(key, fields[key]) for key in order if key in fields]

        longest_field_name_length = max(len(name) for name, value in fields)
        field_line_format = "{{:.<{}}}: {{}}".format(longest_field_name_length)
        body = "\n".join(field_line_format.format(name, value) for name, value in fields)
        return header + body
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 17

Instances


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/setups/setup.py
Class Name: OpenMLParameter
Method Name: __str__


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/flows/flow.py
Class Name: OpenMLFlow
Method Name: __str__


Project Name: openml/openml-python
Commit Name: c4920ea11ef69a5597b83af961685034c8330e99
Time: 2019-06-11
Author: neeratyoy@gmail.com
File Name: openml/setups/setup.py
Class Name: OpenMLSetup
Method Name: __str__