<commit_before>package org.javasimon.jdbc4;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * JDBC configuration contains Simon JDBC connnection URL, real JDBC connection URL and Simon properties.
 * <p/>
 * It parses given url and than provides getters for driver's propreties if provided or default values.
 *
 * @author gquintana
 * @since 3.4
 */
public class SimonConnectionConfiguration {
	/**
	 * Default hierarchy prefix for Simon JDBC driver. All Simons created by Simon JDBC
	 * driver without explicitly specified prefix are started with default prefix.
	 */
	public static final String DEFAULT_PREFIX = "org.javasimon.jdbc";

	/**
	 * Prefix used in JDBC connection URLs.
	 */
	public static final String URL_PREFIX = "jdbc:simon";

	/**
	 * Regex used to parse JDBC connection URL.
	 */
	private static final Pattern URL_PATTERN = Pattern.compile(URL_PREFIX + ":([\\w]*):.*");

	/**
	 * Name for the property holding the real driver class value.
	 */
	public static final String REAL_DRIVER = "simon_real_drv";
	/**
	 * Name for the driver property holding the hierarchy prefix given to JDBC Simons.
	 */
	public static final String PREFIX = "simon_prefix";<commit_msg>Cosmetic JavaDoc change<commit_after>package org.javasimon.jdbc4;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * JDBC configuration contains Simon JDBC connnection URL, real JDBC connection URL and Simon properties.
 * <p/>
 * It parses given url and than provides getters for driver's propreties if provided or default values.
 * Prior to Simon 3.4, this class was known as org.javasimon.jdbc4.Driver.Url and only used in {@code org.javasimon.jdbc4.Driver}.
 * It was externalized and is now used in both {@code org.javasimon.jdbc4.Driver} 
 * and {@code org.javasimon.jdbcx4.SimonDataSource} and other Simon DataSources.
 * @author <NAME>
 * @author gquintana
 * @since 3.4
 */
public class SimonConnectionConfiguration {
	/**
	 * Default hierarchy prefix for Simon JDBC driver. All Simons created by Simon JDBC
	 * driver without explicitly specified prefix are started with default prefix.
	 */
	public static final String DEFAULT_PREFIX = "org.javasimon.jdbc";

	/**
	 * Prefix used in JDBC connection URLs.
	 */
	public static final String URL_PREFIX = "jdbc:simon";

	/**
	 * Regex used to parse JDBC connection URL.
	 */
	private static final Pattern URL_PATTERN = Pattern.compile(URL_PREFIX + ":([\\w]*):.*");

	/**
	 * Name for the property holding the real driver class value.
	 */
	public static final String REAL_DRIVER = "simon_real_drv";
	/**
	 * Name for the driver property holding the hierarchy prefix given to JDBC Simons.
	 */
	public static final String PREFIX = "simon_prefix";
{'fraction_non_alphanumeric': 0.09366576819407008, 'fraction_numerical': 0.004043126684636119, 'mean_word_length': 4.101374570446735, 'pattern_counts': {'":': 2, '<': 6, '<?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': '4742396', 'n_tokens_mistral': 902, 'n_tokens_neox': 824, 'n_words': 321}