void closeProgram2() {
		codeViewerService.removeListingPanel(diffListingPanel);
		showingSecondProgram = false;
		diffListingPanel.setProgram(null);
		p2Selection = new ProgramSelection();
		setProgram2Selection(p2Selection);
		clearDiff();
		if (secondaryDiffProgram != null) {
			for (BookmarkNavigator nav : bookmarkMap.values()) {
				nav.dispose();
			}
			bookmarkMap.clear();

			actionManager.secondProgramClosed();
			secondaryDiffProgram.release(this);
			diffDetails = null;

			clearMarkers();
			addressesOnlyInP1 = new AddressSet();
			compatibleOnlyInP2 = new AddressSet();
			primaryProgram.removeListener(this);
			primaryProgram = null;
			secondaryDiffProgram = null;
			p2AddressFactory = null;
		}
		sameProgramContext = false;
		updatePgm2Enablement();
	}
Computes the differences between program1 and program2 that are displayed in the browser. It
allows the user to specify the Diff settings to use.
Ghidra/Features/ProgramDiff/src/main/java/ghidra/app/plugin/core/diff/ProgramDiffPlugin.java