<commit_before>require "openid/util"

module OpenID
  
  class Extension

    def Extension.check(secret, query)
      e = create(secret, query)
      return nil if e.nil?
      return e.check_sig
    end

    def Extension.create(secret, query)
      return nil unless query[@prefix+'.sig']
      return nil unless query['openid.sig']
      new(secret, query, @prefix, @schema)
    end

    def Extension.uses_extension(query)
      return query.has_key?(@prefix+'.sig')
    end

    def Extension.extract(query)
      args = {}
      @schema.each do |s|
        key = @prefix + '.' + 's'
        args[key] = query[key] if query.has_key?(key)
      end
      args
    end

    def Extension.prefix
      @prefix
    end<commit_msg>[project @ fixed sreg test case]<commit_after>require "openid/util"

module OpenID
  
  class Extension

    def Extension.check(secret, query)
      e = create(secret, query)
      return nil if e.nil?
      return e.check_sig
    end

    def Extension.create(secret, query)
      return nil unless query[@prefix+'.sig']
      return nil unless query['openid.sig']
      new(secret, query, @prefix, @schema, @url)
    end

    def Extension.uses_extension(query)
      return query.has_key?(@prefix+'.sig')
    end

    def Extension.extract(query)
      args = {}
      @schema.each do |s|
        key = @prefix + '.' + 's'
        args[key] = query[key] if query.has_key?(key)
      end
      args
    end

    def Extension.prefix
      @prefix
    end
{'fraction_non_alphanumeric': 0.1134989926124916, 'fraction_numerical': 0.0, 'mean_word_length': 2.318485523385301, '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': '4193332', 'n_tokens_mistral': 475, 'n_tokens_neox': 465, 'n_words': 124}