private boolean applyMatches(Collection<VTMatch> matches, TaskMonitor monitor)
			throws CancelledException {

		// If this value gets set to true then there are some markup errors in the whole set of
		// matches.
		boolean someMatchesHaveMarkupErrors = false;
		// Note: no need to check score/confidence because they are passed into the correlator
		// ahead of time so correlator only returns matches higher than given score/threshold
		for (VTMatch match : matches) {
			monitor.checkCancelled();
			VTAssociation association = match.getAssociation();

			if (!association.getStatus().canApply()) {
				continue;
			}

			if (hasAcceptedRelatedAssociation(association, monitor)) {
				Msg.warn(AutoVersionTrackingTask.class,
					"This association has a related association with an accepted match so cannot " +
						"make this association accepted which would try to block the already accepted " +
						"related association " +
						association);
				continue;
			}

			if (!tryToSetAccepted(association)) {
				continue;
			}

			MatchInfo matchInfo = matchInfoFactory.getMatchInfo(match, addressCorrelator);
			Collection<VTMarkupItem> markupItems = matchInfo.getAppliableMarkupItems(monitor);
			if (markupItems == null || markupItems.size() == 0) {
				continue;
			}

			ApplyMarkupItemTask markupTask =
				new ApplyMarkupItemTask(session, markupItems, toolOptions);

			markupTask.run(monitor);
			boolean currentMatchHasErrors = markupTask.hasErrors();
			if (currentMatchHasErrors) {
				someMatchesHaveMarkupErrors = true;
			}

		}
		return someMatchesHaveMarkupErrors;

	}
Called for all correlators that are run by this command except the duplicate function
instruction match correlator.
@param matches The set of matches to try to accept
@param monitor the task monitor
@return true if some matches have markup errors and false if none have markup errors
@throws CancelledException if cancelled
Ghidra/Features/VersionTracking/src/main/java/ghidra/feature/vt/gui/actions/AutoVersionTrackingTask.java