<commit_before>require 'uri'

module OAuth
  module Provider
    class Authorizer
      attr_accessor :user, :params, :app

      def initialize(user, authorized, params = {})
        @user = user
        @params = params
        @authorized = authorized
      end

      def app
        @app ||= ::ClientApplication.find_by_key!(params[:client_id])
      end<commit_msg>Fixed queries when using mongoid<commit_after>require 'uri'

module OAuth
  module Provider
    class Authorizer
      attr_accessor :user, :params, :app

      def initialize(user, authorized, params = {})
        @user = user
        @params = params
        @authorized = authorized
      end

      def app
        @app ||= ::ClientApplication.where(:key => params[:client_id]).first
      end
{'fraction_non_alphanumeric': 0.09765625, 'fraction_numerical': 0.0, 'mean_word_length': 2.5275229357798166, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3929968', 'n_tokens_mistral': 215, 'n_tokens_neox': 210, 'n_words': 60}