private void replaceFunctionTags(Address originAddress) {

		Address resultAddress = originToResultTranslator.getAddress(originAddress);

		// Get all the tags in Origin for this function. These are the tags that we'll
		// be keeping.
		Set<FunctionTag> originalTags = getTagsAtAddress(originListing, originAddress);

		// Get the result function and verify it's valid.
		Function resultFunction = resultListing.getFunctionContaining(resultAddress);
		if (resultFunction == null) {
			Msg.error(this, "Error retrieving function at address: " + resultAddress);
			return;
		}

		// Delete all tags in the result. Note the extra step of extracting the tag
		// names and iterating over them to do the remove; we have to do this to avoid
		// a concurrent modification exception.
		Set<FunctionTag> currentResultTags =
			resultListing.getFunctionContaining(resultAddress).getTags();
		Iterator<FunctionTag> iter = currentResultTags.iterator();
		List<String> namesToDelete = new ArrayList<>();
		while (iter.hasNext()) {
			FunctionTag tag = iter.next();
			namesToDelete.add(tag.getName());
		}
		for (String name : namesToDelete) {
			resultFunction.removeTag(name);
		}

		// Add all the tags from Origin into the Result.
		iter = originalTags.iterator();
		while (iter.hasNext()) {
			FunctionTag tag = iter.next();
			resultFunction.addTag(tag.getName());
		}
	}
Clears out the function tags at the given address in Result and
replaces them with tags from Origin.

@param originAddress the function entry point in Origin
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMerge.java