private void resetDetails(Address p1DiffAddress, StyledDocument doc) {
		currentP1Address = p1DiffAddress;
		currentP2Address = SimpleDiffUtility.getCompatibleAddress(p1, p1DiffAddress, p2);
		this.detailsDoc = doc;
		this.noMem = false;
		try {
			doc.remove(0, doc.getLength());
		}
		catch (BadLocationException e) {
			Msg.error(this,
				"Error resetting Diff details for address " + p1DiffAddress.toString() + ".", e);
		}

		hasProgramContextDiffs = false;
		hasByteDiffs = false;
		hasCodeUnitDiffs = false;
		hasFunctionDiffs = false;
		hasSymbolDiffs = false;
		hasEquateDiffs = false;
		hasRefDiffs = false;
		hasPlateCommentDiffs = false;
		hasPreCommentDiffs = false;
		hasEolCommentDiffs = false;
		hasRepeatableCommentDiffs = false;
		hasPostCommentDiffs = false;
		hasBookmarkDiffs = false;
		hasTagDiffs = false;
		hasUserDefinedDiffs = false;

		cu1At = l1.getCodeUnitAt(currentP1Address);
		cu2At = (currentP2Address != null) ? l2.getCodeUnitAt(currentP2Address) : null;
		cu1 = l1.getCodeUnitContaining(currentP1Address);
		cu2 = (currentP2Address != null) ? l2.getCodeUnitContaining(currentP2Address) : null;
		if ((cu1 == null) || (cu2 == null)) {
			noMem = true;
//			return;
		}
		Address cu1Min = (cu1 != null) ? cu1.getMinAddress() : null;
		Address cu1Max = (cu1 != null) ? cu1.getMaxAddress() : null;
		Address cu2Min = (cu2 != null) ? cu2.getMinAddress() : null;
		Address cu2Max = (cu2 != null) ? cu2.getMaxAddress() : null;
		Address cu2MinAsP1Addr = SimpleDiffUtility.getCompatibleAddress(p2, cu2Min, p1);
		Address cu2MaxAsP1Addr = SimpleDiffUtility.getCompatibleAddress(p2, cu2Max, p1);

		// The min address for the second program's code unit might not be in the first program.
		minP1Address = ((cu2MinAsP1Addr == null) ||
			(((cu1Min != null) && cu1Min.compareTo(cu2MinAsP1Addr) <= 0)) ? cu1Min
					: cu2MinAsP1Addr);

		// The max address for the second program's code unit might not be in the first program.
		maxP1Address = ((cu2MaxAsP1Addr == null) ||
			((cu1Max != null) && cu1Max.compareTo(cu2MaxAsP1Addr) >= 0)) ? cu1Max : cu2MaxAsP1Addr;

		checkP1AddressSet = new AddressSet(minP1Address, maxP1Address);
	}
Determine the detailed differences between the two programs at the
indicated address. The differences are determined for the extent of the
code units in the two programs at the indicated address.
@param p1DiffAddress the address that difference details are needed for.
This address should be derived from program1.
@param filter the program diff filter that indicates the diff details to show.
@param doc the document where the details of differences between the two
programs should be written.
@param prefixString Line of text to display at beginning of the difference details information.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramDiffDetails.java