<commit_before>class Dashboard::ProjectsController < Dashboard::ApplicationController
  before_action :event_filter

  def index
    @projects = current_user.authorized_projects.sorted_by_activity.non_archived
    @projects = @projects.sort(@sort = params[:sort])
    @projects = @projects.includes(:namespace)
    @last_push = current_user.recent_push

    respond_to do |format|
      format.html
      format.atom do
        event_filter
        load_events
        render layout: false
      end
    end
  end

  def starred
    @projects = current_user.starred_projects
    @projects = @projects.includes(:namespace, :forked_from_project, :tags)
    @projects = @projects.sort(@sort = params[:sort])
    @last_push = current_user.recent_push
    @groups = []

    respond_to do |format|
      format.html

      format.json do
        load_events
        pager_json("events/_events", @events.count)
      end
    end
  end

  private<commit_msg>Page project list on dashboard<commit_after>class Dashboard::ProjectsController < Dashboard::ApplicationController
  before_action :event_filter

  def index
    @projects = current_user.authorized_projects.sorted_by_activity.non_archived
    @projects = @projects.sort(@sort = params[:sort])
    @projects = @projects.includes(:namespace)
    @projects = @projects.page(params[:page]).per(PER_PAGE)
    @last_push = current_user.recent_push

    respond_to do |format|
      format.html
      format.atom do
        event_filter
        load_events
        render layout: false
      end
    end
  end

  def starred
    @projects = current_user.starred_projects
    @projects = @projects.includes(:namespace, :forked_from_project, :tags)
    @projects = @projects.sort(@sort = params[:sort])
    @projects = @projects.page(params[:page]).per(PER_PAGE)
    @last_push = current_user.recent_push
    @groups = []

    respond_to do |format|
      format.html

      format.json do
        load_events
        pager_json("events/_events", @events.count)
      end
    end
  end

  private
{'fraction_non_alphanumeric': 0.09425625920471281, 'fraction_numerical': 0.0, 'mean_word_length': 3.2020618556701033, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6432143', 'n_tokens_mistral': 614, 'n_tokens_neox': 592, 'n_words': 121}