b2be440a78c9da841c3f1bdfa34e5dc0dc1e669c,osmnx/utils_graph.py,,_update_edge_keys,#Any#,536

Before Change


            // if there are more than 2 edges here, make sure to compare all
            li = group["geometry"].tolist()
            li.append(li[0])
            geom_pairs = list(zip(li[:-1], li[1:]))
        else:
            // otherwise, just compare the first edge to the second edge
            geom_pairs = [(group["geometry"].iloc[0], group["geometry"].iloc[1])]

After Change


    set_different_streets = set(different_streets)
    utils.log(f"Found {len(set_different_streets)} different streets")
    for u, v, k in set(different_streets):
        new_key = max(list(G[u][v]) + list(G[v][u])) + 1
        G.add_edge(u, v, key=new_key, **G.get_edge_data(u, v, k))
        G.remove_edge(u, v, key=k)

    return G
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: gboeing/osmnx
Commit Name: b2be440a78c9da841c3f1bdfa34e5dc0dc1e669c
Time: 2020-11-19
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: _update_edge_keys


Project Name: ntucllab/libact
Commit Name: e857888dff9361561fcc96068ab50f79ed5a26bc
Time: 2017-01-30
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/query_by_committee.py
Class Name: QueryByCommittee
Method Name: make_query


Project Name: tensorflow/ranking
Commit Name: 39fcf3cf46d394a6242e4094a11c544394c2a79f
Time: 2020-08-19
Author: no-reply@google.com
File Name: tensorflow_ranking/python/losses_test.py
Class Name: LossesTest
Method Name: test_approx_ndcg_loss


Project Name: gboeing/osmnx
Commit Name: d7b2db3c5262c82c44958afc2500efe0838f0884
Time: 2020-12-02
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: _update_edge_keys