private void applyResults(TaskMonitor monitor) throws CancelledException {

		Map<Address, List<BSimMatchResult>> map = groupResultsBySearchAddress(monitor);

		monitor.initialize(map.size(), "Applying " + taskName + "...");

		for (Address address : map.keySet()) {
			applyResultsForAddress(address, map.get(address), monitor);
			monitor.increment();
		}
	}
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