<commit_before>// Copyright (c) 2001  SPY internetworking <<EMAIL>>
//
// arch-tag: 68A71B25-1110-11D9-92A5-000A957659CC

package net.spy.db;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

import net.spy.util.SpyConfig;

/**
 * Superclass for dynamic SQL calls.
 */
public abstract class DBSQL extends DBSP {

	private Map<String, String> registeredQueries=null;

	/**
	 * Get a DBSQL object with the given DBConfig.
	 */
	public DBSQL(SpyConfig conf) throws SQLException {
		super(conf);
	}

	/**
	 * Get a DBSQL object with the given Connection.
	 */
	public DBSQL(Connection conn) throws SQLException {
		super(conn);
	}

	/** 
	 * Register a named query.
	 * 
	 * @param name the name of the query (i.e. pgsql)
	 * @param query the query
	 */
	protected void registerQuery(String name, String query) {
		if(registeredQueries==null) {
			registeredQueries=new HashMap<String, String>();
		}
		registeredQueries.put(name, query);
	}

	/** 
	 * Set the Map of registered queries.
	 * 
	 * @param to the Map of registered queries.
	 */
	protected void setRegisteredQueryMap(Map<String, String> to) {
		registeredQueries=to;<commit_msg>Remove a piece of dead code.<commit_after>// Copyright (c) 2001  SPY internetworking <<EMAIL>>
//
// arch-tag: 68A71B25-1110-11D9-92A5-000A957659CC

package net.spy.db;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

import net.spy.util.SpyConfig;

/**
 * Superclass for dynamic SQL calls.
 */
public abstract class DBSQL extends DBSP {

	private Map<String, String> registeredQueries=null;

	/**
	 * Get a DBSQL object with the given DBConfig.
	 */
	public DBSQL(SpyConfig conf) throws SQLException {
		super(conf);
	}

	/**
	 * Get a DBSQL object with the given Connection.
	 */
	public DBSQL(Connection conn) throws SQLException {
		super(conn);
	}

	/** 
	 * Set the Map of registered queries.
	 * 
	 * @param to the Map of registered queries.
	 */
	protected void setRegisteredQueryMap(Map<String, String> to) {
		registeredQueries=to;
{'fraction_non_alphanumeric': 0.11330935251798561, 'fraction_numerical': 0.026079136690647483, 'mean_word_length': 3.8056155507559395, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '6790884', 'n_tokens_mistral': 806, 'n_tokens_neox': 718, 'n_words': 207}