<commit_before>class CommentsController < ApplicationController
  before_action :set_comment, only: [:show, :edit, :update, :destroy]

  load_and_authorize_resource

  # GET /comments
  # GET /comments.json
  def index
    if params[:task_id].present?
      @task = Task.find(params[:task_id])
      @comments = @task.comments.active.all(:include=>:user)
      @comment = @task.comments.new
    else
      @comments = Comment.active
    end
  end

  # GET /comments/1
  # GET /comments/1.json
  def show
  end

  # GET /comments/new
  def new
    @comment = Comment.new
  end

  # GET /comments/1/edit
  def edit
  end

  # POST /comments
  # POST /comments.json
  def create<commit_msg>anyone can comment<commit_after>class CommentsController < ApplicationController
  before_action :set_comment, only: [:show, :edit, :update, :destroy]

  #load_and_authorize_resource

  # GET /comments
  # GET /comments.json
  def index
    if params[:task_id].present?
      @task = Task.find(params[:task_id])
      @comments = @task.comments.active.all(:include=>:user)
      @comment = @task.comments.new
    else
      @comments = Comment.active
    end
  end

  # GET /comments/1
  # GET /comments/1.json
  def show
  end

  # GET /comments/new
  def new
    @comment = Comment.new
  end

  # GET /comments/1/edit
  def edit
  end

  # POST /comments
  # POST /comments.json
  def create
{'fraction_non_alphanumeric': 0.1108695652173913, 'fraction_numerical': 0.004347826086956522, 'mean_word_length': 2.8683473389355743, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2256404', 'n_tokens_mistral': 467, 'n_tokens_neox': 450, 'n_words': 111}