<commit_before>module FcrepoAdmin::Controller
  module ControllerBehavior
    extend ActiveSupport::Concern

    included do
      helper_method :object_is_auditable?
      helper_method :object_is_governable?
      helper_method :object_is_governed_by
      helper_method :admin_policy_enforcement_enabled?
    end

    protected

    def load_and_authorize_object
      load_object
      authorize_object
    end

    def load_object
      id = params[:object_id] || params[:id]
      @object = ActiveFedora::Base.find(id, :cast => true)
    end<commit_msg>Placeholder for 404 response<commit_after>module FcrepoAdmin::Controller
  module ControllerBehavior
    extend ActiveSupport::Concern

    included do
      helper_method :object_is_auditable?
      helper_method :object_is_governable?
      helper_method :object_is_governed_by
      helper_method :admin_policy_enforcement_enabled?
    end

    protected

    def load_and_authorize_object
      load_object
      authorize_object
    end

    def load_object
      id = params[:object_id] || params[:id]
      begin
        @object = ActiveFedora::Base.find(id, :cast => true)
      rescue ActiveFedora::ObjectNotFoundError
        render :text => "Object not found", :status => 404
      end
    end
{'fraction_non_alphanumeric': 0.0625494853523357, 'fraction_numerical': 0.004750593824228029, 'mean_word_length': 3.343642611683849, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '365873', 'n_tokens_mistral': 381, 'n_tokens_neox': 360, 'n_words': 79}