<commit_before>module ClientVariable
  module Helpers
    module Instance
      def self.included base
        base.send(:include, InstanceMethods)
      end

      module InstanceMethods
        before_filter :client

        def client
          if new_request?
            Request.id = request.object_id
            Request.env = request.env
          end
          Variable
        end

        private
        def new_request?
          Request.env.blank? || Request.id != request.object_id
        end
      end
    end
  end
end

ActionController::Base.send :include, ClientVariable::Helpers::Instance
<commit_msg>always call client to update request<commit_after>module ClientVariable
  module Helpers
    module Instance
      def self.included base
        base.send(:include, InstanceMethods)
        base.class_eval do
          before_filter :client
        end

      end

      module InstanceMethods
        def client
          if new_request?
            Request.id = request.object_id
            Request.env = request.env
          end
          Variable
        end

        private
        def new_request?
          Request.env.blank? || Request.id != request.object_id
        end
      end
    end
  end
end

ActionController::Base.send :include, ClientVariable::Helpers::Instance

{'fraction_non_alphanumeric': 0.055895865237366005, 'fraction_numerical': 0.0, 'mean_word_length': 1.8413043478260869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2636558', 'n_tokens_mistral': 333, 'n_tokens_neox': 330, 'n_words': 90}