<commit_before>package org.littlewings.embedded.container.tomcat;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;

import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class EmbeddedTomcatServerTest {
    @Test
    public void test() throws URISyntaxException, IOException {
        String projectDir =
                new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI())
                        .toPath()
                        .resolve("../../../../..")
                        .normalize()
                        .toString();

        String currentDir =
                new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI())
                        .toPath()
                        .resolve("../..")
                        .normalize()
                        .toString();

        EmbeddedTomcatServer tomcat =
                EmbeddedTomcatServerBuilder
                        .create()
                        .startPort(8080)
                        .temporaryBaseDir(Paths.get(projectDir, "target/tomcat85"))
                        .contextPath("/")
                        .docBase(Paths.get(projectDir, "src/test/webapp"))
                        .build();


        tomcat.start();
<commit_msg>remove, unused directory variable<commit_after>package org.littlewings.embedded.container.tomcat;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;

import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class EmbeddedTomcatServerTest {
    @Test
    public void test() throws URISyntaxException, IOException {
        String projectDir =
                new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI())
                        .toPath()
                        .resolve("../../../../..")
                        .normalize()
                        .toString();

        EmbeddedTomcatServer tomcat =
                EmbeddedTomcatServerBuilder
                        .create()
                        .startPort(8080)
                        .temporaryBaseDir(Paths.get(projectDir, "target/tomcat85"))
                        .contextPath("/")
                        .docBase(Paths.get(projectDir, "src/test/webapp"))
                        .build();


        tomcat.start();

{'fraction_non_alphanumeric': 0.11355815554026152, 'fraction_numerical': 0.0041293874741913286, 'mean_word_length': 1.808695652173913, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2022307', 'n_tokens_mistral': 780, 'n_tokens_neox': 726, 'n_words': 129}