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
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:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: chainer/chainercv
Commit Name: 9cc2c91177a6456dea602a93b77864b0a7952333
Time: 2019-02-24
Author: ktns.87@gmail.com
File Name: chainercv/links/model/pickable_sequential_chain.py
Class Name: PickableSequentialChain
Method Name: pick
Project Name: tyarkoni/pliers
Commit Name: 2e72671b414efc9da2d6bb713bc90dc4a194fb63
Time: 2017-03-06
Author: delavega@utexas.edu
File Name: pliers/extractors/api.py
Class Name: IndicoAPIExtractor
Method Name: __init__