<commit_before>//
//  TextButton.swift
//  TastyTomato
//
//  Created by <NAME> on 7/29/16.
//  Copyright © 2016 resmio. All rights reserved.
//

import Foundation


// MARK: // Public
// MARK: Fake Initializer
public func TextButton_() -> TextButton {
    return TextButton.button_()
}


// MARK: Interface
public extension TextButton {
    public var underlined: Bool {
        get {
            return self._underlined
        }
        set(newUnderlined) {
            self._underlined = newUnderlined
        }
    }
}


// MARK: Class Declaration
public class TextButton: BaseButton {
    // Setup Override
    override class func setup_<T: TextButton>(_ button: T) {
        super.setup_(button)
        button.setTitleColor(.black, for: .normal)
    }
    
    // Private Variable Stored Properties
    fileprivate var __underlined: Bool = false
    
    
    // Overrides
    override public func setTitle(_ title: String) {
        self._setTitle(title)
    }
    
    override public func setTitle(_ title: String?, for state: UIControlState) {
        self._setTitle(title, for: state)
    }
    
    public override func setTitleColor(_ color: UIColor?, for state: UIControlState) {
        self._setTitleColor(color, for: state)
    }
}


// MARK: // Private
// MARK: Computed Variables
private extension TextButton {
    var _underlined: Bool {
        get {
            return self.__underlined
        }
        set(newUnderlined) {
            guard newUnderlined != self.__underlined else { return }
            self.__underlined = newUnderlined
            self._updateTitle()
        }
    }
}


// MARK: Set Title Color
private extension TextButton {
    func _setTitleColor(_ color: UIColor?, for state: UIControlState) {
        self.setTitleColor(color, for: state)
        self._updateTitle()
    }
}


// MARK: Update Title
private extension TextButton {
    func _updateTitle() {
        let state: UIControlState = self.state
        let title: String? = self.title(for: state)
        self._setTitle(title, for: state)
    }
}


// MARK: Set Title
private extension TextButton {
    func _setTitle(_ title: String?, for state: UIControlState = .normal) {<commit_msg>Call super instead of self to fix infinite recursion<commit_after>//
//  TextButton.swift
//  TastyTomato
//
//  Created by <NAME> on 7/29/16.
//  Copyright © 2016 resmio. All rights reserved.
//

import Foundation


// MARK: // Public
// MARK: Fake Initializer
public func TextButton_() -> TextButton {
    return TextButton.button_()
}


// MARK: Interface
public extension TextButton {
    public var underlined: Bool {
        get {
            return self._underlined
        }
        set(newUnderlined) {
            self._underlined = newUnderlined
        }
    }
}


// MARK: Class Declaration
public class TextButton: BaseButton {
    // Setup Override
    override class func setup_<T: TextButton>(_ button: T) {
        super.setup_(button)
        button.setTitleColor(.black, for: .normal)
    }
    
    // Private Variable Stored Properties
    fileprivate var __underlined: Bool = false
    
    
    // Overrides
    override public func setTitle(_ title: String) {
        self._setTitle(title)
    }
    
    override public func setTitle(_ title: String?, for state: UIControlState) {
        self._setTitle(title, for: state)
    }
    
    public override func setTitleColor(_ color: UIColor?, for state: UIControlState) {
        self._setTitleColor(color, for: state)
    }
}


// MARK: // Private
// MARK: Computed Variables
private extension TextButton {
    var _underlined: Bool {
        get {
            return self.__underlined
        }
        set(newUnderlined) {
            guard newUnderlined != self.__underlined else { return }
            self.__underlined = newUnderlined
            self._updateTitle()
        }
    }
}


// MARK: Set Title Color
private extension TextButton {
    func _setTitleColor(_ color: UIColor?, for state: UIControlState) {
        super.setTitleColor(color, for: state)
        self._updateTitle()
    }
}


// MARK: Update Title
private extension TextButton {
    func _updateTitle() {
        let state: UIControlState = self.state
        let title: String? = self.title(for: state)
        self._setTitle(title, for: state)
    }
}


// MARK: Set Title
private extension TextButton {
    func _setTitle(_ title: String?, for state: UIControlState = .normal) {
{'fraction_non_alphanumeric': 0.09657039711191336, 'fraction_numerical': 0.004061371841155234, 'mean_word_length': 2.3205992509363296, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '1458175', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1260, 'n_words': 366}