6903d95b41206d757540f48230e245e7f28b8667,data_structures/AVL/AVL.py,AVL,rebalance,#AVL#Any#,77

Before Change


                height_right = node.getRight().getHeight()

            if node.getLeft() is not None:
                height_left = node.getLeft().getHeight()

            if abs(height_left - height_right) > 1:
                if height_left > height_right:
                    // left_child = node.getRight()

After Change


                if height_left > height_right:
                    left_child = n.left
                    if left_child is not None:
                        h_right = (right_child.right.height
                                    if (right_child.right is not None) else 0)
                        h_left = (right_child.left.height
                                    if (right_child.left is not None) else 0)
                    if (h_left > h_right):
                        self.rotate_left(n)
                        break
                    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: TheAlgorithms/Python
Commit Name: 6903d95b41206d757540f48230e245e7f28b8667
Time: 2017-10-02
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance


Project Name: TheAlgorithms/Python
Commit Name: 67f23f59b15581be38c5d630018e590148928384
Time: 2017-07-07
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance


Project Name: TheAlgorithms/Python
Commit Name: 6903d95b41206d757540f48230e245e7f28b8667
Time: 2017-10-02
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance


Project Name: TheAlgorithms/Python
Commit Name: 8e41aca1b943d9bbbd742f57a0aa58cfa5e6c35e
Time: 2017-07-10
Author: rafaelleru95103@gmail.com
File Name: data_structures/AVL/AVL.py
Class Name: AVL
Method Name: rebalance