<commit_before>using System.Diagnostics;
using NUnit.Framework;

namespace DeleteStuff.IntegrationTests.Infrastructure {
  public class ProcessExecutor {
    public ProcessExecutor(PathInfo pathInfo) {
      mPathInfo = pathInfo;
    }

    public ExecutionResult Start(params string[] args) {
      using (var process = Process.Start(new ProcessStartInfo {
                                                                WorkingDirectory = mPathInfo.TestWorkingDir,
                                                                FileName = mPathInfo.ExePath,
                                                                UseShellExecute = false,
                                                                RedirectStandardError = true,
                                                                RedirectStandardOutput = true,
                                                                WindowStyle = ProcessWindowStyle.Hidden,
                                                                CreateNoWindow = true,
                                                                Arguments = CombineArgs(args)
                                                              })) {
        var standardError = process.StandardError.ReadToEnd();
        var standardOutput = process.StandardOutput.ReadToEnd();
        Assert.That(process.WaitForExit(60000 * 5), Is.True);<commit_msg>added validation to ensure that the process being started wasn't null<commit_after>using System;
using System.Diagnostics;
using NUnit.Framework;

namespace DeleteStuff.IntegrationTests.Infrastructure {
  public class ProcessExecutor {
    public ProcessExecutor(PathInfo pathInfo) {
      mPathInfo = pathInfo;
    }

    public ExecutionResult Start(params string[] args) {
      using (var process = Process.Start(new ProcessStartInfo {
                                                                WorkingDirectory = mPathInfo.TestWorkingDir,
                                                                FileName = mPathInfo.ExePath,
                                                                UseShellExecute = false,
                                                                RedirectStandardError = true,
                                                                RedirectStandardOutput = true,
                                                                WindowStyle = ProcessWindowStyle.Hidden,
                                                                CreateNoWindow = true,
                                                                Arguments = CombineArgs(args)
                                                              })) {
        if (process == null)
          throw new Exception("Unable to start process");

        var standardError = process.StandardError.ReadToEnd();
        var standardOutput = process.StandardOutput.ReadToEnd();
        Assert.That(process.WaitForExit(60000 * 5), Is.True);
{'fraction_non_alphanumeric': 0.05329260013577732, 'fraction_numerical': 0.004073319755600814, 'mean_word_length': 1.0157318741450068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7059672', 'n_tokens_mistral': 497, 'n_tokens_neox': 482, 'n_words': 118}