<commit_before><?php

/**
 * This file is part of Gush package.
 *
 * (c) 2013-2014 <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Gush;

use Gush\Adapter\Adapter;
use Gush\Adapter\IssueTracker;
use Gush\Command as Cmd;
use Gush\Event\CommandEvent;
use Gush\Event\GushEvents;
use Gush\Exception\FileNotFoundException;
use Gush\Factory\AdapterFactory;
use Gush\Helper as Helpers;
use Gush\Helper\OutputAwareInterface;
use Gush\Meta as Meta;
use Gush\Subscriber\GitRepoSubscriber;
use Gush\Subscriber\TableSubscriber;
use Gush\Subscriber\TemplateSubscriber;
use Guzzle\Http\Client as GuzzleClient;
use KevinGH\Amend\Command as UpdateCommand;
use KevinGH\Amend\Helper as UpdateHelper;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Process\ProcessBuilder;

class Application extends BaseApplication
{
    const MANIFESTO_FILE_URL = 'http://gushphp.org/manifest.json';

    const GUSH_LOGO = <<<LOGO
   _____ _    _  _____ _    _
  / ____| |  | |/ ____| |  | |
 | |  __| |  | | (___ | |__| |
 | | |_ | |  | |\___ \|  __  |
 | |__| | |__| |____) | |  | |
  \_____|\____/|_____/|_|  |_|

LOGO;

    /**
     * @var Config $config The configuration file
     */
    protected $config;

    /**
     * @var null|Adapter $adapter The Hub Adapter
     */
    protected $adapter;

    /**
     * @var null|IssueTracker IssueTracker
     */
    protected $issueTracker;

    /**
     * @var \Guzzle\Http\Client $versionEyeClient The VersionEye Client
     */
    protected $versionEyeClient = null;

    /**
     * @var \Symfony\Component\EventDispatcher\EventDispatcher
     */
    protected $dispatcher;

    /**
     * @var AdapterFactory
     */
    protected $adapterFactory;

    public function __construct(AdapterFactory $adapterFactory, $name = 'Gush', $version = '@package_version@')
    {
        if ('@'.'package_version@' !== $version) {
            $version = ltrim($version, 'v');
        }

        // try setting the config as early as possible, so all the subscribers and helpers can use it
        // If Gush is not yet configured, then just catch the exception and move along
        try {
            $this->config = Factory::createConfig();
        } catch (FileNotFoundException $exception) {<commit_msg>a file not found exception is not catched but a runtime exception<commit_after><?php

/**
 * This file is part of Gush package.
 *
 * (c) 2013-2014 <NAME> <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace Gush;

use Gush\Adapter\Adapter;
use Gush\Adapter\IssueTracker;
use Gush\Command as Cmd;
use Gush\Event\CommandEvent;
use Gush\Event\GushEvents;
use Gush\Exception\FileNotFoundException;
use Gush\Factory\AdapterFactory;
use Gush\Helper as Helpers;
use Gush\Helper\OutputAwareInterface;
use Gush\Meta as Meta;
use Gush\Subscriber\GitRepoSubscriber;
use Gush\Subscriber\TableSubscriber;
use Gush\Subscriber\TemplateSubscriber;
use Guzzle\Http\Client as GuzzleClient;
use KevinGH\Amend\Command as UpdateCommand;
use KevinGH\Amend\Helper as UpdateHelper;
use Symfony\Component\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\Process\ProcessBuilder;

class Application extends BaseApplication
{
    const MANIFESTO_FILE_URL = 'http://gushphp.org/manifest.json';

    const GUSH_LOGO = <<<LOGO
   _____ _    _  _____ _    _
  / ____| |  | |/ ____| |  | |
 | |  __| |  | | (___ | |__| |
 | | |_ | |  | |\___ \|  __  |
 | |__| | |__| |____) | |  | |
  \_____|\____/|_____/|_|  |_|

LOGO;

    /**
     * @var Config $config The configuration file
     */
    protected $config;

    /**
     * @var null|Adapter $adapter The Hub Adapter
     */
    protected $adapter;

    /**
     * @var null|IssueTracker IssueTracker
     */
    protected $issueTracker;

    /**
     * @var \Guzzle\Http\Client $versionEyeClient The VersionEye Client
     */
    protected $versionEyeClient = null;

    /**
     * @var \Symfony\Component\EventDispatcher\EventDispatcher
     */
    protected $dispatcher;

    /**
     * @var AdapterFactory
     */
    protected $adapterFactory;

    public function __construct(AdapterFactory $adapterFactory, $name = 'Gush', $version = '@package_version@')
    {
        if ('@'.'package_version@' !== $version) {
            $version = ltrim($version, 'v');
        }

        // try setting the config as early as possible, so all the subscribers and helpers can use it
        // If Gush is not yet configured, then just catch the exception and move along
        try {
            $this->config = Factory::createConfig();
        } catch (\RuntimeException $exception) {
{'fraction_non_alphanumeric': 0.11551857585139319, 'fraction_numerical': 0.0030959752321981426, 'mean_word_length': 3.1518072289156627, 'pattern_counts': {'":': 0, '<': 17, '<?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': '4077371', 'n_tokens_mistral': 1642, 'n_tokens_neox': 1569, 'n_words': 395}