synchronized public AddressSetView getDifferences(ProgramDiffFilter filter, TaskMonitor monitor)
			throws CancelledException {
		cancelled = false;

		monitor = TaskMonitor.dummyIfNull(monitor);

		if (!filterChanged && ((filter != null) && (filter.equals(this.pdf)))) {
			return diffsToReturn;
		}
		this.pdf = filter;
		this.reDiffFilter.addToFilter(filter);
		filterChanged = false;
		currentDiffs = new AddressSet();

		// Create any required address sets.
		int[] pt = ProgramDiffFilter.getPrimaryTypes();
		for (int element : pt) {

			// Are we interested in this difference type?
			if (pdf.getFilter(element)) {
				Integer key = element;
				// Do we still need to determine differences of this type?
				if (!diffAddrSets.containsKey(key)) {
					if (!cancelled) {
						try {
							createAddressSet(element, monitor);
						}
						catch (ProgramConflictException e) {
							// Ignore register differences if they aren't compatible.
						}
					}
					else {
						// Turn off this filter since user cancelled getting results.
						pdf.setFilter(element, false);
					}
				}
				// Do we now have the differences?
				if (diffAddrSets.containsKey(key)) {
					AddressSet addrSetToAdd = diffAddrSets.get(key);
					currentDiffs.add(addrSetToAdd);
				}
				// Did the user cancel the program diff?
				checkCancelled(monitor);
			}
		}
		checkCancelled(monitor);
		monitor.setMessage("Adjusting Diff set...");
		monitor.setProgress(0);
		computeDiffsToReturn();
		return diffsToReturn;
	}
<CODE>getDifferences</CODE> is used to determine
the addresses where there are differences between two programs. This
method only indicates that there is a difference at the address, not what
type of difference it is. Possible differences are:
the actual bytes at an address, comments, labels, code units,
references, equates, properties, tags and program context register values.
<P>The specified filter will become the new current filter.

@param filter the filter to use instead of the current filter defined for
this ProgramDiff.
@param monitor the task monitor for indicating the progress of
determining differences. This monitor also allows the user to cancel if
the diff takes too long. If no monitor is desired, use null.
@return an address set of where differences were found between the two
programs based on the specified filter setting.
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