private boolean openSecondProgram(Program newProgram, JComponent popupParent) {
		if (newProgram == null) {
			displayStatus(popupParent, "Can't Open Selected Program",
				"Couldn't open second program.", OptionDialog.ERROR_MESSAGE);
			return false;
		}

		if (!ProgramMemoryComparator.similarPrograms(currentProgram, newProgram)) {
			String message = "Programs languages don't match.\n" + currentProgram.getName() + " (" +
				currentProgram.getLanguageID() + ")\n" + newProgram.getName() + " (" +
				newProgram.getLanguageID() + ")";
			displayStatus(popupParent, "Can't Open Selected Program", message,
				OptionDialog.ERROR_MESSAGE);
			newProgram.release(this);
			return false;
		}

		if (!hasStaleOverlays(currentProgram) && checkStaleOverlays(newProgram)) {
			return false;
		}

		ProgramMemoryComparator programMemoryComparator = null;
		try {
			programMemoryComparator = new ProgramMemoryComparator(currentProgram, newProgram);
		}
		catch (ProgramConflictException e) {
			Msg.error(this, "Unexpected exception creating memory comparator", e);
			newProgram.release(this);
			return false;
		}
		addressesOnlyInP1 = programMemoryComparator.getAddressesOnlyInOne();
		compatibleOnlyInP2 = programMemoryComparator.getCompatibleAddressesOnlyInTwo();
		AddressSet addressesInCommon = programMemoryComparator.getAddressesInCommon();
		AddressSet combinedAddresses =
			ProgramMemoryComparator.getCombinedAddresses(currentProgram, newProgram);
		if (addressesInCommon.isEmpty()) {
			int selectedOption = OptionDialog.showYesNoDialog(popupParent, "No Memory In Common",
				"The two programs have no memory addresses in common.\n" +
					"Do you want to continue?");
			if (selectedOption != OptionDialog.YES_OPTION) {
				newProgram.release(this);
				return false;
			}
		}
		if (secondaryDiffProgram != null) {
			closeProgram2();
		}

		primaryProgram = currentProgram;
		secondaryDiffProgram = newProgram;
		p2AddressFactory = secondaryDiffProgram.getAddressFactory();
		applyFilter = applySettingsMgr.getDefaultApplyFilter();
		diffDetails = new ProgramDiffDetails(primaryProgram, secondaryDiffProgram);
		primaryProgram.addListener(this);

		try {
			settingLocation = true;
			diffListingPanel.setProgram(secondaryDiffProgram);
			AddressSet p2ViewAddrSet =
				DiffUtility.getCompatibleAddressSet(p1ViewAddrSet, secondaryDiffProgram);
			diffListingPanel.setView(p2ViewAddrSet);
			// If the entire first program is being viewed then force any additional memory in
			// program2 that isn't in program1 but that is compatible with program1 to get added
			// to the first program's view.
			if (p1ViewAddrSet.contains(primaryProgram.getMemory())) {
				this.firePluginEvent(
					new ViewChangedPluginEvent(this.getName(), null, combinedAddresses));
			}
			FieldPanel fp = diffListingPanel.getFieldPanel();
			showSecondView();
			AddressIndexMap indexMap = diffListingPanel.getAddressIndexMap();
			fp.setBackgroundColorModel(new MarkerServiceBackgroundColorModel(markerManager,
				secondaryDiffProgram, indexMap));
		}
		finally {
			settingLocation = false;
		}
		setupBookmarkNavigators();

		sameProgramContext = ProgramMemoryComparator.sameProgramContextRegisterNames(primaryProgram,
			secondaryDiffProgram);
		actionManager.secondProgramOpened();
		actionManager.addActions();

		MarkerSet cursorMarkers = getCursorMarkers();
		Address currentP2Address = currentLocation.getAddress();
		ProgramLocation current2PLocation = currentLocation;
		if (currentLocation.getProgram() != secondaryDiffProgram) { // Make sure address is from P2.
			currentP2Address = SimpleDiffUtility.getCompatibleAddress(currentLocation.getProgram(),
				currentLocation.getAddress(), secondaryDiffProgram);
			if (currentP2Address != null) {
				current2PLocation = ProgramLocation.getTranslatedCopy(currentLocation,
					secondaryDiffProgram, currentP2Address);
			}
		}
		diffListingPanel.goTo(current2PLocation);
		if (currentP2Address != null) {
			cursorMarkers.setAddressSet(new AddressSet(currentP2Address));
		}

		updatePgm2Enablement();

		if (diffControl != null) {
			clearDiff();
		}
		return true;
	}
Reload the marked differences in the diff panel.
Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/ProgramDiffPlugin.java