08bc2add6e98feefdce36f6f094a15e3e598b1e7,src/python/pants/engine/exp/mapper.py,AddressMap,parse,#Any#Any#Any#Any#,39

Before Change


      if not name:
        raise UnaddressableObjectError("Parsed a non-addressable object: {!r}".format(obj))

      if name in objects_by_name:
        raise DuplicateNameError("An object already exists at {!r} with name {!r}: {!r}.  Cannot "
                                 "map {!r}".format(path, name, objects_by_name[name], obj))

      objects_by_name[name] = obj
    return cls(path, objects_by_name)

After Change


        previous = objects_by_name.get(name)
        if previous:
          previous_path, _ = previous
          raise DuplicateNameError("An object with name {name!r} is already defined in "
                                   "{previous_path!r}, will not overwrite with {obj!r} from "
                                   "{current_path!r}."
                                   .format(name=name,
                                           previous_path=previous_path,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: 08bc2add6e98feefdce36f6f094a15e3e598b1e7
Time: 2016-02-23
Author: stuhood@gmail.com
File Name: src/python/pants/engine/exp/mapper.py
Class Name: AddressMap
Method Name: parse


Project Name: ray-project/ray
Commit Name: b240f5f0c9eeeb572a456c5d517b502e564dff22
Time: 2021-03-16
Author: ekhliang@gmail.com
File Name: python/ray/job_config.py
Class Name: JobConfig
Method Name: __init__


Project Name: bokeh/bokeh
Commit Name: 9e5128c7db7f7a2aa8c9ebbb64aa59b737c1f4be
Time: 2015-12-30
Author: hp@pobox.com
File Name: bokeh/document.py
Class Name: Document
Method Name: _compute_patch_between_json