public static void compareAddressTypes(Program program1, Program program2)
            throws ProgramConflictException {
        // Do the programs have the same types of addresses?
        AddressFactory af1 = program1.getAddressFactory();
        AddressFactory af2 = program2.getAddressFactory();
        if (!af1.equals(af2)){
            throw new ProgramConflictException("Address types conflict between "
                + program1.getName() 
                + " and "
                + program2.getName() + ".\n");
        }
    }
Check each program to see if the memory blocks have the same address types.

@param program1 the first program
@param program2 the second program

@throws ProgramConflictException if the address types for the two programs
do not match.
Ghidra/Features/Base/src/main/java/ghidra/program/util/ProgramMemoryComparator.java