private void fixupLatestChangeIDsMarkedAsRemovesAndAdds(TaskMonitor monitor) {
		// NOTE: Things get rather complicated when an external location transitions to
		// a function since it is conveyed as a symbol removal and an add even though it
		// is really the same external location.
		@SuppressWarnings("unchecked")
		HashSet<Long> latestRemovedIDs = (HashSet<Long>) latestRemovedOriginalIDs.clone();
		for (Long id : latestRemovedIDs) {
			long originalID = id.longValue();
			Symbol originalSymbol = symbolTables[ORIGINAL].getSymbol(originalID);
			Address originalAddress = originalSymbol.getAddress();
			Symbol latestSymbol = SimpleDiffUtility.getMatchingExternalSymbol(programs[ORIGINAL],
				originalSymbol, programs[LATEST], false, latestAddIDs);
			if (latestSymbol != null) {
				Address latestAddress = latestSymbol.getAddress();
				// Check the external space addresses to ensure they are the same.
				if (originalAddress.equals(latestAddress)) {
					// This remove/add appears to be a change
					long latestID = latestSymbol.getID();
					fixupLatestExternalTypeChanges(originalID, latestID);
				}
			}
		}
	}
Determine the type of changes to the symbols in the LATEST and MY (CheckedOut) program.
Changes can be symbol removed, added, changed, renamed, and set to primary.
@param monitor task monitor for displaying progress to the user
@throws CancelledException if the user cancels the merge.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ExternalFunctionMerger.java