private void mergeAddsAndDetermineConflicts(ExternalLocation latestExternalLocation,
			ExternalLocation myExternalLocation, TaskMonitor monitor) throws CancelledException {

		if (!equivalentExternals(latestExternalLocation, myExternalLocation)) {
			// Latest and My don't match.
			// See what pieces can be auto-merged and which are conflicts.

			Namespace latestNamespace = latestExternalLocation.getParentNameSpace();
			String latestLabel = latestExternalLocation.getLabel();
			DataType latestDataType = getResultDataType(latestExternalLocation);
			Address latestAddress = latestExternalLocation.getAddress();
			String latestOriginalName = latestExternalLocation.getOriginalImportedName();
//			SourceType latestSourceType = latestExternalLocation.getSource();
			Function latestFunction = latestExternalLocation.getFunction();
			boolean latestExternalIsFunction = (latestFunction != null);

			Namespace myNamespace = myExternalLocation.getParentNameSpace();
			boolean myNamespaceIsDefault =
				(myNamespace.getSymbol().getSymbolType() == SymbolType.LIBRARY) &&
					(myNamespace.getName() == Library.UNKNOWN);
			String myLabel = myExternalLocation.getLabel();
			boolean myLabelIsDefault = hasDefaultExternalName(myExternalLocation);
			DataType myDataType = getResultDataType(myExternalLocation);
			boolean myDataTypeIsDefined = hasDefinedDataType(myExternalLocation);
			Address myAddress = myExternalLocation.getAddress();
			String myOriginalName = myExternalLocation.getOriginalImportedName();
//			SourceType mySourceType = myExternalLocation.getSource();
			Function myFunction = myExternalLocation.getFunction();
			boolean myExternalIsFunction = (myFunction != null);

			// Get the external in RESULT that is the same as in LATEST.
			Address resultExternalAddress =
				getResultSpaceAddressForLatestLocation(latestExternalLocation);
			Symbol resultSymbol = symbolTables[RESULT].getPrimarySymbol(resultExternalAddress);
			ExternalLocation resultExternalLocation =
				externalManagers[RESULT].getExternalLocation(resultSymbol);

			ExternalLocation originalLocation = null; // no original location. This is an add.
			ExternalLocation[] locations = new ExternalLocation[] { resultExternalLocation,
				latestExternalLocation, myExternalLocation, originalLocation };
			updateAddressTranslators(locations);

//			if (myOriginalName != null && latestOriginalName == null &&
//				myOriginalName.equals(latestLabel)) {
//				mergeExternalDetail(EXTERNAL_LABEL, resultExternalLocation, myExternalLocation,
//					monitor);
//			}

			if (!myNamespaceIsDefault && !equivalentNamespaces(latestNamespace, myNamespace)) {
				// Auto-merge MY namespace.
				mergeExternalDetail(EXTERNAL_NAMESPACE, resultExternalLocation, myExternalLocation,
					monitor);
			}

			if (!myLabelIsDefault && !SystemUtilities.isEqual(latestLabel, myLabel) &&
				!SystemUtilities.isEqual(latestOriginalName, myLabel)) {
				// Auto-merge MY label.
				mergeExternalDetail(EXTERNAL_LABEL, resultExternalLocation, myExternalLocation,
					monitor);
			}

			if ((myAddress != null) && !SystemUtilities.isEqual(latestAddress, myAddress)) {
				// Auto-merge MY memory address.
				mergeExternalDetail(EXTERNAL_ADDRESS, resultExternalLocation, myExternalLocation,
					monitor);
			}

			// Data Type vs Data type
			if (myDataTypeIsDefined && !isSameDataType(latestDataType, myDataType)) {
				// Auto-merge MY data type.
				replaceExternalDataType(resultExternalLocation, myExternalLocation, monitor);
			}
			// Function vs Function
			if (myExternalIsFunction && !latestExternalIsFunction) {
				// Auto-merge MY function.
				// Add the function to the external location.
				// Change the external Label into a function.
				Function resultFunction = resultExternalLocation.createFunction();
				getMergeMy().replaceExternalFunction(resultFunction, myFunction, monitor);
			}
		}
		// Otherwise Latest and My are equivalent.
	}
If there is an external add conflict, but it is between a new external function versus a
new external data label, we don't want to give the user the KeepBoth or MergeBoth options.
@param latestExternalLocation the external location in the Latest program
@param myExternalLocation the external location in the My program
@param monitor a status monitor for feedback and cancelling.
@return true if this is an external function versus external data label.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ExternalFunctionMerger.java