98f7bac81b00256bc31e66aab2d7752bc320e67c,odps/df/backends/optimize/utils.py,,copy_sequence,#Any#Any#Any#,44

Before Change




def copy_sequence(sequence, collection, dag=None):
    copied = sequence.copy()
    if dag:
        dag.add_node(copied)
    is_copied = set()
    for path in sequence.all_path(collection, strict=True):
        curr = copied
        for seq in path[1:-1]:
            if id(seq) in is_copied:
                continue
            is_copied.add(id(seq))

After Change


                               stop_cond=lambda x: x is collection, unique=True):
        if n is sequence:
            copy(n)
            continue
        if n is collection:
            continue

        parents = [p for p in dag.successors(n) if p._node_id in traversed]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: aliyun/aliyun-odps-python-sdk
Commit Name: 98f7bac81b00256bc31e66aab2d7752bc320e67c
Time: 2017-08-03
Author: xuye.qin@alibaba-inc.com
File Name: odps/df/backends/optimize/utils.py
Class Name:
Method Name: copy_sequence


Project Name: OpenMined/PySyft
Commit Name: deba577b5665dd8767fc602abb5afd5334a458d3
Time: 2021-03-07
Author: ionesiojr@gmail.com
File Name: src/syft/grid/client/request_api/worker_api.py
Class Name: WorkerRequestAPI
Method Name: to_obj


Project Name: techfort/pycv
Commit Name: c8ba6700d85c3be085e4c9b5e68251030e497b2c
Time: 2015-06-28
Author: joe.minichino@gmail.com
File Name: chapter9/digits_image_process.py
Class Name:
Method Name:


Project Name: NifTK/NiftyNet
Commit Name: c8b28432a637a780eed96547260722ff3dede57e
Time: 2017-10-04
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/engine/sampler_selective.py
Class Name:
Method Name: create_label_size_map