public static boolean similarPrograms(Program p1, Program p2) {
		if (p1 == null || p2 == null) {
			return false;
		}
		if (p1.getLanguageID().equals(p2.getLanguageID())) {
			return true;
		}
		AddressSpace[] spaces1 = p1.getLanguage().getAddressFactory().getAddressSpaces();
		AddressSpace[] spaces2 = p2.getLanguage().getAddressFactory().getAddressSpaces();
		if (spaces1.length != spaces2.length) {
			return false;
		}
		Arrays.sort(spaces1);
		Arrays.sort(spaces2);
		for (int i=0; i<spaces1.length; i++) {
			if (!spaces1[i].equals(spaces2[i])) {
				return false;
			}
		}
		return true;
	}
Return whether or not the two specified programs are alike 
(their language name or address spaces are the same).
@param p1 the first program
@param p2 the second program
@return true if the programs are alike (their language name or address spaces are the same).
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMemoryComparator.java