<commit_before>#include <cucumber-cpp/internal/CukeEngineImpl.hpp>
#include <cucumber-cpp/internal/connectors/wire/WireServer.hpp>
#include <cucumber-cpp/internal/connectors/wire/WireProtocol.hpp>
#include <iostream>

namespace {

void acceptWireProtocol(int port) {
    using namespace ::cucumber::internal;
    CukeEngineImpl cukeEngine;
    JsonSpiritWireMessageCodec wireCodec;
    WireProtocolHandler protocolHandler(&wireCodec, &cukeEngine);
    SocketServer server(&protocolHandler);
    server.listen(port);
    server.acceptOnce();
}

}

int main(int argc, char **argv) {
    try {
        int port = 3902;
        if (argc > 1) {
            std::string firstArg(argv[1]);
            port = ::cucumber::internal::fromString<int>(firstArg);
        }
        acceptWireProtocol(port);
    } catch (std::exception &e) {
        std::cerr << e.what() << std::endl;
        exit(1);
    }
    return 0;
}<commit_msg>add option parser for wireserver<commit_after>#include <cucumber-cpp/internal/CukeEngineImpl.hpp>
#include <cucumber-cpp/internal/connectors/wire/WireServer.hpp>
#include <cucumber-cpp/internal/connectors/wire/WireProtocol.hpp>
#include <iostream>
#include <boost/program_options.hpp>
using boost::program_options::value;

namespace {

void acceptWireProtocol(int port) {
    using namespace ::cucumber::internal;
    CukeEngineImpl cukeEngine;
    JsonSpiritWireMessageCodec wireCodec;
    WireProtocolHandler protocolHandler(&wireCodec, &cukeEngine);
    SocketServer server(&protocolHandler);
    server.listen(port);
    server.acceptOnce();
}

}

int main(int argc, char **argv) {
    
    boost::program_options::options_description optionDescription("Allowed options");
    optionDescription.add_options()
        ("help", "this help message")
        ("port", value<int>(), "listening port of wireserver")
        ;
    boost::program_options::variables_map optionVariableMap;
    boost::program_options::store( boost::program_options::parse_command_line(argc, argv, optionDescription), optionVariableMap);
    boost::program_options::notify(optionVariableMap); 

    if (optionVariableMap.count("help")) {
        std::cout << optionDescription << std::endl;
    }

    int port = 3902;
    if (optionVariableMap.count("port")) {
       port = optionVariableMap["port"].as<int>();
    }

    try {
        if (argc > 1) {
            std::string firstArg(argv[1]);
            port = ::cucumber::internal::fromString<int>(firstArg);
        }
        acceptWireProtocol(port);
    } catch (std::exception &e) {
        std::cerr << e.what() << std::endl;
        exit(1);
    }
    return 0;
}
{'fraction_non_alphanumeric': 0.13485714285714287, 'fraction_numerical': 0.006095238095238095, 'mean_word_length': 3.791970802919708, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 18, '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': '3162431', 'n_tokens_mistral': 818, 'n_tokens_neox': 794, 'n_words': 143}