<commit_before>class HomeController < ApplicationController
  before_filter :authenticate_user!
  set_tab :home

  def index
      @deadlines = Deadline.all 
      @important_articles = Article.where("publish_at < NOW()" ).where("sticky = 1").order("created_at DESC").limit(1)
      @articles = Article.where("publish_at < NOW()" ).where("sticky < 1").order("created_at DESC").limit(5)
      if current_user.has_role?(:admin)
        render :template => 'home/index1'
      elsif current_user.has_role?(:functionary) || current_user.has_role?(:theme) || current_user.has_role?(:dialogue)
        @lastten = Question.find(:all, :joins=>"JOIN participants p  ON p.id = questions.participant_id JOIN functionaries_participants fp ON fp.participant_id = p.id JOIN functionaries f ON f.id = fp.functionary_id", :conditions=>"questions.question_status_id = 1 AND fp.functionary_id ="+current_user.functionary.id.to_s, :order=>"created_at DESC", :limit=>"10")
        if current_user.has_role?(:dialogue)
          @lastten = Question.find(:all, :conditions=>"questions.question_status_id = 1 AND dialogue=1", :order=>"created_at DESC", :limit=>"10")
        end
        render :template => 'home/index2'
      elsif current_user.has_role?(:participant)
        render :template => 'home/index3'
      elsif current_user.has_role?(:sec)
        redirect_to participants_path
      else
        render :template => 'home/index'
      end
  end

end<commit_msg>Indentation fix home controller<commit_after>class HomeController < ApplicationController
  before_filter :authenticate_user!
  set_tab :home

  def index
    @deadlines = Deadline.all 
    @important_articles = Article.where("publish_at < NOW()" ).where("sticky = 1").order("created_at DESC").limit(1)
    @articles = Article.where("publish_at < NOW()" ).where("sticky < 1").order("created_at DESC").limit(5)
    if current_user.has_role?(:admin)
      render :template => 'home/index1'
    elsif current_user.has_role?(:functionary) || current_user.has_role?(:theme) || current_user.has_role?(:dialogue)
      @lastten = Question.find(:all, :joins=>"JOIN participants p  ON p.id = questions.participant_id JOIN functionaries_participants fp ON fp.participant_id = p.id JOIN functionaries f ON f.id = fp.functionary_id", :conditions=>"questions.status = 1 AND fp.functionary_id ="+current_user.functionary.id.to_s, :order=>"created_at DESC", :limit=>"10")
      if current_user.has_role?(:dialogue)
        @lastten = Question.find(:all, :conditions=>"questions.status = 1 AND dialogue=1", :order=>"created_at DESC", :limit=>"10")
      end
      render :template => 'home/index2'
    elsif current_user.has_role?(:participant)
      render :template => 'home/index3'
    elsif current_user.has_role?(:sec)
      redirect_to participants_path
    else
      render :template => 'home/index'
    end
  end

end
{'fraction_non_alphanumeric': 0.13626834381551362, 'fraction_numerical': 0.009783368273934312, 'mean_word_length': 4.321561338289963, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '6626334', 'n_tokens_mistral': 950, 'n_tokens_neox': 903, 'n_words': 184}