<commit_before>class ActiveRecord::Base
  class << self
    def sqlanywhere_connection( config )
      config[:port] ||= 2638
      config[:url] ||= "jdbc:sybase:Tds:#{config[:host]}:#{config[:port]}?serviceName=#{config[:database]}"
      config[:driver] ||= "com.sybase.jdbc3.jdbc.SybDriver"
      config[:dialect] = "sqlanywhere"
      jdbc_connection(config)
    end
  end
end<commit_msg>Added driver version detection to connection setup<commit_after>class ActiveRecord::Base
  class << self
    def sqlanywhere_connection( config )
      version4 = true
      begin
        Java::com.sybase.jdbc4.jdbc.SybDriver
      rescue NameError
        version4 = false
      end
      config[:port] ||= 2638
      config[:url] ||= "jdbc:sybase:Tds:#{config[:host]}:#{config[:port]}?serviceName=#{config[:database]}"
      config[:driver] ||= version4 ? "com.sybase.jdbc4.jdbc.SybDriver" : "com.sybase.jdbc3.jdbc.SybDriver"
      config[:dialect] = "sqlanywhere"
      jdbc_connection(config)
    end
  end
end
{'fraction_non_alphanumeric': 0.14910536779324055, 'fraction_numerical': 0.014910536779324055, 'mean_word_length': 3.795238095238095, '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': '1074729', 'n_tokens_mistral': 344, 'n_tokens_neox': 326, 'n_words': 54}