2e2fadf4db224e53874b01fde0cf79e15eabc3b4,data_structures/stacks/balanced_parentheses.py,,balanced_parentheses,#Any#,8

Before Change


            stack.push(parenthesis)
        elif parenthesis == ")":
            stack.pop()
    return not stack.is_empty()


if __name__ == "__main__":
    examples = ["((()))", "((())", "(()))"]

After Change


        if parenthesis == "(":
            stack.push(parenthesis)
        elif parenthesis == ")":
            if stack.is_empty():
                return False
            stack.pop()
    return stack.is_empty()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: TheAlgorithms/Python
Commit Name: 2e2fadf4db224e53874b01fde0cf79e15eabc3b4
Time: 2018-12-17
Author: mikaelsouza@icomp.ufam.edu.br
File Name: data_structures/stacks/balanced_parentheses.py
Class Name:
Method Name: balanced_parentheses


Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/conv.py
Class Name: ConvNet
Method Name: __init__


Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/conv.py
Class Name: DuelingConvNet
Method Name: __init__


Project Name: kengz/SLM-Lab
Commit Name: d4f36c2f11e20e6d5a7499cb9f717b03f5c1e787
Time: 2019-04-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/net/recurrent.py
Class Name: RecurrentNet
Method Name: __init__