<commit_before>class House
  class << self
    def uk_to_australian(house)
      case house
      when "commons"
        "representatives"
      when "lords"
        "senate"
      else
        raise "Unexpected value: #{house}"
      end
    end

    def australian_to_uk(australian_house)
      case australian_house
      when "representatives"
        "commons"
      when "senate"
        "lords"
      else
        raise "unexpected value: #{australian_house}"
      end
    end

    def australian
      %w(representatives senate)
    end
  end
end
<commit_msg>Raise record not found instead of a runtime error. Fixes #428<commit_after>class House
  class << self
    def uk_to_australian(house)
      case house
      when "commons"
        "representatives"
      when "lords"
        "senate"
      else
        raise ActiveRecord::RecordNotFound
      end
    end

    def australian_to_uk(australian_house)
      case australian_house
      when "representatives"
        "commons"
      when "senate"
        "lords"
      else
        raise ActiveRecord::RecordNotFound
      end
    end

    def australian
      %w(representatives senate)
    end
  end
end

{'fraction_non_alphanumeric': 0.06308610400682012, 'fraction_numerical': 0.0025575447570332483, 'mean_word_length': 2.0257731958762886, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5788558', 'n_tokens_mistral': 362, 'n_tokens_neox': 356, 'n_words': 96}