<commit_before>module CaseFiltering
  extend ActiveSupport::Concern

  def index
  	finished(:viewed_maps)
    page_size = 12
    @articles = Article.by_state(params[:state_id]).search(params[:query], page: params[:page], per_page: page_size) if params[:query].present? && params[:state_id].present?
    @articles = Article.by_state(params[:state_id]).order('date DESC').page(params[:page]).per(page_size) if !params[:query].present? && params[:state_id].present?
    @articles = Article.search(params[:query], page: params[:page], per_page: page_size) if params[:query].present? && !params[:state_id].present?
    @articles = Article.all.order('date DESC').page(params[:page]).per(page_size) if (!params[:query].present? && !params[:state_id].present?)
  end
end<commit_msg>Fixing split config to show consistent views to user<commit_after>module CaseFiltering
  extend ActiveSupport::Concern

  def index
  	finished(:viewed_maps, reset: false)
    page_size = 12
    @articles = Article.by_state(params[:state_id]).search(params[:query], page: params[:page], per_page: page_size) if params[:query].present? && params[:state_id].present?
    @articles = Article.by_state(params[:state_id]).order('date DESC').page(params[:page]).per(page_size) if !params[:query].present? && params[:state_id].present?
    @articles = Article.search(params[:query], page: params[:page], per_page: page_size) if params[:query].present? && !params[:state_id].present?
    @articles = Article.all.order('date DESC').page(params[:page]).per(page_size) if (!params[:query].present? && !params[:state_id].present?)
  end
end
{'fraction_non_alphanumeric': 0.17342482844666252, 'fraction_numerical': 0.002495321272613849, 'mean_word_length': 6.748792270531401, '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': '1678425', 'n_tokens_mistral': 510, 'n_tokens_neox': 493, 'n_words': 91}