<commit_before>class Person < ActiveRecord::Base
  include Progress

  progress_includes :mail_address

  belongs_to :mail_address, class_name: "Address"
  accepts_nested_attributes_for :mail_address

  has_many :incomes
  has_many :employments
  has_many :criminal_histories
  has_many :previous_ssns

  belongs_to :applicant

  before_validation :initialize_person
  validates_associated :mail_address
  validates :mail_address, presence: true
  validate :validate_dob_year

  def initialize_person
    self.mail_address ||= Address.new
  end

  def description
    "#{first_name} #{last_name}"
  end
<commit_msg>Adds validation for presence of dob<commit_after>class Person < ActiveRecord::Base
  include Progress

  progress_includes :mail_address

  belongs_to :mail_address, class_name: "Address"
  accepts_nested_attributes_for :mail_address

  has_many :incomes
  has_many :employments
  has_many :criminal_histories
  has_many :previous_ssns

  belongs_to :applicant

  before_validation :initialize_person
  validates_associated :mail_address
  validates :mail_address, :dob, presence: true
  validate :validate_dob_year

  def initialize_person
    self.mail_address ||= Address.new
  end

  def description
    "#{first_name} #{last_name}"
  end

{'fraction_non_alphanumeric': 0.06041335453100159, 'fraction_numerical': 0.0, 'mean_word_length': 5.326633165829146, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3352053', 'n_tokens_mistral': 404, 'n_tokens_neox': 389, 'n_words': 92}