<commit_before><?php

namespace OC\Console;

use OC_App;
use OC_Defaults;
use OCP\IConfig;
use Symfony\Component\Console\Application as SymfonyApplication;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class Application {
	/**
	 * @var IConfig
	 */
	private $config;

	/**
	 * @param IConfig $config
	 */
	public function __construct(IConfig $config) {
		$defaults = new OC_Defaults;
		$this->config = $config;
		$this->application = new SymfonyApplication($defaults->getName(), \OC_Util::getVersionString());
	}

	/**
	 * @param OutputInterface $output
	 */
	public function loadCommands(OutputInterface $output) {
		// $application is required to be defined in the register_command scripts
		$application = $this->application;
		require_once \OC::$SERVERROOT . '/core/register_command.php';
		if ($this->config->getSystemValue('installed', false)) {
			if (!\OCP\Util::needUpgrade()) {
				OC_App::loadApps();
				foreach (OC_App::getAllApps() as $app) {
					$file = OC_App::getAppPath($app) . '/appinfo/register_command.php';
					if (file_exists($file)) {<commit_msg>Only load commands of enabled apps<commit_after><?php

namespace OC\Console;

use OC_App;
use OC_Defaults;
use OCP\IConfig;
use Symfony\Component\Console\Application as SymfonyApplication;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class Application {
	/**
	 * @var IConfig
	 */
	private $config;

	/**
	 * @param IConfig $config
	 */
	public function __construct(IConfig $config) {
		$defaults = new OC_Defaults;
		$this->config = $config;
		$this->application = new SymfonyApplication($defaults->getName(), \OC_Util::getVersionString());
	}

	/**
	 * @param OutputInterface $output
	 */
	public function loadCommands(OutputInterface $output) {
		// $application is required to be defined in the register_command scripts
		$application = $this->application;
		require_once \OC::$SERVERROOT . '/core/register_command.php';
		if ($this->config->getSystemValue('installed', false)) {
			if (!\OCP\Util::needUpgrade()) {
				OC_App::loadApps();
				foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
					$file = OC_App::getAppPath($app) . '/appinfo/register_command.php';
					if (file_exists($file)) {
{'fraction_non_alphanumeric': 0.14273858921161825, 'fraction_numerical': 0.0, 'mean_word_length': 4.781774580335731, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6701153', 'n_tokens_mistral': 809, 'n_tokens_neox': 741, 'n_words': 161}