@Override
	synchronized boolean setSymbolID(Reference ref, long symbolID) throws IOException {
		int opIndex = ref.getOperandIndex();
		Address changeAddr = isFrom ? ref.getToAddress() : ref.getFromAddress();

		Reference[] result = new Reference[1];
		int pos = 0;
		int newPos = 0;
		for (int i = 0; i < numRefs; i++) {
			newPos = decode(refData, pos, result);
			Reference r = result[0];
			if (r.getOperandIndex() == opIndex) {
				Address addr = isFrom ? r.getToAddress() : r.getFromAddress();
				if (changeAddr.equals(addr)) {
					boolean isPrimary = ref.isPrimary();
					boolean isOffset = false;
					boolean isShifted = false;
					long offsetOrShift = 0;
					if (r.isMemoryReference()) {
						isOffset = ((MemReferenceDB) r).isOffset();
						isShifted = ((MemReferenceDB) r).isShifted();
						offsetOrShift = ((MemReferenceDB) r).getOffsetOrShift();
					}

					byte[] bytes =
						encode(r.getFromAddress(), r.getToAddress(), r.getReferenceType(),
							r.getSource(), r.getOperandIndex(), symbolID, isPrimary, isOffset,
							isShifted, offsetOrShift);

					if (bytes.length == newPos - pos) {
						System.arraycopy(bytes, 0, refData, pos, bytes.length);
					}
					else {
						byte[] newData = new byte[refData.length - (newPos - pos) + bytes.length];
						System.arraycopy(refData, 0, newData, 0, pos);
						System.arraycopy(bytes, 0, newData, pos, bytes.length);
						System.arraycopy(refData, newPos, newData, pos + bytes.length,
							refData.length - newPos);
						refData = newData;
					}
					updateRecord();
					return true;
				}
			}
			pos = newPos;
		}
		return false;
	}
Construct reference list for existing record
@param rec existing refList record
@param adapter entry record storage adapter
@param addrMap address map for encoding/decoding addresses
@param program may be null for upgrade in which 
		case resulting reference objects are not suitable for general use.
@param cache RefList object cache
@param isFrom true for from-adapter use, false for to-adapter use
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/RefListV0.java