<commit_before>//
//  FillPasswordTableViewCell.swift
//  pass
//
//  Created by <NAME> on 11/2/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

class FillPasswordTableViewCell: ContentTableViewCell {

    @IBOutlet weak var contentTextField: UITextField!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    @IBAction func generatePassword(_ sender: UIButton) {
        let plainPassword = Utils.randomString(length: 16)
        contentTextField.attributedText = Utils.attributedPassword(plainPassword: plainPassword)
    }
    
    override func getContent() -> String? {
        return contentTextField.attributedText?.string
    }
    
    override func setContent(content: String) {
        contentTextField.attributedText = Utils.attributedPassword(plainPassword: content)
    }
}<commit_msg>Copy generated passwords to the clipboard.<commit_after>//
//  FillPasswordTableViewCell.swift
//  pass
//
//  Created by <NAME> on 11/2/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

class FillPasswordTableViewCell: ContentTableViewCell {

    @IBOutlet weak var contentTextField: UITextField!
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    @IBAction func generatePassword(_ sender: UIButton) {
        let plainPassword = Utils.randomString(length: 16)
        contentTextField.attributedText = Utils.attributedPassword(plainPassword: <PASSWORD>)
        Utils.copyToPasteboard(textToCopy: plainPassword)
    }
    
    override func getContent() -> String? {
        return contentTextField.attributedText?.string
    }
    
    override func setContent(content: String) {
        contentTextField.attributedText = Utils.attributedPassword(plainPassword: content)
    }
}
{'fraction_non_alphanumeric': 0.08914027149321267, 'fraction_numerical': 0.011764705882352941, 'mean_word_length': 3.0793357933579335, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '4615306', 'n_tokens_mistral': 645, 'n_tokens_neox': 595, 'n_words': 153}