<commit_before>class ErrataReportsController < ApplicationController
  # GET /errata_reports
  # GET /errata_reports.json
  def index
    @need_acks = []
    @have_acks = []

    # TODO: When where.not method becomes available in Rails 4 this
    #       logic could possibly be simplified.
    Issue.where(:status => "POST").order(sort_column + " " + sort_direction).order(:flag_version).each do |bz|
      if display_flag_version?(bz, params["flag_version"])
        entry = BugEntry.new(bz)

        if entry.has_all_acks?
          @have_acks << entry
        else
          @need_acks << entry
        end
      end
    end

    respond_to do |format|
      format.html
      format.json { head :no_content }
    end
  end

  private

  def display_flag_version?(bz, requested_flag_version)<commit_msg>Change method name to all_acks? to pass rubocop coding style evaluation.<commit_after>class ErrataReportsController < ApplicationController
  # GET /errata_reports
  # GET /errata_reports.json
  def index
    @need_acks = []
    @have_acks = []

    # TODO: When where.not method becomes available in Rails 4 this
    #       logic could possibly be simplified.
    Issue.where(:status => "POST").order(sort_column + " " + sort_direction).order(:flag_version).each do |bz|
      if display_flag_version?(bz, params["flag_version"])
        entry = BugEntry.new(bz)

        if entry.all_acks?
          @have_acks << entry
        else
          @need_acks << entry
        end
      end
    end

    respond_to do |format|
      format.html
      format.json { head :no_content }
    end
  end

  private

  def display_flag_version?(bz, requested_flag_version)
{'fraction_non_alphanumeric': 0.09107249850209706, 'fraction_numerical': 0.0011983223487118035, 'mean_word_length': 2.6784140969162995, 'pattern_counts': {'":': 0, '<': 13, '<?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': '1680538', 'n_tokens_mistral': 516, 'n_tokens_neox': 490, 'n_words': 127}