39fe260e63aaafeceb2d8c982eeebcb8faf582a6,flow/visualize/time_space_diagram.py,,get_time_space_data,#Any#Any#,87

Before Change


    all_time = []
    for veh_id in data.keys():
        all_time.extend(data[veh_id]["time"])
    all_time = np.sort(np.unique(all_time))

    // Get the function from switcher dictionary
    func = switcher[params["network"]]

    // Execute the function
    pos, speed, all_time = func(data, params, all_time)

    return pos, speed, all_time


def _merge(data, params, all_time):
    rGenerate position and speed data for the merge.

After Change


    // Execute the function
    segs, data = func(data)

    return segs, data


def _merge(data):
    rGenerate position and speed data for the merge.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: flow-project/flow
Commit Name: 39fe260e63aaafeceb2d8c982eeebcb8faf582a6
Time: 2020-06-13
Author: jonny5@berkeley.edu
File Name: flow/visualize/time_space_diagram.py
Class Name:
Method Name: get_time_space_data


Project Name: sao-eht/eat
Commit Name: 433cd5e10c9af9e74f97a2de2abb3142c36bb6a0
Time: 2017-07-04
Author: ckchan@cfa.harvard.edu
File Name: eat/factor.py
Class Name:
Method Name: factor


Project Name: rusty1s/pytorch_geometric
Commit Name: 3735f4b48f52f7703944f36284b9e9ee3d1e8e5f
Time: 2020-10-27
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/nn/models/tgn.py
Class Name: MeanAggregator
Method Name: forward