<commit_before>class DefectsController < ApplicationController
  
  before_filter :require_user

  def new
    @defect = Defect.new
  end

  def create
    @defect = Defect.new(params[:defect])

    if @defect.save
      render :json => { :error => false }
    else
      render :json => { :error => true, :message => "We couldn't add that defect. Sorry!<br/><br/>#{@defect.errors.full_messages.join('<br/><br/>')}" }
    end
  end

  def destroy
    Defect.find(params[:id]).destroy
    render :json => {}
  end
end<commit_msg>Removed unneeded new method.<commit_after>class DefectsController < ApplicationController
  
  before_filter :require_user

  def create
    @defect = Defect.new(params[:defect])

    if @defect.save
      render :json => { :error => false }
    else
      render :json => { :error => true, :message => "We couldn't add that defect. Sorry!<br/><br/>#{@defect.errors.full_messages.join('<br/><br/>')}" }
    end
  end

  def destroy
    Defect.find(params[:id]).destroy
    render :json => {}
  end
end
{'fraction_non_alphanumeric': 0.14965986394557823, 'fraction_numerical': 0.0, 'mean_word_length': 3.204081632653061, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, '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': '4723091', 'n_tokens_mistral': 345, 'n_tokens_neox': 338, 'n_words': 79}