Reinstalls fixes that need to be applied again if any exist

@throws ReapplyFixException
776008
public void reapplyFixIfNeeded() throws ReapplyFixException {
        BundleRepositoryRegistry.initializeDefaults(null, false);
        Set<String> fixesToReapply = ValidateCommandTask.getFixesToReapply(product.getManifestFileProcessor(), new InstallUtils.InstallCommandConsole());
        try {
            fireProgressEvent(InstallProgressEvent.CHECK, 90, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_VALIDATING_FIXES", fixesToReapply.toString()));
            this.enableEvent = false;
            if (fixesToReapply.isEmpty()) {
                log(Level.FINEST, "No fix is required to be reapplied.");
            } else {
                installFixes(fixesToReapply, null, null);
                install(ExistsAction.replace, false, false);
                log(Level.FINEST, "Successfully reapplied the following fixes: " + fixesToReapply.toString());
            }
        } catch (InstallException e) {
            log(Level.FINEST, "Failed to reapply the following fixes: " + fixesToReapply.toString());
            throw new ReapplyFixException(Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("LOG_REINSTALL_FIXES_WARNING",
                                                                                         fixesToReapply.toString()).trim(), e, InstallException.RUNTIME_EXCEPTION);
        } finally {
            this.enableEvent = true;
        }
    }
257150
public function reindex()
    {
        if ($this->index_field !== null) {
            $this->objects_by_index = array();
            $index_field = $this->index_field;
            foreach ($this->objects as $object) {
                if (isset($object->$index_field)) {
                    $this->objects_by_index[$object->$index_field] = $object;
                }
            }
        }
    }
1227352
protected function cleanUp()
    {
        $this->fs->remove(dirname($this->downloadedFilePath));

        try {
            $licenseFile = array($this->projectDir.'/LICENSE');
            $upgradeFiles = glob($this->projectDir.'/UPGRADE*.md');
            $changelogFiles = glob($this->projectDir.'/CHANGELOG*.md');

            $filesToRemove = array_merge($licenseFile, $upgradeFiles, $changelogFiles);
            $this->fs->remove($filesToRemove);
        } catch (\Exception $e) {
            // don't throw an exception in case any of the Symfony-related files cannot
            // be removed, because this is just an enhancement, not something mandatory
            // for the project
        }

        return $this;
    }
579207
private void fix() {
        Set<String> nodeGroups = appContext.getTaskTrackerManager().getNodeGroups();
        if (CollectionUtils.isEmpty(nodeGroups)) {
            return;
        }
        for (String nodeGroup : nodeGroups) {
            List<JobPo> deadJobPo = appContext.getExecutableJobQueue().getDeadJob(nodeGroup, SystemClock.now() - MAX_TIME_OUT);
            if (CollectionUtils.isNotEmpty(deadJobPo)) {
                for (JobPo jobPo : deadJobPo) {
                    appContext.getExecutableJobQueue().resume(jobPo);
                    LOGGER.info("Fix executable job : {} ", JSON.toJSONString(jobPo));
                }
            }
        }
    }
483116
public function reload()
    {
        $this->configuration = null;

        $this->load($this->domDocument, $this->cachePath, $this->xmlSchemaFile);
    }
973770
public static function resetApp()
    {
        // Set install mode.
        SystemUtil::enableInstallMode();

        $currentDir = getcwd();
        chdir(self::getRootDir());
        ob_start();
        // Drop all tables
        $command = 'php bin/console doctrine:schema:drop --force --full-database';
        system($command, $output);
        // Run composer post install command.
        $command = 'composer run-script post-install-cmd';
        system($command, $output);
        ob_get_clean();
        chdir($currentDir);
    }
126443
@Override
	public void rebuildDirtyBundles() {
		if (jsMBean != null) {
			jsMBean.rebuildDirtyBundles();
		}
		if (cssMBean != null) {
			cssMBean.rebuildDirtyBundles();
		}
		if (binaryMBean != null) {
			binaryMBean.rebuildDirtyBundles();
		}
	}
969412
def reload
      # Make sure we have a fresh cache after we reload
      config.cache.clear if config.cache.respond_to?(:clear)

      # Reload dependencies as well, if necessary
      ActiveSupport::Dependencies.clear if defined?(ActiveSupport::Dependencies)

      # Use current configuration, but skip bundle and autoloading initializers
      current_config = config.marshal_dump.dup
      current_config.merge! :skip_bundle => true#, :skip_autoloading => true)

      initialize current_config
    end
138742
protected function reindex(array $events, int &$reindexed, SymfonyStyle $io, array $context, int $batch, bool $dryRun = false, bool $skipErrors = false): void
    {
        if ($dryRun) {
            $io->note(sprintf('DRY RUN - Would reindex event batch %d here.', $batch));
        } else {
            try {
                $this->getPbjx()->getEventSearch()->indexEvents($events, $context);
            } catch (\Throwable $e) {
                $io->error($e->getMessage());
                $io->note(sprintf('Failed to index batch %d.', $batch));
                $io->newLine(2);

                if (!$skipErrors) {
                    throw $e;
                }
            }
        }

        $reindexed += count($events);
    }
239374
private PatchingResult applyPatch(final String patchId, final Patch patch, final IdentityPatchContext context) throws PatchingException, IOException, XMLStreamException {

        final Identity identity = patch.getIdentity();
        final Patch.PatchType patchType = identity.getPatchType();
        final InstallationManager.InstallationModification modification = context.getModification();
        if (patchType == Patch.PatchType.CUMULATIVE) {
            // Invalidate all installed patches (one-off, cumulative) - we never need to invalidate the release base
            final List<String> invalidation = new ArrayList<String>(modification.getPatchIDs());
            if (!invalidation.isEmpty()) {
                try {
                    // Before rolling back the one-off patches, validate that the state until that point is consistent
                    validateRollbackState(invalidation.get(invalidation.size() - 1),
                            modification.getUnmodifiedInstallationState());
                } catch (PatchingException e) {
                    throw e;
                } catch (Exception e) {
                    throw new PatchingException(e);
                }
                // Invalidate the installed patches first
                for (final String rollback : invalidation) {
                    rollback(rollback, context);
                }
            }
        }

        // Add to installed patches list
        modification.addInstalledPatch(patchId);

        // Then apply the current patch
        for (final PatchElement element : patch.getElements()) {
            // Apply the content modifications
            final IdentityPatchContext.PatchEntry target = context.resolveForElement(element);
            final PatchElementProvider provider = element.getProvider();
            final Patch.PatchType elementPatchType = provider.getPatchType();
            final String elementPatchId = element.getId();
            // See if we can skip this element
            if (target.isApplied(elementPatchId)) {
                // TODO if it is already applied, we can just skip the entry (maybe based ont the type of the patch)
                // This needs some further testing, maybe we need to compare our history with the patch if they are consistent
                throw PatchLogger.ROOT_LOGGER.alreadyApplied(elementPatchId);
            }
            // Check upgrade conditions
            checkUpgradeConditions(provider, target);
            apply(elementPatchId, element.getModifications(), target);
            target.apply(elementPatchId, elementPatchType);
        }
        // Apply the patch to the identity
        final IdentityPatchContext.PatchEntry identityEntry = context.getIdentityEntry();
        apply(patchId, patch.getModifications(), identityEntry);
        identityEntry.apply(patchId, patchType);

        // Port forward missing module changes
        if (patchType == Patch.PatchType.CUMULATIVE) {
            portForward(patch, context);
        }

        // We need the resulting version for rollback
        if (patchType == Patch.PatchType.CUMULATIVE) {
            final Identity.IdentityUpgrade upgrade = identity.forType(Patch.PatchType.CUMULATIVE, Identity.IdentityUpgrade.class);
            identityEntry.setResultingVersion(upgrade.getResultingVersion());
        }

        // Execute the tasks
        final IdentityApplyCallback callback = new IdentityApplyCallback(patch, identityEntry.getDirectoryStructure());
        try {
            return executeTasks(context, callback);
        } catch (Exception e) {
            context.cancel(callback);
            throw rethrowException(e);
        }
    }
520615
protected static function reinstallSignal()
    {
        // reinstall stop signal handler
        swoole_process::signal(SIGINT, array('\Workerman\Worker', 'signalHandler'));
        // reinstall reload signal handler
        swoole_process::signal(SIGUSR1, array('\Workerman\Worker', 'signalHandler'));
        // reinstall  status signal handler
        swoole_process::signal(SIGUSR2, array('\Workerman\Worker', 'signalHandler'));
    }
1218811
public static void reloadApplications(LibertyServer server, final Set<String> appIdsToReload) throws Exception {
        ServerConfiguration config = server.getServerConfiguration().clone();

        /*
         * Get the apps to remove.
         */
        ConfigElementList<Application> toRemove = new ConfigElementList<Application>(config.getApplications().stream().filter(app -> appIdsToReload.contains(app.getId())).collect(Collectors.toList()));

        /*
         * Remove the applications.
         */
        config.getApplications().removeAll(toRemove);
        updateConfigDynamically(server, config, true);

        /*
         * Reload applications.
         */
        config.getApplications().addAll(toRemove);
        updateConfigDynamically(server, config, true);
    }
159132
public void fixate() {
		ransac = FactoryMultiViewRobust.trifocalRansac(configTriRansac,configError,configRansac);
		sba = FactoryMultiView.bundleSparseProjective(configSBA);
	}
297180
protected function restorePreviousLockFile()
    {
        $config = $this->composer->getConfig();
        list($preferSource, $preferDist) = ConsoleUtil::getPreferredInstallOptions($config, $this->input);
        $optimize = $this->input->getOption('optimize-autoloader') || $config->get('optimize-autoloader');
        $authoritative = $this->input->getOption('classmap-authoritative') || $config->get('classmap-authoritative');
        $apcu = $this->input->getOption('apcu-autoloader') || $config->get('apcu-autoloader');

        $this->getInstaller()
            ->setVerbose($this->input->getOption('verbose'))
            ->setPreferSource($preferSource)
            ->setPreferDist($preferDist)
            ->setDevMode(!$this->input->getOption('no-dev'))
            ->setDumpAutoloader(!$this->input->getOption('no-autoloader'))
            ->setRunScripts(false)
            ->setSkipSuggest(true)
            ->setOptimizeAutoloader($optimize)
            ->setClassMapAuthoritative($authoritative)
            ->setApcuAutoloader($apcu)
            ->setIgnorePlatformRequirements($this->input->getOption('ignore-platform-reqs'))
            ->run()
        ;
    }
1004662
function install()
    {
        if ($this->error_handler) {
            throw new Exception(sprintf('%s->install() must only be called once', get_class($this)));
        }
        $this->error_handler = new ErrorHandler($this, false, $this->error_types);
        $this->error_handler->registerExceptionHandler();
        $this->error_handler->registerErrorHandler();
        $this->error_handler->registerShutdownFunction();
        return $this;
    }
1256454
@SuppressWarnings("checkstyle:variabledeclarationusagedistance")
	public static void reset() throws CoreException {
		LOCK.lock();
		try {
			// Clear the SRE configuration stored into the preferences.
			clearSREConfiguration();
			// Reset the internal data structures.
			final ISREInstall previous = getDefaultSREInstall();
			final Map<String, ISREInstall> oldSREs = new HashMap<>(ALL_SRE_INSTALLS);
			ALL_SRE_INSTALLS.clear();
			platformSREInstalls = null;
			defaultSREId = null;
			// Notify about the removals
			for (final ISREInstall sre : oldSREs.values()) {
				fireSRERemoved(sre);
			}
			if (previous != null) {
				fireDefaultSREChanged(previous, null);
			}
			// Re-read the data
			initializeSREs();
		} finally {
			LOCK.unlock();
		}
	}
1179714
public void reinitialize ()
  {
    m_aRWLock.writeLocked ( () -> {
      m_aMimeTypeContents.clear ();
      _registerDefaultMimeTypeContents ();
    });

    if (LOGGER.isDebugEnabled ())
      LOGGER.debug ("Reinitialized " + MimeTypeDeterminator.class.getName ());
  }