<commit_before>class ThreeStrikesAndYouAreOut
  def abuse_report_filed(payload)
    request = payload[:request]
    reporter = payload[:reporter]

    if reporter == "blind"
      check(request.helper)
    else
      check(request.blind)
    end
  end

  def check user
    if user.nil?
      return
    end
    no_of_abuses = user.abuse_reports.count
    if no_of_abuses == 3
      user.blocked = true
      user.save!
    end
  end
end
<commit_msg>trying to keep out the bad guys<commit_after>class ThreeStrikesAndYouAreOut
  def abuse_report_filed(payload)
    request = payload[:request]
    reporter = payload[:reporter]

    if reporter == "blind"
      check(request.helper)
    else
      check(request.blind)
    end
  end

  def check user
    if user.nil?
      return
    end
    no_of_abuses = user.abuse_reports.count
    if no_of_abuses == 1
      user.blocked = true
      user.save!
    end
  end
end

{'fraction_non_alphanumeric': 0.07407407407407407, 'fraction_numerical': 0.002178649237472767, 'mean_word_length': 2.521072796934866, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2132842', 'n_tokens_mistral': 316, 'n_tokens_neox': 303, 'n_words': 74}