<commit_before><?php
class DBTest extends PHPUnit_Framework_TestCase {
    public function testUser() {
        try {
            $dsn = "mysql:host=localhost";
            $dsn .= ";dbname=hackthis";
            $db = new PDO($dsn, 'ubuntu');
            $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
        } catch(PDOException $e) {
            die($e->getMessage());
        }

        $st = $conn->prepare("INSERT INTO users (`username`, `password`) VALUES ('<PASSWORD>', '<PASSWORD>');");
        $st->execute();
        $st = $conn->prepare("INSERT INTO users (`username`, `password`) VALUES ('<PASSWORD>', '<PASSWORD>');");
        $st->execute();

        $st = $conn->prepare("SELECT count(user_id) AS count FROM users");
        $row = $st->fetch();
        $this->assertEquals(2, $row->count);

        $st = $conn->prepare("SELECT password, score, status FROM users WHERE username = 'flabbyrabbit'");
        $row = $st->fetch();
        $this->assertEquals('pass', $row->password);
        $this->assertEquals(0, $row->score);
        $this->assertEquals(1, $row->status);
    }
}
?><commit_msg>Idiot named db conn<commit_after><?php
class DBTest extends PHPUnit_Framework_TestCase {
    public function testUser() {
        try {
            $dsn = "mysql:host=localhost";
            $dsn .= ";dbname=hackthis";
            $db = new PDO($dsn, 'ubuntu');
            $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);
        } catch(PDOException $e) {
            die($e->getMessage());
        }

        $st = $db->prepare("INSERT INTO users (`username`, `password`) VALUES ('<PASSWORD>', '<PASSWORD>');");
        $st->execute();
        $st = $db->prepare("INSERT INTO users (`username`, `password`) VALUES ('osaka', '<PASSWORD>');");
        $st->execute();

        $st = $db->prepare("SELECT count(user_id) AS count FROM users");
        $row = $st->fetch();
        $this->assertEquals(2, $row->count);

        $st = $db->prepare("SELECT password, score, status FROM users WHERE username = 'flabbyrabbit'");
        $row = $st->fetch();
        $this->assertEquals('<PASSWORD>', $row->password);
        $this->assertEquals(0, $row->score);
        $this->assertEquals(1, $row->status);
    }
}
?>
{'fraction_non_alphanumeric': 0.19043659043659045, 'fraction_numerical': 0.002494802494802495, 'mean_word_length': 2.8069620253164556, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 51, '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': '465138', 'n_tokens_mistral': 753, 'n_tokens_neox': 732, 'n_words': 149}