9e5128c7db7f7a2aa8c9ebbb64aa59b737c1f4be,bokeh/document.py,Document,_compute_patch_between_json,#Any#Any#Any#,617

Before Change


        to_set = set(to_root_ids)
        removed = from_set - to_set
        added = to_set - from_set
        if removed or added:
            raise RuntimeError("Current limitation: cannot add/remove document roots between notebook pushes")

        combined_references = dict(from_references)
        for k in to_references.keys():
            combined_references[k] = to_references[k]

After Change


        for removed_root_id in removed:
            model = dict(combined_references[removed_root_id])
            del model["attributes"]
            events.append({ "kind" : "RootRemoved",
                            "model" : model })

        for added_root_id in added:
            Document._value_record_references(combined_references,
                                              combined_references[added_root_id],
                                              value_refs)
            model = dict(combined_references[added_root_id])
            del model["attributes"]
            events.append({ "kind" : "RootAdded",
                            "model" : model })

        for id in to_references:
            if id in from_references:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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


Project Name: matplotlib/matplotlib
Commit Name: 18d0f9ad4d8c5af45af6c88e077898eb4850d7a8
Time: 2018-07-11
Author: jklymak@gmail.com
File Name: lib/matplotlib/tight_layout.py
Class Name:
Method Name: get_tight_layout_figure


Project Name: allenai/allennlp
Commit Name: be97943a42e55ac68c75794187a1c84be5f8d898
Time: 2020-08-31
Author: mattg@allenai.org
File Name: allennlp/common/from_params.py
Class Name:
Method Name: infer_params


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