<commit_before>package mytown.proxies;

import java.util.Hashtable;
import java.util.Map;

import mytown.MyTown;
import mytown.api.datasource.MyTownDatasource;
import mytown.config.Config;
import mytown.core.utils.Log;
import mytown.datasource.impl.MyTownDatasource_mysql;
import mytown.datasource.impl.MyTownDatasource_sqlite;
import net.minecraftforge.common.Configuration;
import cpw.mods.fml.common.event.FMLInterModComms;

/**
 * Handles all of the Datasource stuffs
 * 
 * @author <NAME>
 */
public class DatasourceProxy {
	private static MyTownDatasource datasource;
	private static Map<String, Class<?>> types = new Hashtable<String, Class<?>>();
	private static Log log = MyTown.instance.log.createChild("Datasource");

	/**
	 * Adds the default datasource types
	 */
	static {
		DatasourceProxy.types.put("mysql", MyTownDatasource_mysql.class);
		DatasourceProxy.types.put("sqlite", MyTownDatasource_sqlite.class);
	}

	/**
	 * Starts the datasource
	 * 
	 * @param config
	 * @return
	 * @throws Exception
	 */
	public static boolean start(Configuration config) {
		if (!DatasourceProxy.types.containsKey(Config.dbType.toLowerCase())) {
			DatasourceProxy.log.severe("Failed to find datasource type: %s", Config.dbType.toLowerCase());
			return false;
		}<commit_msg>Made a note saying the static block *should* work :p<commit_after>package mytown.proxies;

import java.util.Hashtable;
import java.util.Map;

import mytown.MyTown;
import mytown.api.datasource.MyTownDatasource;
import mytown.config.Config;
import mytown.core.utils.Log;
import mytown.datasource.impl.MyTownDatasource_mysql;
import mytown.datasource.impl.MyTownDatasource_sqlite;
import net.minecraftforge.common.Configuration;
import cpw.mods.fml.common.event.FMLInterModComms;

/**
 * Handles all of the Datasource stuffs
 * 
 * @author <NAME>
 */
public class DatasourceProxy {
	private static MyTownDatasource datasource;
	private static Map<String, Class<?>> types = new Hashtable<String, Class<?>>();
	private static Log log = MyTown.instance.log.createChild("Datasource");

	/**
	 * Adds the default datasource types
	 * Should be added when this class is first accessed
	 */
	static {
		DatasourceProxy.types.put("mysql", MyTownDatasource_mysql.class);
		DatasourceProxy.types.put("sqlite", MyTownDatasource_sqlite.class);
	}

	/**
	 * Starts the datasource
	 * 
	 * @param config
	 * @return
	 * @throws Exception
	 */
	public static boolean start(Configuration config) {
		if (!DatasourceProxy.types.containsKey(Config.dbType.toLowerCase())) {
			DatasourceProxy.log.severe("Failed to find datasource type: %s", Config.dbType.toLowerCase());
			return false;
		}
{'fraction_non_alphanumeric': 0.11476028690071725, 'fraction_numerical': 0.0, 'mean_word_length': 5.105990783410138, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5709519', 'n_tokens_mistral': 914, 'n_tokens_neox': 846, 'n_words': 186}