public static boolean isChangedWithUpgradeOnly(Program program) {
		// The only non-undoable change is an upgrade that occurs during instantiation
		if (!program.isChanged()) {
			return false;
		}
		return !program.canUndo();
	}
Determine if a program has a single unsaved change which corresponds to an
upgrade which occured during instantiation.
@param program the program to be checked for an unsaved upgrade condition.
@return true if program upgraded and has not been saved, else false
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/ProgramUtilities.java