<commit_before>/**
 * Copyright (c) 2014 <NAME>
 */

import java.net.URL;
import java.security.ProtectionDomain;
 
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.webapp.WebAppContext;
 
/**
 * Embedded Jetty xecutable WAR main entry point.
 * 
 * See http://uguptablog.blogspot.com/2012/09/embedded-jetty-executable-war-with.html
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception
	{
		Server server = new Server();
		
		SelectChannelConnector connector = new SelectChannelConnector();
		connector.setPort(8080);
		server.addConnector(connector);
		
		ProtectionDomain domain = Main.class.getProtectionDomain();
		URL location = domain.getCodeSource().getLocation();
		WebAppContext webapp = new WebAppContext();
		webapp.setContextPath("/");
		webapp.setWar(location.toExternalForm());
		server.setHandler(webapp);
		
		server.start();
		server.join();
	}
}
<commit_msg>added optional commandline parameter for port<commit_after>/**
 * Copyright (c) 2014 <NAME>
 */

import java.net.URL;
import java.security.ProtectionDomain;
 
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.nio.SelectChannelConnector;
import org.eclipse.jetty.webapp.WebAppContext;
 
/**
 * Embedded Jetty xecutable WAR main entry point.
 * 
 * See http://uguptablog.blogspot.com/2012/09/embedded-jetty-executable-war-with.html
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception
	{
		Server server = new Server();
		
		SelectChannelConnector connector = new SelectChannelConnector();
		int port = 8080;
		if (args.length > 0) {
			port = Integer.parseInt(args[0]);
		}
		connector.setPort(port);
		server.addConnector(connector);
		
		ProtectionDomain domain = Main.class.getProtectionDomain();
		URL location = domain.getCodeSource().getLocation();
		WebAppContext webapp = new WebAppContext();
		webapp.setContextPath("/");
		webapp.setWar(location.toExternalForm());
		server.setHandler(webapp);
		
		server.start();
		server.join();
	}
}

{'fraction_non_alphanumeric': 0.13104744011272898, 'fraction_numerical': 0.014091122592766557, 'mean_word_length': 4.378787878787879, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7185828', 'n_tokens_mistral': 737, 'n_tokens_neox': 659, 'n_words': 135}