<commit_before><?php

namespace App\Command;

use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
use Tienvx\Bundle\MbtBundle\Command\CommandRunner as BaseCommandRunner;

class CommandRunner extends BaseCommandRunner
{
    /**
     * @param array $parameters
     * @throws \Exception
     */
    public function run(array $parameters)
    {
        $application = new Application($this->kernel);
        $application->setAutoExit(false);
        $map = [
            'mbt:bug:capture-screenshots' => ['command', 'bug-id'],
            'mbt:bug:create' => ['command', 'title', 'path', 'length', 'message', 'task-id', 'status'],
            'mbt:task:execute' => ['command', 'task-id'],
            'mbt:bug:reduce' => ['command', 'bug-id'],
            'mbt:path:reduce' => ['command', 'bug-id', 'reducer', 'length', 'from', 'to'],
            'mbt:bug:report' => ['command', 'bug-id'],
            'mbt:task:update-status' => ['command', 'task-id', 'status'],
            'mbt:bug:update-status' => ['command', 'bug-id', 'status'],
            'mbt:bug:remove-screenshots' => ['command', 'bug-id', 'model'],
        ];
        $command = $parameters[0];
        $application->run(new ArrayInput(array_combine($map[$command], $parameters)), new NullOutput());
    }
}<commit_msg>Report error on running command on unit testing<commit_after><?php

namespace App\Command;

use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
use Tienvx\Bundle\MbtBundle\Command\CommandRunner as BaseCommandRunner;

class CommandRunner extends BaseCommandRunner
{
    /**
     * @param array $parameters
     * @throws \Exception
     */
    public function run(array $parameters)
    {
        $application = new Application($this->kernel);
        $application->setAutoExit(false);
        $map = [
            'mbt:bug:capture-screenshots' => ['command', 'bug-id'],
            'mbt:bug:create' => ['command', 'title', 'path', 'length', 'message', 'task-id', 'status'],
            'mbt:task:execute' => ['command', 'task-id'],
            'mbt:bug:reduce' => ['command', 'bug-id'],
            'mbt:path:reduce' => ['command', 'bug-id', 'reducer', 'length', 'from', 'to'],
            'mbt:bug:report' => ['command', 'bug-id'],
            'mbt:task:update-status' => ['command', 'task-id', 'status'],
            'mbt:bug:update-status' => ['command', 'bug-id', 'status'],
            'mbt:bug:remove-screenshots' => ['command', 'bug-id', 'model'],
        ];
        $command = $parameters[0];
        $application->run(new ArrayInput(array_combine($map[$command], $parameters)));
    }
}
{'fraction_non_alphanumeric': 0.1906857352401907, 'fraction_numerical': 0.0007334066740007334, 'mean_word_length': 3.2098765432098766, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '6599773', 'n_tokens_mistral': 834, 'n_tokens_neox': 810, 'n_words': 157}