0a4e8b32b6b31f2b833476fe5ab129075ee632e2,python/dgl/heterograph.py,,find_src_dst_ntypes,#Any#Any#,4499

Before Change


        a dictionary from type name to type id. Return None if the graph is
        not uni-bipartite.
    
    src, dst, _ = metagraph.edges()
    if set(src.tonumpy()).isdisjoint(set(dst.tonumpy())):
        srctypes = {ntypes[tid] : tid for tid in src}
        dsttypes = {ntypes[tid] : tid for tid in dst}
        // handle isolated node types

After Change


    if ret is None:
        return None
    else:
        src, dst = ret
        srctypes = {ntypes[tid.data] : tid.data for tid in src}
        dsttypes = {ntypes[tid.data] : tid.data for tid in dst}
        return srctypes, dsttypes
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: dmlc/dgl
Commit Name: 0a4e8b32b6b31f2b833476fe5ab129075ee632e2
Time: 2020-06-18
Author: suqd99@sjtu.edu.cn
File Name: python/dgl/heterograph.py
Class Name:
Method Name: find_src_dst_ntypes


Project Name: gboeing/osmnx
Commit Name: 14d74470233d0eb9149ae2bab72261be8d93eb92
Time: 2020-12-03
Author: boeing@usc.edu
File Name: osmnx/stats.py
Class Name:
Method Name: basic_stats


Project Name: gboeing/osmnx
Commit Name: 3208fe37c6787ef0cd3f2f973a02ad63995042fa
Time: 2021-03-26
Author: boeing@usc.edu
File Name: osmnx/bearing.py
Class Name:
Method Name: add_edge_bearings


Project Name: dmlc/dgl
Commit Name: 45e1333e13638a4843ee22cc264df921596676f9
Time: 2020-06-26
Author: zhengda1936@gmail.com
File Name: python/dgl/distributed/sampling.py
Class Name: SamplingRequest
Method Name: process_request


Project Name: Rostlab/nalaf
Commit Name: edf49b4c7137e902763477f634da90fe038d6364
Time: 2017-01-13
Author: i@juanmi.rocks
File Name: nalaf/learning/lib/sklsvm.py
Class Name: SklSVM
Method Name: train