<commit_before>﻿namespace FunctionalTestUtils
{
    using System;
    using System.IO;
    using Microsoft.ApplicationInsights.Channel;
    using Microsoft.AspNetCore.Hosting;
    using Microsoft.Extensions.DependencyInjection;

    // a variant of aspnet/Hosting/test/Microsoft.AspNetCore.Hosting.Tests/HostingEngineTests.cs
    public class InProcessServer : IDisposable
    {
        private static Random random = new Random();

        public static Func<IWebHostBuilder, IWebHostBuilder> UseApplicationInsights =
            builder => builder.UseApplicationInsights();

        private readonly Func<IWebHostBuilder, IWebHostBuilder> configureHost;
        private IWebHost hostingEngine;
        private string url;

        private readonly BackTelemetryChannel backChannel;

        public BackTelemetryChannel BackChannel
        {
            get
            {
                return this.backChannel;
            }
        }

        public InProcessServer(string assemblyName, Func<IWebHostBuilder, IWebHostBuilder> configureHost = null)
        {
            this.configureHost = configureHost;
            //var machineName = Environment.GetEnvironmentVariable("COMPUTERNAME");
            var machineName = "localhost";
            this.url = "http://" + machineName + ":" + random.Next(5000, 14000).ToString();
            this.backChannel = this.Start(assemblyName);<commit_msg>removed commented line.<commit_after>﻿namespace FunctionalTestUtils
{
    using System;
    using System.IO;
    using Microsoft.ApplicationInsights.Channel;
    using Microsoft.AspNetCore.Hosting;
    using Microsoft.Extensions.DependencyInjection;

    // a variant of aspnet/Hosting/test/Microsoft.AspNetCore.Hosting.Tests/HostingEngineTests.cs
    public class InProcessServer : IDisposable
    {
        private static Random random = new Random();

        public static Func<IWebHostBuilder, IWebHostBuilder> UseApplicationInsights =
            builder => builder.UseApplicationInsights();

        private readonly Func<IWebHostBuilder, IWebHostBuilder> configureHost;
        private IWebHost hostingEngine;
        private string url;

        private readonly BackTelemetryChannel backChannel;

        public BackTelemetryChannel BackChannel
        {
            get
            {
                return this.backChannel;
            }
        }

        public InProcessServer(string assemblyName, Func<IWebHostBuilder, IWebHostBuilder> configureHost = null)
        {
            this.configureHost = configureHost;            
            var machineName = "localhost";
            this.url = "http://" + machineName + ":" + random.Next(5000, 14000).ToString();
            this.backChannel = this.Start(assemblyName);
{'fraction_non_alphanumeric': 0.07540263543191801, 'fraction_numerical': 0.006588579795021962, 'mean_word_length': 2.6391478029294273, 'pattern_counts': {'":': 2, '<': 9, '<?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': '2879619', 'n_tokens_mistral': 686, 'n_tokens_neox': 662, 'n_words': 150}