private void applyResultsForAddress(Address address, List<BSimMatchResult> resultsForAddress,
			TaskMonitor monitor) {

		Function targetFunction = functionManager.getFunctionAt(address);
		if (targetFunction == null) {
			error("Can't find original function", resultsForAddress.get(0));
			markRows(resultsForAddress, BSimResultStatus.ERROR);
			return;
		}

		List<Function> sourceFunctions = getSourceFunctions(resultsForAddress);
		if (sourceFunctions.isEmpty()) {
			markRows(resultsToBeApplied, BSimResultStatus.ERROR);
			return;
		}

		if (sourceFunctions.size() > 1) {
			if (!hasSameApplyData(sourceFunctions)) {
				applyResults.add(new BSimApplyResult(targetFunction.getName(),
					"<multiple functions>", BSimResultStatus.ERROR, targetFunction.getEntryPoint(),
					"Attempted to apply different " + taskName + "s to the same function"));
				markRows(resultsForAddress, BSimResultStatus.ERROR);
				return;
			}
		}

		BSimApplyResult applyResult = apply(targetFunction, sourceFunctions.get(0));
		applyResults.add(applyResult);
		markRows(resultsForAddress, applyResult.getStatus());
	}
Generic task for applying information from a function match to the queried function
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/gui/search/results/apply/AbstractBSimApplyTask.java