<commit_before>
import UIKit

//HAX: work-around for iOS 9 infinite recursion loop bug with UIAlertController
// http://stackoverflow.com/a/36476346/135557 . Noticed while attempting 3d touch
// on link in reference panel.
extension UIAlertController {
    public override func shouldAutorotate() -> Bool {
        return true
    }
    public override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
        return UIInterfaceOrientationMask.All
    }
}

public class WMFRotationRespectingTabBarController: UITabBarController {

    public override func shouldAutorotate() -> Bool {
        if let vc = self.presentedViewController {
            return vc.shouldAutorotate()
        } else if let vc = self.selectedViewController {
            return vc.shouldAutorotate()
        }else{
            return super.shouldAutorotate()
        }
    }
    
    public override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
        if let vc = self.presentedViewController {
            return vc.supportedInterfaceOrientations()
        } else if let vc = self.selectedViewController {
            return vc.supportedInterfaceOrientations()
        }else{
            return super.supportedInterfaceOrientations()
        }
    }
    
    public override func preferredInterfaceOrientationForPresentation() -> UIInterfaceOrientation {
        if let vc = self.presentedViewController {
            return vc.preferredInterfaceOrientationForPresentation()
        } else if let vc = self.selectedViewController {
            return vc.preferredInterfaceOrientationForPresentation()
        }else{
            return super.preferredInterfaceOrientationForPresentation()
        }
    }
}
<commit_msg>Revert "Workaround for iOS 9 bug which can cause infinite recursion crash."<commit_after>
import UIKit

public class WMFRotationRespectingTabBarController: UITabBarController {

    public override func shouldAutorotate() -> Bool {
        if let vc = self.presentedViewController {
            return vc.shouldAutorotate()
        } else if let vc = self.selectedViewController {
            return vc.shouldAutorotate()
        }else{
            return super.shouldAutorotate()
        }
    }
    
    public override func supportedInterfaceOrientations() -> UIInterfaceOrientationMask {
        if let vc = self.presentedViewController {
            return vc.supportedInterfaceOrientations()
        } else if let vc = self.selectedViewController {
            return vc.supportedInterfaceOrientations()
        }else{
            return super.supportedInterfaceOrientations()
        }
    }
    
    public override func preferredInterfaceOrientationForPresentation() -> UIInterfaceOrientation {
        if let vc = self.presentedViewController {
            return vc.preferredInterfaceOrientationForPresentation()
        } else if let vc = self.selectedViewController {
            return vc.preferredInterfaceOrientationForPresentation()
        }else{
            return super.preferredInterfaceOrientationForPresentation()
        }
    }
}

{'fraction_non_alphanumeric': 0.06363049095607236, 'fraction_numerical': 0.005490956072351421, 'mean_word_length': 2.7448609431680775, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4041205', 'n_tokens_mistral': 790, 'n_tokens_neox': 752, 'n_words': 189}