private void removeFunctionsNotInProgram2(AddressSetView addrSet2, TaskMonitor monitor)
			throws CancelledException, UnsupportedOperationException {
		if (!originToResultTranslator.isOneForOneTranslator()) {
			String message = originToResultTranslator.getClass().getName() +
				" is not a one for one translator and can't remove functions not in program2.";
			throw new UnsupportedOperationException(message);
		}
		monitor.setMessage("Removing Functions...");
		AddressSet addrSet1 = originToResultTranslator.getAddressSet(addrSet2);

		FunctionManager funcMgr1 = this.resultProgram.getFunctionManager();
		FunctionManager funcMgr2 = this.originProgram.getFunctionManager();
		FunctionIterator funcIter1 = funcMgr1.getFunctions(addrSet1, true);
		FunctionIterator funcIter2 = funcMgr2.getFunctions(addrSet2, true);
		FunctionAddressIterator iter1 = new FunctionAddressIterator(funcIter1);
		FunctionAddressIterator iter2 = new FunctionAddressIterator(funcIter2);

		HashSet<Address> resultsToKeep = new HashSet<>();
		while (iter2.hasNext()) {
			monitor.checkCancelled();
			Address addr2 = iter2.next();
			Address addr1 = originToResultTranslator.getAddress(addr2);
			resultsToKeep.add(addr1);
		}
		while (iter1.hasNext()) {
			monitor.checkCancelled();
			Address resultAddress = iter1.next();
			if (!resultsToKeep.contains(resultAddress)) {
				monitor.setMessage("Removing Functions...   " + resultAddress.toString(true));
				funcMgr1.removeFunction(resultAddress);
			}
		}
	}
<CODE>mergeFunctions</CODE> merges function differences within the specified
 address set.

@param addrSet the addresses to be merged.
The addresses in this set should be derived from program1.
@param monitor the task monitor for notifying the user of this merge's
progress.
@throws CancelledException if user cancels via the monitor.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java