<commit_before>package org.slieb.kute.service;


import com.google.common.collect.ImmutableList;
import org.slieb.kute.service.providers.IndexProvider;
import slieb.kute.Kute;
import slieb.kute.api.Resource;
import slieb.kute.api.ResourceProvider;
import slieb.kute.resources.providers.GroupResourceProvider;
import spark.Spark;

public class Service {

    private final ResourceProvider<? extends Resource.Readable> provider;

    private final Integer port;

    public Service(ResourceProvider<? extends Resource.Readable> provider, Integer port) {
        this.provider = provider;
        this.port = port;
    }

    public void start() throws InterruptedException {
        Spark.port(port);
        Spark.get("/*", new ServiceRoute(provider));
        Spark.exception(RuntimeException.class, new ServiceExceptionHandler());
        Thread.sleep(1000);
    }

    public void stop() {
        Spark.stop();
    }

    public static void main(String[] args) throws InterruptedException {
        ResourceProvider<? extends Resource.Readable> sources = Kute.getDefaultProvider();
        ResourceProvider<? extends Resource.Readable> index = new IndexProvider(sources);
        ResourceProvider<? extends Resource.Readable> provider = new GroupResourceProvider<>(ImmutableList.of(sources, index));
        Service service = new Service(provider, 5000);
        service.start();
    }

}<commit_msg>remving main from service<commit_after>package org.slieb.kute.service;


import com.google.common.collect.ImmutableList;
import org.slieb.kute.service.providers.IndexProvider;
import slieb.kute.Kute;
import slieb.kute.api.Resource;
import slieb.kute.api.ResourceProvider;
import slieb.kute.resources.providers.GroupResourceProvider;
import spark.Spark;

import java.util.stream.Stream;

public class Service {

    private final ResourceProvider<? extends Resource.Readable> provider;

    private final Integer port;

    public Service(ResourceProvider<? extends Resource.Readable> provider, Integer port) {
        this.provider = provider;
        this.port = port;
    }

    public void start() throws InterruptedException {
        Spark.port(port);
        Spark.get("/*", new ServiceRoute(provider));
        Spark.exception(RuntimeException.class, new ServiceExceptionHandler());
        Thread.sleep(1000);
    }

    public void stop() {
        Spark.stop();
    }


}
{'fraction_non_alphanumeric': 0.10314465408805032, 'fraction_numerical': 0.005031446540880503, 'mean_word_length': 3.7624750499001998, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6031242', 'n_tokens_mistral': 667, 'n_tokens_neox': 655, 'n_words': 150}