<commit_before>package oidc_rp;

import static spark.Spark.exception;
import static spark.Spark.get;
import static spark.Spark.post;
import static spark.SparkBase.port;

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Map;

import org.apache.commons.io.Charsets;

import com.google.common.collect.Maps;
import com.google.common.io.Resources;
import com.hubspot.jinjava.Jinjava;
import com.nimbusds.jwt.ReadOnlyJWTClaimsSet;
import com.nimbusds.oauth2.sdk.AuthorizationCode;
import com.nimbusds.oauth2.sdk.ParseException;
import com.nimbusds.oauth2.sdk.SerializeException;
import com.nimbusds.oauth2.sdk.http.CommonContentTypes;
import com.nimbusds.oauth2.sdk.token.AccessToken;
import com.nimbusds.openid.connect.sdk.UserInfoSuccessResponse;

/**
 * Skeleton code for building an OpenID Connect Public Client.
 *
 * Using the Spark (http://sparkjava.com/) as the webserver, and Nimbus OAauth
 * (http://connect2id.com/products/nimbus-oauth-openid-connect-sdk) for OpenID
 * Connect support.
 *
 * @author <NAME>, <EMAIL>
 *
 */
public class WebServer {
	/**
	 * Which port (on localhost) the RP listens to for the redirect URI.
	 */
	public static int SERVER_PORT = 8090;

	public static void main(String[] args) throws ParseException, IOException,
			URISyntaxException, SerializeException {
		
		String jsonMetadata = new String(Files.readAllBytes(Paths.get("/home/davide/dev/oidcprimer/client.json")), Charsets.US_ASCII);
		Client client = new Client(jsonMetadata);

		/*** Spark webserver setup ***/
		port(SERVER_PORT);<commit_msg>Refactored<commit_after>package oidc_rp;

import static spark.Spark.exception;
import static spark.Spark.get;
import static spark.Spark.post;
import static spark.SparkBase.port;

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Map;

import org.apache.commons.io.Charsets;

import com.google.common.collect.Maps;
import com.google.common.io.Resources;
import com.hubspot.jinjava.Jinjava;
import com.nimbusds.jwt.ReadOnlyJWTClaimsSet;
import com.nimbusds.oauth2.sdk.AuthorizationCode;
import com.nimbusds.oauth2.sdk.ParseException;
import com.nimbusds.oauth2.sdk.SerializeException;
import com.nimbusds.oauth2.sdk.http.CommonContentTypes;
import com.nimbusds.oauth2.sdk.token.AccessToken;
import com.nimbusds.openid.connect.sdk.UserInfoSuccessResponse;

/**
 * Skeleton code for building an OpenID Connect Public Client.
 *
 * Using the Spark (http://sparkjava.com/) as the webserver, and Nimbus OAauth
 * (http://connect2id.com/products/nimbus-oauth-openid-connect-sdk) for OpenID
 * Connect support.
 *
 */
public class WebServer {
	/**
	 * Which port (on localhost) the RP listens to for the redirect URI.
	 */
	public static int SERVER_PORT = 8090;

	public static void main(String[] args) throws ParseException, IOException,
			URISyntaxException, SerializeException {
		
		String jsonMetadata = new String(Files.readAllBytes(Paths.get("/home/davide/dev/oidcprimer/client.json")), Charsets.US_ASCII);
		Client client = new Client(jsonMetadata);

		/*** Spark webserver setup ***/
		port(SERVER_PORT);
{'fraction_non_alphanumeric': 0.11252719925396332, 'fraction_numerical': 0.006216972334473112, 'mean_word_length': 5.071698113207547, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4655310', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1065, 'n_words': 228}