<commit_before>package battlecode.server.controller;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;

import battlecode.server.Config;
import battlecode.server.proxy.Proxy;
import battlecode.server.proxy.XStreamProxy;

/**
 * Produces controller instances from different control data sources.
 */
public class ControllerFactory {
	
	/**
	 * Creates a controller that operates over a socket.
	 *
	 * @return
	 *     a Controller instance for handling data from the socket source
	 */
	public static Controller createTCPController(InputStream input, Config options) throws IOException {
		if(Boolean.parseBoolean(options.get("bc.server.output-xml")))
			return new TCPController(XStreamProxy.getXStream().createObjectInputStream(input));
		else
			return new TCPController(new ObjectInputStream(input));
	}

	/**
	 * Creates a controller that feeds match parameters from a configuration
	 * file or the command line.
	 *
	 * @param options
	 *     command-line/configuration file options
	 * @return
	 *     a Controller instance for handling data from a config file
	 */
	public static Controller createHeadlessController(Config options) {
		return new HeadlessController(options);
	}

	public static Controller createLocalController(Config options, Proxy proxy) {
		return new LocalController(options, proxy);
	}
}
<commit_msg>updated so that it returns a SQLController<commit_after>package battlecode.server.controller;

import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;

import battlecode.server.Config;
import battlecode.server.proxy.Proxy;
import battlecode.server.proxy.XStreamProxy;
import battlecode.util.SQLQueue;

/**
 * Produces controller instances from different control data sources.
 */
public class ControllerFactory {
	
	/**
	 * Creates a controller that operates over a socket.
	 *
	 * @return
	 *     a Controller instance for handling data from the socket source
	 */
	public static Controller createTCPController(InputStream input, Config options) throws IOException {
		if(Boolean.parseBoolean(options.get("bc.server.output-xml")))
			return new TCPController(XStreamProxy.getXStream().createObjectInputStream(input));
		else
			return new TCPController(new ObjectInputStream(input));
	}

	/**
	 * Creates a controller that feeds match parameters from a configuration
	 * file or the command line.
	 *
	 * @param options
	 *     command-line/configuration file options
	 * @return
	 *     a Controller instance for handling data from a config file
	 */
	public static Controller createHeadlessController(Config options) {
		return new HeadlessController(options);
	}

	public static Controller createLocalController(Config options, Proxy proxy) {
		return new LocalController(options, proxy);
	}

	public static Controller createSQLController(SQLQueue queue) {
		return new SQLController(queue);
	}

}

{'fraction_non_alphanumeric': 0.07983482450103235, 'fraction_numerical': 0.0, 'mean_word_length': 4.711198428290766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3954306', 'n_tokens_mistral': 767, 'n_tokens_neox': 712, 'n_words': 240}