@Override
	public DBTraceReference getReference(long snap, Address fromAddress, Address toAddress,
			int operandIndex) {
		try (LockHold hold = LockHold.lock(lock.readLock())) {
			for (DBTraceReferenceEntry entry : referenceMapSpace.reduce(
				TraceAddressSnapRangeQuery.at(fromAddress, snap)).values()) {
				if (!toAddress.equals(entry.toAddress)) {
					continue;
				}
				if (entry.opIndex != operandIndex) {
					continue;
				}
				return entry.ref;
			}
			return null;
		}
	}
A reference entry

<p>
Version history:
<ul>
<li>1: Change {@link #toAddress} to 10-byte fixed encoding</li>
<li>0: Initial version and previous unversioned implementation</li>
</ul>
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/symbol/DBTraceReferenceSpace.java