daf661c3edd949f8ac2cd70e4a725d9a055cc0c3,skbio/tree/_tree.py,TreeNode,shear,#TreeNode#,411

Before Change



        while len(list(tcopy.tips())) != len(ids):
            for n in list(tcopy.tips()):
                if n.name not in ids:
                    n.parent.remove(n)

        tcopy.prune()

        return tcopy

After Change


        if not ids.issubset(all_tips):
            raise ValueError("ids are not a subset of the tree.")

        marked = set()
        for tip in tcopy.tips():
            if tip.name in ids:
                marked.add(tip)
                for anc in tip.ancestors():
                    if anc in marked:
                        break
                    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: biocore/scikit-bio
Commit Name: daf661c3edd949f8ac2cd70e4a725d9a055cc0c3
Time: 2016-06-27
Author: mcdonadt@colorado.edu
File Name: skbio/tree/_tree.py
Class Name: TreeNode
Method Name: shear


Project Name: pgmpy/pgmpy
Commit Name: d9213be6d79011721e43444b03d27fe6aaa65071
Time: 2014-01-29
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: active_trail_nodes


Project Name: pgmpy/pgmpy
Commit Name: 764b22136f964c50bcf7d30c4f1efe6bdaabd50b
Time: 2014-01-08
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: _get_ancestors_observation


Project Name: biocore/scikit-bio
Commit Name: daf661c3edd949f8ac2cd70e4a725d9a055cc0c3
Time: 2016-06-27
Author: mcdonadt@colorado.edu
File Name: skbio/tree/_tree.py
Class Name: TreeNode
Method Name: shear