73dcacffa7dee910a9478cd7d783d91ef84dc987,BayesianModel.py,BayesianModel,add_nodes,#BayesianModel#,10

Before Change


        Adds nodes to graph with node-labels as provided in function.
        
        self._nodes_unsorted = [node_name for node_name in args]
        self._nodes = sorted(self._nodes_unsorted, key=str.lower)
        //using alphabetical order for all parameters internally
        
        self.add_nodes_from({node:tuple() 
                                    for node in self._nodes})  

After Change


        Adds nodes to graph with node-labels as provided in function.
        
        for item in args:
            if type(item) != type("str"): 
                raise TypeError("Name of nodes must be strings.")
                
        self.add_nodes_from(args)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pgmpy/pgmpy
Commit Name: 73dcacffa7dee910a9478cd7d783d91ef84dc987
Time: 2013-09-21
Author: snigam3112@gmail.com
File Name: BayesianModel.py
Class Name: BayesianModel
Method Name: add_nodes


Project Name: apache/incubator-mxnet
Commit Name: e2cbf6605e1a6f15777099f56821b42159605335
Time: 2020-08-12
Author: lausen@amazon.com
File Name: python/mxnet/gluon/trainer.py
Class Name: Trainer
Method Name: __init__


Project Name: dmlc/gluon-cv
Commit Name: 4b8716fd4bd6f462a9db9eee958f2508576ec019
Time: 2018-06-15
Author: cheungchih@gmail.com
File Name: gluoncv/utils/metrics/coco_detection.py
Class Name: COCODetectionMetric
Method Name: __init__