private int getDiffFlags() {
		if (block1 == null) {
			if (block2 == null) {
				return 0;
			}
			return ALL;
		}
		if (block2 == null) {
			return ALL;
		}

		int flags = 0;
		if (!block1.getName().equals(block2.getName())) {
			flags |= NAME;
		}
		if (!block1.getStart().equals(block2.getStart())) {
			flags |= START_ADDRESS;
		}
		if (!block1.getEnd().equals(block2.getEnd())) {
			flags |= END_ADDRESS;
		}
		if (block1.getSize() != block2.getSize()) {
			flags |= SIZE;
		}
		if (block1.isRead() != block2.isRead()) {
			flags |= READ;
		}
		if (block1.isWrite() != block2.isWrite()) {
			flags |= WRITE;
		}
		if (block1.isExecute() != block2.isExecute()) {
			flags |= EXECUTE;
		}
		if (block1.isVolatile() != block2.isVolatile()) {
			flags |= VOLATILE;
		}
		if (block1.isArtificial() != block2.isArtificial()) {
			flags |= ARTIFICIAL;
		}
		if (!block1.getType().equals(block2.getType())) {
			flags |= TYPE;
		}
		if (block1.isInitialized() != block2.isInitialized()) {
			flags |= INIT;
		}
		if (!SystemUtilities.isEqual(block1.getSourceName(), block2.getSourceName())) {
			flags |= SOURCE;
		}
		if (!SystemUtilities.isEqual(block1.getComment(), block2.getComment())) {
			flags |= COMMENT;
		}
		return flags;
	}
Gets an integer value that has bits set as flags indicating the types of differences
that exist between the two memory blocks.
@param block1 the first program's memory block
@param block2 the second program's memory block
@return the memory difference flags
Ghidra/Features/Base/src/main/java/ghidra/program/util/MemoryBlockDiff.java