<commit_before>class StatusController < ApplicationController
  protect_from_forgery :except => [:status_update]
  before_action :check_if_smokedetector, :only => [:status_update]

  def index
  end

  def status_update

    commit_update = CommitStatus.where('created_at >= ?', @smoke_detector.last_ping).last

    @smoke_detector.last_ping = DateTime.now
    @smoke_detector.location = params[:location]

    @smoke_detector.save!

    respond_to do |format|
      format.json do
        if commit_update.present?
          render status: 201, :json => commit_update
        else
          render status: 200
        end
      end
    end
  end
end
<commit_msg>Render text instead of searching for a template that doesn't exist<commit_after>class StatusController < ApplicationController
  protect_from_forgery :except => [:status_update]
  before_action :check_if_smokedetector, :only => [:status_update]

  def index
  end

  def status_update

    commit_update = CommitStatus.where('created_at >= ?', @smoke_detector.last_ping).last

    @smoke_detector.last_ping = DateTime.now
    @smoke_detector.location = params[:location]

    @smoke_detector.save!

    respond_to do |format|
      format.json do
        if commit_update.present?
          render status: 201, :json => commit_update
        else
          render status: 200, :text => "OK"
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.08393113342898136, 'fraction_numerical': 0.00860832137733142, 'mean_word_length': 3.1766467065868262, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '3087322', 'n_tokens_mistral': 444, 'n_tokens_neox': 418, 'n_words': 100}