<commit_before>import Luncheon
import Eureka

public class NapkinViewController: FormViewController {
    private var currentSection: Section?
    private var collections = [String : [Int: String]]()
    public required override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    }
    
    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    private func initializeForm() {
        sectionSeparator()
        setupFields()
    }
    
    public override func viewDidLoad() {
        super.viewDidLoad()
        if useDefaultModalButtons() && isModal {
            title = "Add \(subject()!.remote.subjectClassNameUnderscore().titleize())"
            
            self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Cancel, target: self, action: "cancelWasTapped")
            self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Save, target: self, action: "preSaveWasTapped")
        }
        initializeForm()
    }
    
    public func useDefaultModalButtons() -> Bool {
        return true
    }
    
    func preSaveWasTapped() {<commit_msg>Changes for Swift 2.2<commit_after>import Luncheon
import Eureka

public class NapkinViewController: FormViewController {
    private var currentSection: Section?
    private var collections = [String : [Int: String]]()
    public required override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    }
    
    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    private func initializeForm() {
        sectionSeparator()
        setupFields()
    }
    
    public override func viewDidLoad() {
        super.viewDidLoad()
        if useDefaultModalButtons() && isModal {
            title = "Add \(subject()!.dynamicType.className().titleize())"
            
            self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Cancel, target: self, action: #selector(cancelWasTapped))
            self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Save, target: self, action: #selector(preSaveWasTapped))
        }
        initializeForm()
    }
    
    public func useDefaultModalButtons() -> Bool {
        return true
    }
    
    func preSaveWasTapped() {
{'fraction_non_alphanumeric': 0.09045031055900621, 'fraction_numerical': 0.0007763975155279503, 'mean_word_length': 3.1232, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1351679', 'n_tokens_mistral': 717, 'n_tokens_neox': 712, 'n_words': 157}