<commit_before>package hall.caleb.seltzer.core;

import java.io.File;
import java.io.FileNotFoundException;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class SeltzerServer {
	private static Logger logger = LogManager.getLogger(SeltzerServer.class);
	
	private static ServerSocketListener listener;
	private static SessionCleaner cleaner;
	private static Thread listenerThread;
	private static Thread cleanerThread;
	
	public static void main(String[] args) {
		logger.info("Starting Selenium server...");
		
		try {
			configureBase();
		} catch (FileNotFoundException e) {
			logger.fatal(e);
			logger.fatal("Exception occurred during configuration, server exiting!");
			return;
		}
		
		listener = new ServerSocketListener(39948, 1);
		listenerThread = new Thread(listener);
		listenerThread.start();
		logger.info("Connection listener started.");
		
		// Removed pending testing of the cleaning system
		cleaner = new SessionCleaner();
		cleanerThread = new Thread(cleaner);
		cleanerThread.start();
		logger.info("Session cleaner started.");
		
		for (int i = 0; i < 10; i++) { 
			new SeltzerSession();
			try {
				Thread.sleep(i * 500);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
		logger.info("Selenium server startup complete.");
		
		try {
			listenerThread.join();
			cleanerThread.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	
	public static void configureBase() throws FileNotFoundException {
		logger.info("Configuring server..");
		
		logger.debug("Configuring web driver location.");
		
		String repoPath = System.getProperty("repo.path");
		String driverPath;
		if (repoPath == null) {
			logger.warn("repo.path system property not found, assuming relative path");
			driverPath = "web_drivers/chromedriver.exe";
		} else {
			driverPath = repoPath + "/seltzer-parent/web_drivers/chromedriver.exe";
		}
		
		logger.debug("Web driver should exist at \"" + driverPath + "\".");
		
		if (new File(driverPath).exists()) {
			System.setProperty("webdriver.chrome.driver", driverPath);
		} else {<commit_msg>Forgot to remove a little test code, whoops!<commit_after>package hall.caleb.seltzer.core;

import java.io.File;
import java.io.FileNotFoundException;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class SeltzerServer {
	private static Logger logger = LogManager.getLogger(SeltzerServer.class);
	
	private static ServerSocketListener listener;
	private static SessionCleaner cleaner;
	private static Thread listenerThread;
	private static Thread cleanerThread;
	
	public static void main(String[] args) {
		logger.info("Starting Selenium server...");
		
		try {
			configureBase();
		} catch (FileNotFoundException e) {
			logger.fatal(e);
			logger.fatal("Exception occurred during configuration, server exiting!");
			return;
		}
		
		listener = new ServerSocketListener(39948, 1);
		listenerThread = new Thread(listener);
		listenerThread.start();
		logger.info("Connection listener started.");
		
		// Removed pending testing of the cleaning system
		cleaner = new SessionCleaner();
		cleanerThread = new Thread(cleaner);
		cleanerThread.start();
		logger.info("Session cleaner started.");
		
		logger.info("Selenium server startup complete.");
		
		try {
			listenerThread.join();
			cleanerThread.join();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
	
	public static void configureBase() throws FileNotFoundException {
		logger.info("Configuring server..");
		
		logger.debug("Configuring web driver location.");
		
		String repoPath = System.getProperty("repo.path");
		String driverPath;
		if (repoPath == null) {
			logger.warn("repo.path system property not found, assuming relative path");
			driverPath = "web_drivers/chromedriver.exe";
		} else {
			driverPath = repoPath + "/seltzer-parent/web_drivers/chromedriver.exe";
		}
		
		logger.debug("Web driver should exist at \"" + driverPath + "\".");
		
		if (new File(driverPath).exists()) {
			System.setProperty("webdriver.chrome.driver", driverPath);
		} else {
{'fraction_non_alphanumeric': 0.11867280213126664, 'fraction_numerical': 0.005328166626301768, 'mean_word_length': 4.221238938053097, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '263046', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1162, 'n_words': 303}