<commit_before><?php

require_once(__DIR__ . '/Tests.php');

class SqlServerTest extends Tests
{
    /**
     * Connects to the Database
     *
     * @return object Database connection
     */
    public function connect($config)
    {
        $connectionInfo = array(
            'UID' => $config['username'],
            'PWD' => $config['password'],
            'Database' => $config['database'],
            'CharacterSet' => 'UTF-8',
        );

        $db = sqlsrv_connect($config['hostname'], $dbectionInfo);

        if (!$db) {
            die("Connect failed: ".print_r( sqlsrv_errors(), true));
        }

        return $db;
    }

    /**
     * Disconnects from the Database<commit_msg>bugfix<commit_after><?php

require_once(__DIR__ . '/Tests.php');

class SqlServerTest extends Tests
{
    /**
     * Connects to the Database
     *
     * @return object Database connection
     */
    public function connect($config)
    {
        $connectionInfo = array(
            'UID' => $config['username'],
            'PWD' => $config['password'],
            'Database' => $config['database'],
            'CharacterSet' => 'UTF-8',
        );

        $db = sqlsrv_connect($config['hostname'], $connectionInfo);

        if (!$db) {
            die("Connect failed: ".print_r( sqlsrv_errors(), true));
        }

        return $db;
    }

    /**
     * Disconnects from the Database
{'fraction_non_alphanumeric': 0.1529664045746962, 'fraction_numerical': 0.0014295925661186562, 'mean_word_length': 2.036876355748373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '1968467', 'n_tokens_mistral': 404, 'n_tokens_neox': 401, 'n_words': 87}