private void addSymbol(Symbol mySym) throws DuplicateNameException, InvalidInputException {
		long id = mySym.getID();
		if (myHash.contains(id)) {
			return; // Already merged in.
		}
		String name = mySym.getName();
		SymbolType myType = mySym.getSymbolType();
		if (myType == SymbolType.LOCAL_VAR || myType == SymbolType.PARAMETER) {
			return; // handled by function merger I think ? the code below won't properly handle variables
		}

		Address resultAddr =
			SimpleDiffUtility.getCompatibleAddress(myPgm, mySym.getAddress(), resultPgm);
		Namespace namespace = mySym.getParentNamespace();
		Namespace resultNamespace = resolveNamespace(myPgm, namespace);
		// FUTURE? May want to do something else for exceptions out of resolveNamespace().
		if (resultNamespace == null) {
			resultNamespace = DiffUtility.createNamespace(myPgm, namespace, resultPgm);
		}

		Symbol resultSym = resultSymTab.getSymbol(name, resultAddr, resultNamespace);

		if (resultSym != null) {
			// if the symbol we want to add is already there, map it and get out
			if (resultSym.getSymbolType() == myType) {
				long resultID = resultSym.getID();
				if (resultID != id) {
					myHash.put(id, resultID);
				}
				return;
			}
		}

		String newName = name;
		for (int i = 1; i < Integer.MAX_VALUE; i++) {
			try {
				resultSym = createSymbol(newName, myType, resultAddr, resultNamespace, myPgm, id,
					mySym.getSource());
				if (resultSym != null && i > 1) {
					renamedConflictIDs.add(resultSym.getID());
				}
				return;
			}
			catch (DuplicateNameException e) {
				// try again
			}
			newName = name + ProgramMerge.SYMBOL_CONFLICT_SUFFIX + i;
		}
		throw new DuplicateNameException("Couldn't create symbol '" + mySym.getName(true) + "'.");
	}
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/SymbolMerger.java