private void mergeConflictingTag(Address addr, int chosenConflictOption, TaskMonitor monitor)
			throws CancelledException {

		int resolutionType = ProgramMergeFilter.MERGE;

		// Set up lists to hold the tags we want to keep and the ones that 
		// are in conflict. The discard list holds the versions of a conflict we 
		// want to throw away; the keep list is the one we want to keep.
		//
		// ie: 	Original 	= "Red"
		//		My 			= "Red-my"
		//		Latest 		= "Red-latest"
		//
		// If the decision is KEEP_LATEST, then "Red-my" and "Red" will be added
		// to the discard list. "Red-latest" will be in the keep list.
		Set<FunctionTag> discardTags = new HashSet<>();
		Set<FunctionTag> keepTags = new HashSet<>();

		try {
			// Get the tag name we're doing resolution on in each of the 
			// three programs. 
			FunctionTag latestTag = getTag(currentlyMergingTagID, latestPgm);
			FunctionTag origTag = getTag(currentlyMergingTagID, originalPgm);
			FunctionTag myTag = getTag(currentlyMergingTagID, myPgm);

			// Now add those names to the proper list given the user selection.
			if ((chosenConflictOption & KEEP_ORIGINAL) != 0) {
				if (myTag != null) {
					discardTags.add(myTag);
				}
				if (latestTag != null) {
					discardTags.add(latestTag);
				}
				if (origTag != null) {
					keepTags.add(origTag);
				}
			}
			if ((chosenConflictOption & KEEP_LATEST) != 0) {
				if (myTag != null) {
					discardTags.add(myTag);
				}
				if (origTag != null) {
					discardTags.add(origTag);
				}
				if (latestTag != null) {
					keepTags.add(latestTag);
				}
			}
			if ((chosenConflictOption & KEEP_MY) != 0) {
				if (latestTag != null) {
					discardTags.add(latestTag);
				}
				if (origTag != null) {
					discardTags.add(origTag);
				}
				if (myTag != null) {
					keepTags.add(myTag);
				}
			}

			// And finally do the merge.
			listingMergeMgr.mergeOriginal.applyFunctionTagChanges(new AddressSet(addr),
				resolutionType, discardTags, keepTags, monitor);
		}
		catch (IOException e) {
			Msg.error(this, "Error merging addr: " + addr, e);
		}
	}
Merges the tag currently being resolved in the conflict panel according to the
given conflict option. This is invoked when the user has made a merge 
selection (keep Original, My, or Latest) in the conflict resolution panel. 

@param addr the location of the conflict
@param chosenConflictOption KEEP_ORIGINAL, KEEP_LATEST, KEEP_MY
@param monitor
@throws CancelledException
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/FunctionTagListingMerger.java