private Namespace determineToNamespace(Address toAddress, Namespace fromNamespace,
			LongLongHashtable conflictSymbolIDMap) {
		if (fromNamespace.getSymbol().getSymbolType() == SymbolType.FUNCTION) {
			Function toFunction = toProgram.getFunctionManager().getFunctionContaining(toAddress);
			if (toFunction != null) {
				return toFunction;
			}
		}
		else {
			try {
				Namespace newNamespace = resolveNamespace(fromNamespace, conflictSymbolIDMap);
				if (newNamespace != null) {
					return newNamespace;
				}
			}
			catch (InvalidInputException | DuplicateNameException e) {
				// Default to global namespace
			}
		}
		return toProgram.getGlobalNamespace();
	}
Adds symbols to the "to" program that are not in the "to" program, but are in the
"from" program.
@param fromAddress the program address where the symbols are being added from.
This address should be derived from the "from" program.
@param replace true indicates this method is being called as part of a replace.
false indicates this method is being done as part of a merge.
<br>Note: merge and replace require different behaviors here.
@param conflictSymbolIDMap maps the symbol IDs in the "from" program to the symbol IDs
in the "to" program for any symbols (and their associated objects) that were created
with conflict names.
(key = "from" program's symbol ID; value = "to" program's symbol ID)
@param monitor the task monitor for updating user progress and allowing cancelling.

@return an array of <code>SymbolTranslators</code> for symbols that ended up with different
pathnames in the destination program than they had in the source program. These map symbols
in the source program to a symbol with another name due to a duplicate symbol problem.

@throws CancelledException if the task monitor is canceled.
@throws DuplicateNameException if a symbol couldn't be added due
to a name conflict that can't be dealt with.
@throws InvalidInputException if the symbol name being used to create a symbol in the
destination program is not valid.
Ghidra/Features/Base/src/main/java/ghidra/program/util/SymbolMerge.java