6117ec6153cd9e11192e98ca2dfbd1888574cff6,labelme/labelDialog.py,LabelDialog,validate,#LabelDialog#,80

Before Change



    def validate(self):
        if QT5:
            if self.edit.text().strip():
                self.accept()
        else:
            if self.edit.text().trimmed():

After Change


    def validate(self):
        text = self.edit.text()
        if hasattr(text, "strip"):
            text = text.strip()
        else:
            text = text.trimmed()
        if text:
            self.accept()

    def postProcess(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: wkentaro/labelme
Commit Name: 6117ec6153cd9e11192e98ca2dfbd1888574cff6
Time: 2018-04-14
Author: www.kentaro.wada@gmail.com
File Name: labelme/labelDialog.py
Class Name: LabelDialog
Method Name: validate


Project Name: OpenNMT/OpenNMT-py
Commit Name: fc9eb2a1d52e456543eb5c592932acc40180af87
Time: 2017-04-25
Author: jean.senellart@systrangroup.com
File Name: preprocess.py
Class Name:
Method Name: makeData


Project Name: wkentaro/labelme
Commit Name: 6117ec6153cd9e11192e98ca2dfbd1888574cff6
Time: 2018-04-14
Author: www.kentaro.wada@gmail.com
File Name: labelme/labelDialog.py
Class Name: LabelDialog
Method Name: postProcess