public void initMergeInfo() {
		// Memory Merge may have limited the changed code units we are working with.
		AddressSetView resultSet = programs[RESULT].getMemory();
		this.latestSet = latestChanges.getAddressSet().intersect(resultSet);
		this.mySet = myChanges.getAddressSet().intersect(resultSet);
		currentMerger = null;

		try {
			// Set up for the different types of diffs that are needed to resolve differences.
			/* Important: diffOriginalLatest uses "possibleLatestInConflict" for its limiting set
			 * and not "latestSet". This is because the result program already has the latest changes.
			 * So we are only concerned with finding conflicts with latest.
			 */
			AddressSetView possibleLatestInConflict = latestSet.intersect(mySet);
			diffOriginalLatest =
				new ProgramDiff(programs[ORIGINAL], programs[LATEST], possibleLatestInConflict);
			diffOriginalMy = new ProgramDiff(programs[ORIGINAL], programs[MY], mySet);
			diffLatestMy =
				new ProgramDiff(programs[LATEST], programs[MY], possibleLatestInConflict);

			// Set up for the different types of merges that are needed to merge changes.
			mergeMy = new ProgramMerge(programs[RESULT], programs[MY]);
			mergeLatest = new ProgramMerge(programs[RESULT], programs[LATEST]);
			mergeOriginal = new ProgramMerge(programs[RESULT], programs[ORIGINAL]);
		}
		catch (ProgramConflictException e) {
			throw new AssertException(e);
		}
		catch (IllegalArgumentException e) {
			throw new AssertException(e);
		}
	}
Sets up the change address sets, Diffs between the various program versions,
and Merges from various versions to the resulting program.
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ListingMergeManager.java