private void processConflicts(ArrayList<Long> list) throws CancelledException {
		for (int i = 0; i < list.size(); i++) {
			if (currentMonitor.isCancelled()) {
				throw new CancelledException();
			}
			currentMonitor.setProgress(++progressIndex);

			long treeID = list.get(i).longValue();
			ProgramModule myRoot = myListing.getRootModule(treeID);
			ProgramModule resultRoot = resultListing.getRootModule(treeID);
			ProgramModule origRoot = originalProgram.getListing().getRootModule(treeID);
			ProgramModule latestRoot = latestListing.getRootModule(treeID);

			String myTreeName = null;
			String resultTreeName = null;
			String latestTreeName = null;
			String origTreeName = origRoot.getTreeName();

			if (myRoot != null) {
				myTreeName = myRoot.getTreeName();
			}
			if (resultRoot != null) {
				resultTreeName = resultRoot.getTreeName();
			}
			if (latestRoot != null) {
				latestTreeName = latestRoot.getTreeName();
			}
			if (resultRoot == null && myRoot == null) {
				// case 12: dest tree deleted, source tree delete ==> 
				// 								no action required
				continue;
			}
			if (resultRoot != null && myRoot == null) {
				// case 11: any dest change, source tree deleted ==> no action required,
				// 
				// case 15: no changes to dest tree, source deleted tree
				//  (already handled as a change and not a conflict) OR
				// case 13: new tree in destination (not a conflict) ==> no action required 
				// (keep the tree)
				continue;
			}

			if (resultRoot == null && myRoot != null) {
				if (nameChanged(origRoot, myTreeName) || treeStructureChanged(origRoot, myRoot)) {
					// case 10: dest tree deleted, any source change 
					//			(either source name changed or content changed)
					// keep the tree
					createTree(resultListing, myTreeName, myRoot);
				}
				// else no action required (tree remains deleted)
			}
			else if (!treeStructureChanged(treeID) && nameChanged(origRoot, myTreeName) &&
				nameChanged(origRoot, resultTreeName)) {
				//case 1: both names changed, no structure changes
				namesChanged(myRoot, resultRoot, origRoot, i + 1);
			}
			else if (treeStructureChanged(origRoot, latestRoot) &&
				treeStructureChanged(origRoot, myRoot)) {
				// case 6: dest content changed, source content changed
				// case 7: dest name change & content changed, 
				// 		 source name changed & content changed
				// case 8: dest name changed & content changed, source content changed
				// case 9: dest content changed, source name changed & content changed
				keepOtherOrCreateTree(origRoot, myRoot, resultRoot, i + 1);
			}
			// case 4: dest Name & content changed, source name changed
			else if (nameChanged(origRoot, latestTreeName) &&
				treeStructureChanged(origRoot, latestRoot) && nameChanged(origRoot, myTreeName)) {
				namesContentChanged(myRoot, myTreeName, resultTreeName, origRoot, i + 1);

			}
			// case 5: dest Name changed, source name & content changed
			else if (nameChanged(origRoot, latestTreeName) && nameChanged(origRoot, myTreeName) &&
				treeStructureChanged(origRoot, myRoot)) {
				nameContentsChanged(myRoot, myTreeName, resultTreeName, origTreeName, i + 1);

			}
			// case 2: dest Name changed, source content changed 
			// (not a conflict that the user must resolve)
			else if (nameChanged(origRoot, latestTreeName) &&
				treeStructureChanged(origRoot, myRoot)) {

				resultListing.removeTree(resultTreeName);
				createTree(resultListing, resultTreeName, myRoot);
			}
			// case 3: dest content changed, source name changed
			// (not a conflict that the user must resolve)
			else if (nameChanged(origRoot, myTreeName) &&
				treeStructureChanged(origRoot, latestRoot)) {
				// automatic merge: rename "other" tree to "my" tree name
				try {
					resultListing.renameTree(resultTreeName, getUniqueTreeName(myTreeName));
				}
				catch (DuplicateNameException e) {
					throw new AssertException("Got duplicate name");
				}
			}
		}
	}
Called when we need to know which tree changed (not enough to know
that the structures are different).
@param root1 root of the original program 
@param root2 root for either the source tree or the destination tree
@return true if there was no original root, OR the modification
numbers for the original tree and tree containing root do not match
Ghidra/Features/Base/src/main/java/ghidra/app/merge/tree/ProgramTreeMergeManager.java