void mergeReferences(AddressSetView p1MergeSet, ProgramMergeFilter filter, TaskMonitor monitor)
			throws CancelledException {
		boolean mergeRefs =
			(filter.getFilter(ProgramMergeFilter.REFERENCES) == ProgramMergeFilter.REPLACE);
		if (!mergeRefs) {
			return;
		}
		ProgramDiffFilter refDiffFilter = new ProgramDiffFilter(ProgramDiffFilter.REFERENCE_DIFFS);
		AddressSetView refDiffSet = programDiff.getDifferences(refDiffFilter, monitor);
		AddressSetView diffAddrSet = p1MergeSet.intersect(refDiffSet);
		AddressSet diffAddrSet2 = DiffUtility.getCompatibleAddressSet(diffAddrSet, program2);
		merger.replaceReferences(diffAddrSet2, monitor);
	}
<CODE>mergeReferences</CODE> merges all references
in the specified address set from the second program
based on the current merge filter setting.
It merges them into the merge program.

@param p1MergeSet the addresses to be merged.
The addresses in this set should be derived from program1.
@param filter the current merge filter settings indicating what types
of differences should be merged.
@param monitor the task monitor for notifying the user of this merge's
progress.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMergeManager.java