<commit_before>// Copyright 2014, <NAME> <<EMAIL>>

package com.faveset.khttpserver;

import java.io.IOException;
import com.faveset.log.OutputStreamLog;

public class HttpServer {
    public static void main(String[] args) throws IOException {
        if (args.length < 1) {
            System.out.println("<port>");
            return;
        }

        int port = new Integer(args[0]);

        OutputStreamLog log = new OutputStreamLog(System.out);

        com.faveset.khttp.HttpServer server = new com.faveset.khttp.HttpServer();
        server.setLog(log);

        server.listenAndServe("127.0.0.1", port);

        log.close();
    }
}<commit_msg>Test server maps to all interfaces. Add signal handler for cleaning up on SIGINT.<commit_after>// Copyright 2014, <NAME> <<EMAIL>>

package com.faveset.khttpserver;

import java.io.IOException;
import sun.misc.Signal;
import sun.misc.SignalHandler;

import com.faveset.log.OutputStreamLog;

public class HttpServer {
    public static void main(String[] args) throws IOException {
        if (args.length < 1) {
            System.out.println("<port>");
            return;
        }

        int port = new Integer(args[0]);

        OutputStreamLog log = new OutputStreamLog(System.out);

        final com.faveset.khttp.HttpServer server = new com.faveset.khttp.HttpServer();
        server.setLog(log);

        // Set up the signal handler.
        Signal.handle(new Signal("INT"), new SignalHandler() {
            @Override
            public void handle(Signal sig) {
                server.stop();
            }
        });
        server.listenAndServe("::", port);

        log.close();
    }
}
{'fraction_non_alphanumeric': 0.12154031287605295, 'fraction_numerical': 0.010830324909747292, 'mean_word_length': 2.4359504132231407, 'pattern_counts': {'":': 1, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '3427460', 'n_tokens_mistral': 507, 'n_tokens_neox': 474, 'n_words': 117}