<commit_before>package psql;

import java.sql.SQLException;
import java.util.List;

import junit.framework.Assert;

import moria.Goblin;
import moria.Litter;
import moria.Tribe;

import org.apache.tomcat.jdbc.pool.DataSource;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import com.jajja.jorm.Column;
import com.jajja.jorm.Database;
import com.jajja.jorm.Record;
import com.jajja.jorm.exceptions.CheckViolationException;
import com.jajja.jorm.exceptions.UniqueViolationException;

public class Moria {

    @BeforeClass
    public static void open() {
//        DataSource dataSource = new DataSource();
//        dataSource.setDriverClassName("org.postgresql.Driver");
//        dataSource.setUrl("jdbc:postgresql://sjhdb05b.jajja.local:5432/moria");
//        dataSource.setUsername("gandalf");
//        dataSource.setPassword("<PASSWORD>");
//        Database.configure("moria", dataSource);
        try {
            Database.open("moria").load(ClassLoader.class.getResourceAsStream("/moria.sql"));
            Database.commit("moria");
            Database.open("moria").setLoggingEnabled(true);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @AfterClass
    public static void close() {
        Database.close("moria");
    }


    @Test
    public void t01_find() {
        try {
            Goblin goblin = Record.find(Goblin.class);
            Assert.assertNotNull(goblin);
        } catch (SQLException e) {
            e.printStackTrace();
            Assert.fail();
            Database.close("moria");
        }
    }
<commit_msg>Removed unussd imports and commented code.<commit_after>package psql;

import java.sql.SQLException;
import java.util.List;

import junit.framework.Assert;

import moria.Goblin;
import moria.Litter;
import moria.Tribe;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import com.jajja.jorm.Column;
import com.jajja.jorm.Database;
import com.jajja.jorm.Record;
import com.jajja.jorm.exceptions.CheckViolationException;
import com.jajja.jorm.exceptions.UniqueViolationException;

public class Moria {

    @BeforeClass
    public static void open() {
        try {
            Database.open("moria").load(ClassLoader.class.getResourceAsStream("/moria.sql"));
            Database.commit("moria");
            Database.open("moria").setLoggingEnabled(true);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @AfterClass
    public static void close() {
        Database.close("moria");
    }


    @Test
    public void t01_find() {
        try {
            Goblin goblin = Record.find(Goblin.class);
            Assert.assertNotNull(goblin);
        } catch (SQLException e) {
            e.printStackTrace();
            Assert.fail();
            Database.close("moria");
        }
    }

{'fraction_non_alphanumeric': 0.12283136710617627, 'fraction_numerical': 0.0034698126301179735, 'mean_word_length': 2.6914212548015364, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7365595', 'n_tokens_mistral': 898, 'n_tokens_neox': 884, 'n_words': 151}