<commit_before>//
//  DismissAndPresentSegue.swift
//
//  Created by <NAME> on 15/06/2016.
//  Copyright © 2016 BareFeetWare.
//  Free to use at your own risk, with acknowledgement to BareFeetWare.
//

import UIKit

open class DismissAndPresentSegue: UIStoryboardSegue {
    
    open override func perform() {
        if let presentingViewController = source.presentingViewController {
            presentingViewController.dismiss(animated: true, completion: {
                if let presentingNavigationController = presentingViewController as? UINavigationController ?? presentingViewController.navigationController {
                    presentingNavigationController.present(self.destination, animated: true, completion: nil)
                }
            })
        }
    }
    
}<commit_msg>presenting modal viewcontroller on tabBarController.<commit_after>//
//  DismissAndPresentSegue.swift
//
//  Created by <NAME> on 15/06/2016.
//  Copyright © 2016 BareFeetWare.
//  Free to use at your own risk, with acknowledgement to BareFeetWare.
//

import UIKit

open class DismissAndPresentSegue: UIStoryboardSegue {
    
    open override func perform() {
        if let presentingViewController = source.presentingViewController {
            presentingViewController.dismiss(animated: true, completion: {
                if let presentingNavigationController = presentingViewController as? UINavigationController ?? presentingViewController.navigationController {
                    presentingNavigationController.present(self.destination, animated: true, completion: nil)
                } else if let presentingViewController = presentingViewController as? UITabBarController {
                    presentingViewController.present(self.destination, animated: true, completion: nil)
                }
            })
        }
    }
    
}
{'fraction_non_alphanumeric': 0.07313109425785481, 'fraction_numerical': 0.013001083423618635, 'mean_word_length': 2.855949895615866, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1889450', 'n_tokens_mistral': 484, 'n_tokens_neox': 435, 'n_words': 118}