private static Symbol getOtherCodeSymbol(Symbol symbol, Program otherProgram,
			Namespace namespace) {

		if (symbol.isExternal()) {
			return getOtherExternalLocationSymbol(symbol, otherProgram, namespace);
		}

		Address otherAddress =
			getCompatibleAddress(symbol.getProgram(), symbol.getAddress(), otherProgram);

		if (otherAddress == null) {
			return null;
		}

		Symbol otherSymbol =
			otherProgram.getSymbolTable().getSymbol(symbol.getName(), otherAddress, namespace);

		SymbolType otherType = otherSymbol == null ? null : otherSymbol.getSymbolType();

		if (otherType == symbol.getSymbolType()) {
			return otherSymbol;
		}

		return null;
	}
Given a symbol for a specified program, get the corresponding symbol from the
specified otherProgram.
<br>
In the case of external locations this performs an exact match based upon symbol name, 
namespace and symbol type.

@param symbol symbol to look for
@param otherProgram other program
@return corresponding symbol for otherProgram or null if no such symbol exists.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/SimpleDiffUtility.java