<commit_before>package org.narwhal.query;


public class PostgreSQLQueryCreator extends QueryCreator {


    @Override
    public String makeInsertQuery(String tableName, String[] columns, String primaryColumnName) {
        StringBuilder builder = new StringBuilder("INSERT INTO ");
        builder.append(tableName);
        builder.append(" VALUES (");

        for (int i = 0; i < columns.length; ++i) {
            if (!primaryColumnName.equals(columns[i])) {
                if (i > 0) {
                    builder.append(',');
                }

                builder.append('?');
            }
        }
        builder.append(')');

        return builder.toString();
    }
}<commit_msg>Fixed bug related with DEFAULT value and NOT NULL constraint violation<commit_after>package org.narwhal.query;


public class PostgreSQLQueryCreator extends QueryCreator {


    @Override
    public String makeInsertQuery(String tableName, String[] columns, String primaryColumnName) {
        StringBuilder builder = new StringBuilder("INSERT INTO ");
        builder.append(tableName);
        builder.append('(');
        for (int i = 0; i < columns.length; ++i) {
            if (!primaryColumnName.equals(columns[i])) {
                builder.append(columns[i]);

                if (i > 0 && i < columns.length - 1) {
                    builder.append(',');
                }
            }
        }
        builder.append(") VALUES (");

        for (int i = 0; i < columns.length; ++i) {
            if (!primaryColumnName.equals(columns[i])) {
                builder.append('?');

                if (i > 0 && i < columns.length - 1) {
                    builder.append(',');
                }
            }
        }
        builder.append(')');

        return builder.toString();
    }
}
{'fraction_non_alphanumeric': 0.12597114317425084, 'fraction_numerical': 0.004439511653718091, 'mean_word_length': 1.8215962441314555, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, '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': '6270077', 'n_tokens_mistral': 493, 'n_tokens_neox': 456, 'n_words': 113}