public void mergeExternalProgramName(Program program1, Program program2, IDGroup idGroup,
			TaskMonitor monitor) {
		ExternalManager em1 = program1.getExternalManager();
		ExternalManager em2 = program2.getExternalManager();
		String libName1 = idGroup.getName(program1);
		String libName2 = idGroup.getName(program2);
		if (libName2 != null && em2.contains(libName2)) {
			try {
				em1.setExternalPath(libName2, em2.getExternalLibraryPath(libName2),
					isExternalUserDefined(program2, libName2));
			}
			catch (InvalidInputException e) {
				MergeManager.showBlockingError("Error Setting External Program Name",
					"Couldn't set path to '" + em2.getExternalLibraryPath(libName2) +
						"' for external program name '" + libName2 + "'");
			}
		}
		else {
			if (libName1 != null && em1.contains(libName1)) {
				boolean removed = em1.removeExternalLibrary(libName1);
				if (!removed) {
					MergeManager.showBlockingError("Error Removing External Program Name",
						"Couldn't remove external program name '" + libName1 + "'");
				}
			}
		}
	}
Actually merges (sets or removes) the indicated external program name in
program1 based on the same external program name in program2
@param program1 the program to merge into.
@param program2 the program to get the merge information from.
@param idGroup the symbol ID group for the external program (Library) to merge.
@param monitor task monitor for feedback or canceling the merge.s
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ExternalProgramMerger.java