<commit_before>module CartoDB
  class GenericMigrator
    
    def initialize(version)
      @logger = ::Logger.new(STDOUT)
      @stats  = {
        tables_skipped:     0,
        tables_migrated:    0,
        tables_with_errors: {}
      }
      @tables_to_migrate = Table
      @version           = version.gsub(/\D/, '')

      require Rails.root.join("lib/cartodb/migrator#{@version}")
      self.class.send(:include, CartoDB::DataMigrator)
    end #initialize

    def already_migrated?(table)
      $tables_metadata.hget(table.key, "migrated_to_#{@version}").to_s == "true"
    end

    def migrated!(table)
      @stats[:tables_migrated] += 1
      $tables_metadata.hset(table.key, "migrated_to_#{@version}", true)
    end

    def log msg
      @logger.debug(msg)
    end
  end<commit_msg>Fix on generic migrator<commit_after>module CartoDB
  class GenericMigrator
    
    def initialize(version)
      @logger = ::Logger.new(STDOUT)
      @stats  = {
        tables_skipped:     0,
        tables_migrated:    0,
        tables_with_errors: {}
      }
      @tables_to_migrate = ::Table
      @version           = version.gsub(/\D/, '')

      require Rails.root.join("lib/cartodb/migrator#{@version}")
      self.class.send(:include, CartoDB::DataMigrator)
    end #initialize

    def already_migrated?(table)
      $tables_metadata.hget(table.key, "migrated_to_#{@version}").to_s == "true"
    end

    def migrated!(table)
      @stats[:tables_migrated] += 1
      $tables_metadata.hset(table.key, "migrated_to_#{@version}", true)
    end

    def log msg
      @logger.debug(msg)
    end
  end
{'fraction_non_alphanumeric': 0.12919254658385093, 'fraction_numerical': 0.0037267080745341614, 'mean_word_length': 2.58, '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': '2112555', 'n_tokens_mistral': 550, 'n_tokens_neox': 555, 'n_words': 90}