<commit_before>require "java"
require "ant"

class Doubleshot
  class Compiler

    def initialize(source, target)
      @source = Pathname(source.to_s)
      @target = Pathname(target.to_s)
    end

    attr_reader :source, :target

    def build!
      @target.mkdir unless @target.exist?
      
      # The JRuby ant integration throws JRuby Persistence
      # warnings that you can't supress, so we run it
      # inside of a Kernel#silence block.
      silence do
        ant.path id: "classpath" do  
          fileset dir: @target.to_s

          $CLASSPATH.map do |path|
            Pathname path.to_s.gsub(/file\:/, "")
          end.select do |path|
            path.exist?
          end.map do |path|
            (path.directory? ? path : path.dirname).to_s.ensure_ends_with("/")
          end.uniq.each do |path|
            fileset dir: path
          end
        end

        ant.javac srcdir:     @source.to_s,
          destdir:            @target.to_s,
          debug:              "yes",
          includeantruntime:  "no",
          classpathref:       "classpath"
      end

      p $CLASSPATH
      $CLASSPATH << @target.to_s unless $CLASSPATH.include?(@target.to_s)
    end

  end # class Compiler
end # class Doubleshot<commit_msg>Removed debugging output from Compiler.<commit_after>require "java"
require "ant"

class Doubleshot
  class Compiler

    def initialize(source, target)
      @source = Pathname(source.to_s)
      @target = Pathname(target.to_s)
    end

    attr_reader :source, :target

    def build!
      @target.mkdir unless @target.exist?
      
      # The JRuby ant integration throws JRuby Persistence
      # warnings that you can't supress, so we run it
      # inside of a Kernel#silence block.
      silence do
        ant.path id: "classpath" do  
          fileset dir: @target.to_s

          $CLASSPATH.map do |path|
            Pathname path.to_s.gsub(/file\:/, "")
          end.select do |path|
            path.exist?
          end.map do |path|
            (path.directory? ? path : path.dirname).to_s.ensure_ends_with("/")
          end.uniq.each do |path|
            fileset dir: path
          end
        end

        ant.javac srcdir:     @source.to_s,
          destdir:            @target.to_s,
          debug:              "yes",
          includeantruntime:  "no",
          classpathref:       "classpath"
      end

      $CLASSPATH << @target.to_s unless $CLASSPATH.include?(@target.to_s)
    end

  end # class Compiler
end # class Doubleshot
{'fraction_non_alphanumeric': 0.09527590313616514, 'fraction_numerical': 0.0, 'mean_word_length': 1.8125, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4196751', 'n_tokens_mistral': 794, 'n_tokens_neox': 780, 'n_words': 205}