<commit_before>package com.splicemachine.derby.test.framework;

import com.splicemachine.constants.SpliceConstants;
import com.splicemachine.utils.SpliceLogUtils;
import com.splicemachine.db.jdbc.ClientDriver;
import org.apache.log4j.Logger;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;

/**
 * Convenient factory for obtaining java.sql.Connection to LOCAL splice from tests.
 */
public class SpliceNetConnection {

    private static final Logger LOG = Logger.getLogger(SpliceNetConnection.class);
    private static final String DB_URL_LOCAL = "jdbc:derby://localhost:1527/" + SpliceConstants.SPLICE_DB + ";create=true;user=%s;password=%s";
    public static final String DEFAULT_USER = "splice";
    public static final String DEFAULT_USER_PASSWORD = "<PASSWORD>";
    private static boolean driverClassLoaded;

    public static Connection getConnection() throws SQLException {
        return getConnectionAs(DEFAULT_USER, DEFAULT_USER_PASSWORD);
    }

    public static Connection getConnectionAs(String userName, String password) throws SQLException {
        return getConnectionAs(DB_URL_LOCAL, userName, password);
    }

    public static String getDefaultLocalURL() {
    	return String.format(DB_URL_LOCAL, DEFAULT_USER, DEFAULT_USER_PASSWORD);
    }
    
    public static String getLocalURL(String userName, String password) {
    	return String.format(DB_URL_LOCAL, userName, password);
    }
    
    public static String getURL(String providedURL, String userName, String password) {
    	return String.format(providedURL, userName, password);
    }
    
    public static Connection getConnectionAs(String providedURL, String userName, String password) throws SQLException {
        loadDriver();<commit_msg>Bad Merge with Davids change<commit_after>package com.splicemachine.derby.test.framework;

import com.splicemachine.constants.SpliceConstants;
import com.splicemachine.utils.SpliceLogUtils;
import com.splicemachine.db.jdbc.ClientDriver;
import org.apache.log4j.Logger;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;

/**
 * Convenient factory for obtaining java.sql.Connection to LOCAL splice from tests.
 */
public class SpliceNetConnection {

    private static final Logger LOG = Logger.getLogger(SpliceNetConnection.class);
    private static final String DB_URL_LOCAL = "jdbc:splice://localhost:1527/" + SpliceConstants.SPLICE_DB + ";create=true;user=%s;password=%s";
    public static final String DEFAULT_USER = "splice";
    public static final String DEFAULT_USER_PASSWORD = "<PASSWORD>";
    private static boolean driverClassLoaded;

    public static Connection getConnection() throws SQLException {
        return getConnectionAs(DEFAULT_USER, DEFAULT_USER_PASSWORD);
    }

    public static Connection getConnectionAs(String userName, String password) throws SQLException {
        return getConnectionAs(DB_URL_LOCAL, userName, password);
    }

    public static String getDefaultLocalURL() {
    	return String.format(DB_URL_LOCAL, DEFAULT_USER, DEFAULT_USER_PASSWORD);
    }
    
    public static String getLocalURL(String userName, String password) {
    	return String.format(DB_URL_LOCAL, userName, password);
    }
    
    public static String getURL(String providedURL, String userName, String password) {
    	return String.format(providedURL, userName, password);
    }
    
    public static Connection getConnectionAs(String providedURL, String userName, String password) throws SQLException {
        loadDriver();
{'fraction_non_alphanumeric': 0.08075221238938053, 'fraction_numerical': 0.0027654867256637168, 'mean_word_length': 4.750397456279809, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6005009', 'n_tokens_mistral': 1003, 'n_tokens_neox': 974, 'n_words': 257}