private Collection<FunctionTag> getTagsAddedToFunction(Program program, Address addr) {

		// The set to return.
		Collection<FunctionTag> tags = new HashSet<>();

		// Do a check to see if a function even exists in the given program. If the entire
		// function were deleted, it won't.
		Function function = program.getListing().getFunctionContaining(addr);
		if (function == null) {
			return tags;
		}

		tags = program.getListing().getFunctionContaining(addr).getTags();

		// Do a sanity check in case the function didn't exist in the Original program. This
		// could happen if the function was created before the merge.
		Function originalFunction = originalPgm.getListing().getFunctionContaining(addr);
		if (originalFunction != null) {
			Collection<FunctionTag> originalTags = originalFunction.getTags();

			// Get the difference between the collections, which will be the tags added.
			tags.removeAll(originalTags);
		}

		return tags;
	}
Returns all tags that were added to the function at the given address.

@param program the program where the function resides
@param addr the function entry point
@return
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/FunctionTagListingMerger.java