<commit_before>class Theorem < Sentence
  DEFAULT_STATUS = ProofStatus::DEFAULT_OPEN_STATUS

  has_many :proof_attempts, foreign_key: 'sentence_id', dependent: :destroy
  belongs_to :proof_status

  # Override Sentence's type: nil scope.
  # Results in duplicate condition in the sql statement.
  default_scope -> { where(type: ['Theorem']) }

  before_save :set_default_proof_status

  def set_default_proof_status
    self.proof_status = ProofStatus.find(DEFAULT_STATUS) unless proof_status
  end

  def update_proof_status(proof_status)
    if proof_status.solved? || !self.proof_status.solved?
      self.proof_status = proof_status
      save!
    end
  end

  def to_s
    name
  end
end<commit_msg>Remove redundant to_s method.<commit_after>class Theorem < Sentence
  DEFAULT_STATUS = ProofStatus::DEFAULT_OPEN_STATUS

  has_many :proof_attempts, foreign_key: 'sentence_id', dependent: :destroy
  belongs_to :proof_status

  # Override Sentence's type: nil scope.
  # Results in duplicate condition in the sql statement.
  default_scope -> { where(type: ['Theorem']) }

  before_save :set_default_proof_status

  def set_default_proof_status
    self.proof_status = ProofStatus.find(DEFAULT_STATUS) unless proof_status
  end

  def update_proof_status(proof_status)
    if proof_status.solved? || !self.proof_status.solved?
      self.proof_status = proof_status
      save!
    end
  end
end
{'fraction_non_alphanumeric': 0.07505360972122944, 'fraction_numerical': 0.0, 'mean_word_length': 4.511811023622047, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '472613', 'n_tokens_mistral': 455, 'n_tokens_neox': 427, 'n_words': 104}