595799cb641c6514eccd4b6908cfaf4426c5a389,src/python/pants/engine/exp/configuration.py,Configuration,create,#Configuration#,161
Before Change
return configuration_type(**attributes)
elif self.merges:
attributes = self._extract_inheritable_attributes(self.merges)
for k, v in self._asdict().items():
if k not in self._SPECIAL_FIELDS:
if isinstance(v, MutableMapping):
mapping = attributes.get(k) or {}
mapping.update(v)
attributes[k] = mapping
elif isinstance(v, MutableSequence):
sequence = attributes.get(k) or []
sequence.extend(v)
attributes[k] = sequence
elif v is not None:
attributes[k] = v
configuration_type = type(self)
return configuration_type(**attributes)
else:
return self
After Change
if self.extends:
for k, v in self._extract_inheritable_attributes(self.extends).items():
attributes.setdefault(k, v)
if self.merges:
def merge(attrs):
for k, v in attrs.items():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: pantsbuild/pants
Commit Name: 595799cb641c6514eccd4b6908cfaf4426c5a389
Time: 2015-10-23
Author: john.sirois@gmail.com
File Name: src/python/pants/engine/exp/configuration.py
Class Name: Configuration
Method Name: create
Project Name: nilmtk/nilmtk
Commit Name: f0622cc5c1d6fc5c81b588a9c365731188fb5cae
Time: 2014-12-12
Author: jack-list@xlk.org.uk
File Name: nilmtk/electric.py
Class Name: Electric
Method Name: power_series
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 3eae7586a1c85f0ac46919f542bf2eb1fdcbf22c
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/azure/azure_virtual_machine.py
Class Name:
Method Name: _GetDefaultImagesFromAzure