<commit_before>//
//  ViewController.swift
//  AutocompleteTextField
//
//  Created by <NAME> on 12/22/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit

class TableViewController: UITableViewController {

  @IBOutlet weak var nameField: AutocompleteTextField?
  @IBOutlet weak var emailField: AutocompleteTextField?

  override func viewDidLoad() {
    super.viewDidLoad()

    guard let name = nameField, let _ = emailField else {
      return
    }

    name.dataSource = DataSource()
    name.suggestionLabelPosition = CGPointMake(0, -0.5)
  }
}

// MARK: - UITextFieldDelegate
extension TableViewController: UITextFieldDelegate {
  func textFieldShouldEndEditing(textField: UITextField) -> Bool {
    return true
  }

  // Dismiss the keyboard when the user hits the return key
  func textFieldShouldReturn(textField: UITextField) -> Bool {
    textField.resignFirstResponder()

    return true
  }
}
<commit_msg>Add assertion failure<commit_after>//
//  ViewController.swift
//  AutocompleteTextField
//
//  Created by <NAME> on 12/22/15.
//  Copyright © 2015 Alex<NAME>. All rights reserved.
//

import UIKit

class TableViewController: UITableViewController {

  @IBOutlet weak var nameField: AutocompleteTextField?
  @IBOutlet weak var emailField: AutocompleteTextField?

  override func viewDidLoad() {
    super.viewDidLoad()

    guard let name = nameField, let email = emailField else {
      assertionFailure("Name field is nil. Did you forget to wire it up in Storyboard Builder?")
      return
    }

    name.dataSource = DataSource()
    name.suggestionLabelPosition = CGPointMake(0, -0.5)
  }
}

// MARK: - UITextFieldDelegate
extension TableViewController: UITextFieldDelegate {
  func textFieldShouldEndEditing(textField: UITextField) -> Bool {
    return true
  }

  // Dismiss the keyboard when the user hits the return key
  func textFieldShouldReturn(textField: UITextField) -> Bool {
    textField.resignFirstResponder()

    return true
  }
}

{'fraction_non_alphanumeric': 0.08940231039678553, 'fraction_numerical': 0.013058764439979909, 'mean_word_length': 3.589861751152074, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5326303', 'n_tokens_mistral': 639, 'n_tokens_neox': 569, 'n_words': 167}