eab2da81c65974e08b8245bbf8a052093f972df3,Pysb.py,Rule,__init__,#Rule#Any#Any#Any#Any#,287

Before Change


    def __init__(self, name, reactants, products, rate):
        SelfExporter.__init__(self, name)

        if isinstance(reactants, MonomerPattern):
            reactants = [reactants]
        if isinstance(products, MonomerPattern):
            products = [products]

        if not all([isinstance(r, MonomerPattern) for r in reactants]):

After Change



        // FIXME: This tuple thing is ugly (used to support >> and <> operators between ReactionPatterns).
        // This is how the reactant and product ReactionPatterns are passed, along with is_reversible.
        if not isinstance(reaction_pattern_set, tuple) and len(reaction_pattern_set) != 3:
            raise Exception("reaction_pattern_set must be a tuple of (ReactionPattern, ReactionPattern, Boolean)")

        try:
            reactant_pattern = as_reaction_pattern(reaction_pattern_set[0])
        except InvalidReactionPatternException as e:
            raise type(e)("Reactant does not look like a reaction pattern")

        try:
            product_pattern = as_reaction_pattern(reaction_pattern_set[1])
        except InvalidReactionPatternException as e:
            raise type(e)("Product does not look like a reaction pattern")

        self.is_reversible = reaction_pattern_set[2]

        if not isinstance(rate_forward, Parameter):
            raise Exception("Forward rate must be a Parameter")
        if self.is_reversible and not isinstance(rate_reverse, Parameter):
            raise Exception("Reverse rate must be a Parameter")

        self.reactant_pattern = reactant_pattern
        self.product_pattern = product_pattern
        self.rate_forward = rate_forward
        self.rate_reverse = rate_reverse
        // TODO: ensure all numbered sites are referenced exactly twice within each of reactants and products

    def __repr__(self):
        ret = "%s(name=%s, reactants=%s, products=%s, rate_forward=%s" % \
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: pysb/pysb
Commit Name: eab2da81c65974e08b8245bbf8a052093f972df3
Time: 2009-08-09
Author: jmuhlich@bitflood.org
File Name: Pysb.py
Class Name: Rule
Method Name: __init__


Project Name: sympy/sympy
Commit Name: 491635f0fc00102c6729b704b30f64d1f271be23
Time: 2020-07-13
Author: milan.cs16@iitp.ac.in
File Name: sympy/solvers/ode/ode.py
Class Name:
Method Name: constant_renumber


Project Name: openml/openml-python
Commit Name: 7d452c3712b506f4e43153f38d455e13858b6c50
Time: 2017-05-22
Author: feurerm@informatik.uni-freiburg.de
File Name: openml/runs/functions.py
Class Name:
Method Name: _create_run_from_xml


Project Name: streamlit/streamlit
Commit Name: 0fe228aa0bf5479458a68bf90b4430885410bd92
Time: 2018-10-22
Author: thiagot@gmail.com
File Name: lib/streamlit/DeckGlChart.py
Class Name:
Method Name: marshall