5b25799ab88935f3236e58950422b4d3b774ed86,nilmtk/appliance.py,Appliance,matches,#Appliance#,46
Before Change
if not isinstance(key, dict):
raise TypeError()
for k, v in key.iteritems():
try:
if getattr(self.identifier, k) != v:
return False
except AttributeError:
if self.metadata.has_key(k):
if self.metadata[k] != v:
return False
else:
if k == "category":
if v not in self.categories():
return False
elif self.type.get(k) != v:
return False
return True
def _flattern(list2d):
After Change
elif self.type.has_key(k):
metadata_value = self.type[k]
if (isinstance(metadata_value, list) and
not isinstance(v, list)):
// for example, "control" is a list in metadata
if v not in metadata_value:
return False
elif metadata_value != v:
return False
else:
return False
return True
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: nilmtk/nilmtk
Commit Name: 5b25799ab88935f3236e58950422b4d3b774ed86
Time: 2014-07-04
Author: jack-list@xlk.org.uk
File Name: nilmtk/appliance.py
Class Name: Appliance
Method Name: matches
Project Name: onnx/onnxmltools
Commit Name: 8ae70fc5866ac29542aa1681c712f4a6ff5dec88
Time: 2019-02-19
Author: vinitras@gmail.com
File Name: onnxmltools/utils/main.py
Class Name:
Method Name: save_model
Project Name: onnx/onnxmltools
Commit Name: 8ae70fc5866ac29542aa1681c712f4a6ff5dec88
Time: 2019-02-19
Author: vinitras@gmail.com
File Name: onnxmltools/utils/main.py
Class Name:
Method Name: save_text