<commit_before>package no.steria.skuldsku.recorder.dbrecorder.impl.oracle;

import no.steria.skuldsku.recorder.dbrecorder.DatabaseRecorder;
import no.steria.skuldsku.recorder.logging.RecorderLog;
import no.steria.skuldsku.utils.*;

import javax.sql.DataSource;
import java.io.PrintWriter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import static no.steria.skuldsku.DatabaseTableNames.SKULDSKU_DATABASE_TABLE_PREFIX;
import static no.steria.skuldsku.DatabaseTableNames.DATABASE_RECORDINGS_TABLE;

public class OracleDatabaseRecorder implements DatabaseRecorder {

    private static final int MAX_TRIGGER_NAME_LENGTH = 30;

    private List<String> ignoredTables = new ArrayList<>();

    private final TransactionManager transactionManager;

    
    public OracleDatabaseRecorder(DataSource dataSource) {
        this(new SimpleTransactionManager(dataSource), new ArrayList<String>(0));
    }

    public OracleDatabaseRecorder(DataSource dataSource, List<String> ignoredTables) {
        this(new SimpleTransactionManager(dataSource), new ArrayList<String>(0));
        this.ignoredTables = ignoredTables;
    }

    OracleDatabaseRecorder(TransactionManager transactionManager, List<String> ignoredTables) {
        this.transactionManager = transactionManager;
        this.ignoredTables = ignoredTables;
    }

    @Override
    public void initialize() {
        transactionManager.doInTransaction(new TransactionCallback<Object>() {
            @Override
            public Object callback(Jdbc jdbc) {
                createRecorderTableIfNotExists(jdbc);
                createDbSequenceIfNotExists(jdbc);
                return null;
            }
        });
    }

    @Override
    public void start() {
        createTriggersInTransaction();
    }

    @Override
    public void stop() {<commit_msg>Cleaning.<commit_after>package no.steria.skuldsku.recorder.dbrecorder.impl.oracle;

import no.steria.skuldsku.recorder.dbrecorder.DatabaseRecorder;
import no.steria.skuldsku.recorder.logging.RecorderLog;
import no.steria.skuldsku.utils.*;

import javax.sql.DataSource;
import java.io.PrintWriter;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import static no.steria.skuldsku.DatabaseTableNames.SKULDSKU_DATABASE_TABLE_PREFIX;
import static no.steria.skuldsku.DatabaseTableNames.DATABASE_RECORDINGS_TABLE;

public class OracleDatabaseRecorder implements DatabaseRecorder {

    private static final int MAX_TRIGGER_NAME_LENGTH = 30;

    private List<String> ignoredTables = new ArrayList<>();

    private final TransactionManager transactionManager;

    
    public OracleDatabaseRecorder(DataSource dataSource) {
        this(new SimpleTransactionManager(dataSource), new ArrayList<String>(0));
    }

    public OracleDatabaseRecorder(DataSource dataSource, List<String> ignoredTables) {
        this(new SimpleTransactionManager(dataSource), ignoredTables);
    }

    OracleDatabaseRecorder(TransactionManager transactionManager, List<String> ignoredTables) {
        this.transactionManager = transactionManager;
        this.ignoredTables = ignoredTables;
    }

    @Override
    public void initialize() {
        transactionManager.doInTransaction(new TransactionCallback<Object>() {
            @Override
            public Object callback(Jdbc jdbc) {
                createRecorderTableIfNotExists(jdbc);
                createDbSequenceIfNotExists(jdbc);
                return null;
            }
        });
    }

    @Override
    public void start() {
        createTriggersInTransaction();
    }

    @Override
    public void stop() {
{'fraction_non_alphanumeric': 0.08164368748310354, 'fraction_numerical': 0.001892403352257367, 'mean_word_length': 3.761904761904762, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '4245605', 'n_tokens_mistral': 1025, 'n_tokens_neox': 990, 'n_words': 189}