<commit_before>/*
 * Copyright (C) 2013, 2014 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.zaxxer.hikari.proxy;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashSet;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicInteger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.zaxxer.hikari.pool.HikariPool;
import com.zaxxer.hikari.util.FastList;

/**
 * This is the proxy class for java.sql.Connection.
 *
 * @author <NAME>
 */
public abstract class ConnectionProxy implements IHikariConnectionProxy
{
    private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionProxy.class);

    private static final Set<String> SQL_ERRORS;

    protected final Connection delegate;

    private final FastList<Statement> openStatements;
    private final HikariPool parentPool;
    private final AtomicInteger state;
    private final String defaultCatalog;
    private final long expirationTime;
    private final int defaultIsolationLevel;
    private final boolean defaultAutoCommit;
    private final boolean defaultReadOnly;

    private boolean forceClose;
    private boolean isAutoCommitDirty;
    private boolean isCatalogDirty;
    private volatile boolean isClosed;
    private boolean isReadOnlyDirty;<commit_msg>Revert "Speculative fix for cross-thread visibility issue."<commit_after>/*
 * Copyright (C) 2013, 2014 <NAME>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.zaxxer.hikari.proxy;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.HashSet;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicInteger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.zaxxer.hikari.pool.HikariPool;
import com.zaxxer.hikari.util.FastList;

/**
 * This is the proxy class for java.sql.Connection.
 *
 * @author <NAME>
 */
public abstract class ConnectionProxy implements IHikariConnectionProxy
{
    private static final Logger LOGGER = LoggerFactory.getLogger(ConnectionProxy.class);

    private static final Set<String> SQL_ERRORS;

    protected final Connection delegate;

    private final FastList<Statement> openStatements;
    private final HikariPool parentPool;
    private final AtomicInteger state;
    private final String defaultCatalog;
    private final long expirationTime;
    private final int defaultIsolationLevel;
    private final boolean defaultAutoCommit;
    private final boolean defaultReadOnly;

    private boolean forceClose;
    private boolean isAutoCommitDirty;
    private boolean isCatalogDirty;
    private boolean isClosed;
    private boolean isReadOnlyDirty;
{'fraction_non_alphanumeric': 0.07184124591811103, 'fraction_numerical': 0.007033408691283597, 'mean_word_length': 4.454794520547945, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6437546', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1082, 'n_words': 388}