private Function getRemoteFunction(BSimMatchResult result) {
		Program remoteProgram = getRemoteProgram(result);
		if (remoteProgram == null) {
			return null;
		}

		FunctionDescription matchDescription = result.getMatchFunctionDescription();
		long addressOffset = matchDescription.getAddress();
		AddressSpace space = remoteProgram.getAddressFactory().getDefaultAddressSpace();
		Address address = space.getAddress(addressOffset);
		FunctionManager remoteFunctionManager = remoteProgram.getFunctionManager();
		Function matchFunction = remoteFunctionManager.getFunctionAt(address);

		if (matchFunction == null) {
			error("Couldn't find remote function at address " + address + " in remote program " +
				remoteProgram.getName(), result);
		}
		return matchFunction;
	}
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