<commit_before>module Unparser
  class CLI

    # CLI Specific preprocessor used for equivalency testing
    class Preprocessor
      include AbstractType, Concord.new(:node), Procto.call(:result)

      # Return preprocessor result
      #
      # @return [Parser::AST::Node]
      #
      # @api private
      #
      abstract_method :result

      # Run preprocessor for node
      #
      # @param
      #
      # @return [Parser::AST::Node]
      #
      # @api private
      #
      def self.run(node)
        REGISTRY.fetch(node.type, Noop).new(node).result
      end

      REGISTRY = {}

      # Register preprocessor
      #
      # @param [Symbol] type
      #<commit_msg>Allow to pass nil nodes from CLI preprocessor<commit_after>module Unparser
  class CLI

    # CLI Specific preprocessor used for equivalency testing
    class Preprocessor
      include AbstractType, Concord.new(:node), Procto.call(:result)

      # Return preprocessor result
      #
      # @return [Parser::AST::Node]
      #
      # @api private
      #
      abstract_method :result

      # Run preprocessor for node
      #
      # @param [Parser::AST::Node, nil] node
      #
      # @return [Parser::AST::Node, nil]
      #
      # @api private
      #
      def self.run(node)
        return if node.nil?
        REGISTRY.fetch(node.type, Noop).new(node).result
      end

      REGISTRY = {}

      # Register preprocessor
      #
      # @param [Symbol] type
      #
{'fraction_non_alphanumeric': 0.0999315537303217, 'fraction_numerical': 0.0, 'mean_word_length': 1.9715447154471544, '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': '4502668', 'n_tokens_mistral': 442, 'n_tokens_neox': 420, 'n_words': 106}