<commit_before>class Poll
  class Shift < ActiveRecord::Base
    belongs_to :booth
    belongs_to :officer

    validates :booth_id, presence: true
    validates :officer_id, presence: true
    validates :date, presence: true
    validates :date, uniqueness: { scope: [:officer_id, :booth_id] }

    before_create :persist_data
    after_create :create_officer_assignments

    def create_officer_assignments
      booth.booth_assignments.each do |booth_assignment|
        attrs = { officer_id:          officer_id,
                  date:                date,
                  booth_assignment_id: booth_assignment.id }
        Poll::OfficerAssignment.create!(attrs)
      end
    end

    def persist_data
      self.officer_name = officer.name
      self.officer_email = officer.email
    end

  end
 end<commit_msg>Correct end at file ending<commit_after>class Poll
  class Shift < ActiveRecord::Base
    belongs_to :booth
    belongs_to :officer

    validates :booth_id, presence: true
    validates :officer_id, presence: true
    validates :date, presence: true
    validates :date, uniqueness: { scope: [:officer_id, :booth_id] }

    before_create :persist_data
    after_create :create_officer_assignments

    def create_officer_assignments
      booth.booth_assignments.each do |booth_assignment|
        attrs = { officer_id:          officer_id,
                  date:                date,
                  booth_assignment_id: booth_assignment.id }
        Poll::OfficerAssignment.create!(attrs)
      end
    end

    def persist_data
      self.officer_name = officer.name
      self.officer_email = officer.email
    end

  end
end
{'fraction_non_alphanumeric': 0.06650544135429262, 'fraction_numerical': 0.0, 'mean_word_length': 2.597826086956522, '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': '4086272', 'n_tokens_mistral': 512, 'n_tokens_neox': 502, 'n_words': 113}