private boolean compatibleRefs(Reference ref1, Reference[] refs) {
		Address toAddr = ref1.getToAddress();
		if (toAddr.isMemoryAddress()) {
			for (Reference ref : refs) {
				if (!ref.getToAddress().isMemoryAddress()) {
					return false;
				}
			}
			return true;
		}
		else if (toAddr.isExternalAddress()) {
			for (Reference ref : refs) {
				if (!ref.getToAddress().isExternalAddress()) {
					return false;
				}
			}
			return true;
		}
		if (toAddr.isRegisterAddress()) {
			for (Reference ref : refs) {
				if (!ref.getToAddress().isRegisterAddress()) {
					return false;
				}
			}
			return true;
		}
		if (toAddr.isStackAddress()) {
			for (Reference ref : refs) {
				if (!ref.getToAddress().isStackAddress()) {
					return false;
				}
			}
			return true;
		}
		return false;
	}
@param program
@param fromAddress
@param operandIndex
@return
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/ReferenceMerger.java