<commit_before>module TeamsHelper
  # Returns index corresponding position in the ranking.
  def position(index)
    if index == 0
      raw "<span class='badge bg-gold'>1º</span>"
    elsif index == 1
      raw "<span class='badge bg-silver'>2º</span>"
    elsif index == 2
      raw "<span class='badge bg-bronze'>3º</span>"
    else
      "#{index + 1}º"
    end
  end

  # Get the percentage of representativeness of the score, considering the
  # base score.
  def score_representation(base_score, score)
    "#{(100 * score) / base_score}%"
  end

  def incentive_ranking_position(index, current_user_index)
    if index > current_user_index
      raw "<i class='fa fa-arrow-circle-down'></i>"
    elsif index == current_user_index
      raw "<i class='fa fa-angle-double-right'></i>"
    else
      raw "<i class='fa fa-arrow-circle-up'></i>"
    end
  end

  # Return the class to put in answer div.
  def answer_class(answer)
    return "correct" if answer.correct?
    "incorrect"
  end<commit_msg>Add return statement to the case of base_value = 0<commit_after>module TeamsHelper
  # Returns index corresponding position in the ranking.
  def position(index)
    if index == 0
      raw "<span class='badge bg-gold'>1º</span>"
    elsif index == 1
      raw "<span class='badge bg-silver'>2º</span>"
    elsif index == 2
      raw "<span class='badge bg-bronze'>3º</span>"
    else
      "#{index + 1}º"
    end
  end

  # Get the percentage of representativeness of the score, considering the
  # base score.
  def score_representation(base_score, score)
    return 0 if base_score == 0
    "#{(100 * score) / base_score}%"
  end

  def incentive_ranking_position(index, current_user_index)
    if index > current_user_index
      raw "<i class='fa fa-arrow-circle-down'></i>"
    elsif index == current_user_index
      raw "<i class='fa fa-angle-double-right'></i>"
    else
      raw "<i class='fa fa-arrow-circle-up'></i>"
    end
  end

  # Return the class to put in answer div.
  def answer_class(answer)
    return "correct" if answer.correct?
    "incorrect"
  end
{'fraction_non_alphanumeric': 0.12038369304556355, 'fraction_numerical': 0.011031175059952039, 'mean_word_length': 3.0583657587548636, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, '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': '1046467', 'n_tokens_mistral': 699, 'n_tokens_neox': 669, 'n_words': 204}