<commit_before>begin
  require "java"
  require "jruby"

  # ojdbc7.jar, ojdbc6.jar or ojdbc5.jar file should be in application ./lib directory or in load path or in ENV['PATH']

  java_version = java.lang.System.getProperty("java.version")
  ojdbc_jars = if java_version =~ /^1.5/
    %w(ojdbc5.jar)
  elsif java_version =~ /^1.6/
    %w(ojdbc6.jar)
  elsif java_version >= '1.7'
    # Oracle 11g client ojdbc6.jar is also compatible with Java 1.7
    # Oracle 12c client provides new ojdbc7.jar
    %w(ojdbc7.jar ojdbc6.jar)
  else
    nil
  end

  if ojdbc_jars && ENV_JAVA['java.class.path'] !~ Regexp.new(ojdbc_jars.join('|'))
    # On Unix environment variable should be PATH, on Windows it is sometimes Path
    env_path = (ENV["PATH"] || ENV["Path"] || '').split(File::PATH_SEPARATOR)
    # Look for JDBC driver at first in lib subdirectory (application specific JDBC file version)
    # then in Ruby load path and finally in environment PATH
    ['./lib'].concat($LOAD_PATH).concat(env_path).detect do |dir|
      # check any compatible JDBC driver in the priority order
      ojdbc_jars.any? do |ojdbc_jar|
        if File.exists?(file_path = File.join(dir, ojdbc_jar))
          if java_version >= '1.8'
            puts "WARNING: JDK #{java_version} is not officially supported by #{ojdbc_jar}"
            puts "See http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_03 for supported versions"
          end
          require file_path
          true
        end
      end
    end
  end

  ORACLE_DRIVER = Java::oracle.jdbc.OracleDriver.new<commit_msg>Remove warning message when JDK 8 is used since Oracle JDBC Driver 12.1.0 supports JDK 8<commit_after>begin
  require "java"
  require "jruby"

  # ojdbc7.jar, ojdbc6.jar or ojdbc5.jar file should be in application ./lib directory or in load path or in ENV['PATH']

  java_version = java.lang.System.getProperty("java.version")
  ojdbc_jars = if java_version =~ /^1.5/
    %w(ojdbc5.jar)
  elsif java_version =~ /^1.6/
    %w(ojdbc6.jar)
  elsif java_version >= '1.7'
    # Oracle 11g client ojdbc6.jar is also compatible with Java 1.7
    # Oracle 12c client provides new ojdbc7.jar
    %w(ojdbc7.jar ojdbc6.jar)
  else
    nil
  end

  if ojdbc_jars && ENV_JAVA['java.class.path'] !~ Regexp.new(ojdbc_jars.join('|'))
    # On Unix environment variable should be PATH, on Windows it is sometimes Path
    env_path = (ENV["PATH"] || ENV["Path"] || '').split(File::PATH_SEPARATOR)
    # Look for JDBC driver at first in lib subdirectory (application specific JDBC file version)
    # then in Ruby load path and finally in environment PATH
    ['./lib'].concat($LOAD_PATH).concat(env_path).detect do |dir|
      # check any compatible JDBC driver in the priority order
      ojdbc_jars.any? do |ojdbc_jar|
        if File.exists?(file_path = File.join(dir, ojdbc_jar))
          require file_path
          true
        end
      end
    end
  end

  ORACLE_DRIVER = Java::oracle.jdbc.OracleDriver.new
{'fraction_non_alphanumeric': 0.10803601200400133, 'fraction_numerical': 0.020006668889629875, 'mean_word_length': 3.098360655737705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '5937815', 'n_tokens_mistral': 1067, 'n_tokens_neox': 999, 'n_words': 296}