<commit_before>﻿using NancyHostLib;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Topshelf;

namespace NancySelfHost
{
    class Program
    {
        public static FlexibleOptions ProgramOptions { get; private set; }

        static bool useTopshelfService = true;
        static string[] commandLineArgs;
        static HashSet<string> topshelfArguments = new HashSet<string> (StringComparer.OrdinalIgnoreCase) { "help", "install", "uninstall", "start", "stop" };

        static void Main (string[] args)
        {
            // set error exit code
            System.Environment.ExitCode = -10;
            try
            {
                commandLineArgs = args;
                useTopshelfService = Console.IsOutputRedirected || args.Any (i => topshelfArguments.Contains (i));

                AppDomain.CurrentDomain.ProcessExit += new EventHandler (CurrentDomain_ProcessExit);

                // system initialization
                DefaultProgramInitialization (args);

                // start execution
                Execute ();
            }
            catch (Exception ex)
            {<commit_msg>Minor review<commit_after>﻿using NancyHostLib;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Topshelf;

namespace NancySelfHost
{
    class Program
    {
        public static FlexibleOptions ProgramOptions { get; private set; }

        static bool useTopshelfService = true;
        static HashSet<string> topshelfArguments = new HashSet<string> (StringComparer.OrdinalIgnoreCase) { "help", "install", "uninstall", "start", "stop" };

        static void Main (string[] args)
        {
            // set error exit code
            System.Environment.ExitCode = -10;
            try
            {
                AppDomain.CurrentDomain.ProcessExit += new EventHandler (CurrentDomain_ProcessExit);

                useTopshelfService = Console.IsOutputRedirected || args.Any (i => topshelfArguments.Contains (i));

                // system initialization
                DefaultProgramInitialization (args);

                // start execution
                Execute ();
            }
            catch (Exception ex)
            {
{'fraction_non_alphanumeric': 0.08626609442060086, 'fraction_numerical': 0.0017167381974248926, 'mean_word_length': 2.1931506849315068, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '6852815', 'n_tokens_mistral': 599, 'n_tokens_neox': 563, 'n_words': 154}