<commit_before>package nuclibook.routes;

import nuclibook.server.SqlServerConnection;
import spark.Request;
import spark.Response;
import spark.Route;

import java.sql.Connection;

public class BlankRoute implements Route {

	/**
	 * This route provides a simple "debugging" page for development use.
	 * It will display whatever message is passed in the constructor, and
	 * some diagnostic information.
	 */

	private String label = null;

	public BlankRoute() {
	}

	public BlankRoute(String label) {
		this.label = label;
	}

	@Override
	public Object handle(Request request, Response response) throws Exception {
		// carry out connection test
		Connection connection = SqlServerConnection.acquireConnection();

		// return HTML
		return "<html>" +
				"<head>" +
				"<link type=\"text/css\" href=\"/css/blank-route-style.css\" rel=\"stylesheet\" />" +
				"</head>" +
				"<body>" +
				"<h1>Blank route" + (label == null ? "" : ": " + label) + "</h1>" +
				"<p>Connection test: " + (connection == null ? "nope =/" : "awesome! :D") + "</p>" +
				"</body>" +
				"</html>";
	}
}
<commit_msg>Fix SQL connection in blank route<commit_after>package nuclibook.routes;

import com.j256.ormlite.support.ConnectionSource;
import nuclibook.server.SqlServerConnection;
import spark.Request;
import spark.Response;
import spark.Route;

import java.sql.Connection;

public class BlankRoute implements Route {

	/**
	 * This route provides a simple "debugging" page for development use.
	 * It will display whatever message is passed in the constructor, and
	 * some diagnostic information.
	 */

	private String label = null;

	public BlankRoute() {
	}

	public BlankRoute(String label) {
		this.label = label;
	}

	@Override
	public Object handle(Request request, Response response) throws Exception {
		// carry out connection test
		ConnectionSource connection = SqlServerConnection.acquireConnection();

		// return HTML
		return "<html>" +
				"<head>" +
				"<link type=\"text/css\" href=\"/css/blank-route-style.css\" rel=\"stylesheet\" />" +
				"</head>" +
				"<body>" +
				"<h1>Blank route" + (label == null ? "" : ": " + label) + "</h1>" +
				"<p>Connection test: " + (connection == null ? "nope =/" : "awesome! :D") + "</p>" +
				"</body>" +
				"</html>";
	}
}

{'fraction_non_alphanumeric': 0.15246045694200352, 'fraction_numerical': 0.0030755711775043936, 'mean_word_length': 3.572289156626506, 'pattern_counts': {'":': 2, '<': 25, '<?xml version=': 0, '>': 25, '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': '4661317', 'n_tokens_mistral': 773, 'n_tokens_neox': 681, 'n_words': 197}