private AddressSet getBookmarkDifferences(AddressSetView addressSet, TaskMonitor monitor)
			throws CancelledException {
		AddressSet differences = new AddressSet();
		BookmarkManager bookmarkMgr1 = program1.getBookmarkManager();
		BookmarkManager bookmarkMgr2 = program2.getBookmarkManager();
		BookmarkType[] types1 = bookmarkMgr1.getBookmarkTypes();
		BookmarkType[] types2 = bookmarkMgr2.getBookmarkTypes();
		Arrays.sort(types1, BOOKMARK_TYPE_COMPARATOR);
		Arrays.sort(types2, BOOKMARK_TYPE_COMPARATOR);
		ArrayList<BookmarkType> list = new ArrayList<>();
		for (BookmarkType element : types1) {
			list.add(element);
		}

		for (BookmarkType element : types2) {
			boolean found = false;
			for (BookmarkType type : list) {
				if (element.getTypeString().compareTo(type.getTypeString()) == 0) {
					found = true;
					break;
				}
			}
			if (!found) {
				list.add(element);
			}
		}

		AddressSet addressSet2 = DiffUtility.getCompatibleAddressSet(addressSet, program2);
		int numTypes = list.size();
		AddressSet[] sets = new AddressSet[numTypes];
		for (int i = 0; i < numTypes; i++) {
			BookmarkType type = list.get(i);
			AddressSetView addrs1 = bookmarkMgr1.getBookmarkAddresses(type.getTypeString());
			AddressSetView addrs2 = bookmarkMgr2.getBookmarkAddresses(type.getTypeString());
			addrs1 = addrs1.intersect(addressSet);
			addrs2 = addrs2.intersect(addressSet2);
			// Get the differences for each bookmark type.
			BookmarksComparator c = new BookmarksComparator(type);
			sets[i] =
				c.getObjectDiffs(addrs1.getAddresses(true), addrs2.getAddresses(true), monitor);
			differences.add(sets[i]);
		}
		return differences;
	}
Gets the addresses where bookmarks differ between two programs.

@param addressSet the addresses to check for differences.
The addresses in this address set should be derived from program1.
@param monitor the task monitor for indicating the progress of
determining differences. This monitor reports the progress to the user.

@return the addresses of code units where the user defined properties differed.
The addresses in this address set are derived from program1.
@throws CancelledException if the user cancelled the Diff.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiff.java