Program: 162952
Project: 162952
Buggy source:
private <KB,KBI,MKBI extends MetaBytesInterop<KB,? super KBI>,RV,VB extends RV,VBI,MVBI extends MetaBytesInterop<RV,? super VBI>>RV putWithoutLock(@Nullable ThreadLocalCopies copies,final @Nullable SegmentState segmentState,MKBI metaKeyInterop,KBI keyInterop,KB key,long keySize,InstanceOrBytesToInstance<KB,K> toKey,GetValueInterops<VB,VBI,MVBI> getValueInterops,VB value,InstanceOrBytesToInstance<? super VB,V> toValue,long hash2,boolean replaceIfPresent,ReadValue<RV> readValue,boolean resultUnused,byte identifier,long timestamp,boolean remote){
  MultiMap hashLookup=hashLookup();
  SearchState searchState=segmentState.searchState;
  hashLookup.startSearch(hash2,searchState);
  MultiStoreBytes entry=segmentState.tmpBytes;
  for (long pos; (pos=hashLookup.nextPos(searchState)) >= 0L; ) {
    long offset=offsetFromPos(pos);
    reuse(entry,offset);
    if (!keyEquals(keyInterop,metaKeyInterop,key,keySize,entry))     continue;
    entry.skip(keySize);
    final long timeStampPosAddr=entry.positionAddr();
    if (shouldIgnore(entry,timestamp,identifier)) {
      return null;
    }
    boolean isDeleted=entry.readBoolean();
    if (replaceIfPresent || isDeleted) {
      entry.positionAddr(timeStampPosAddr);
      entry.writeLong(timestamp);
      entry.writeByte(identifier);
      entry.writeBoolean(false);
      RV prevValue=replaceValueAndNotifyPut(copies,segmentState,key,keySize,toKey,getValueInterops,value,toValue,entry,pos,offset,hashLookup,readValue,resultUnused,isDeleted,remote);
      if (isDeleted) {
        incrementSize();
        hashLookup.putPosition(segmentState.pos);
      }
      if (resultUnused)       return null;
      return isDeleted ? readValue.readNull() : prevValue;
    }
 else {
      long valueSize=readValueSize(entry);
      return resultUnused ? null : readValue.readValue(copies,entry,null,valueSize);
    }
  }
  VBI valueInterop=getValueInterops.getValueInterop(copies);
  MVBI metaValueInterop=getValueInterops.getMetaValueInterop(copies,valueInterop,value);
  long valueSize=metaValueInterop.size(valueInterop,value);
  putEntry(segmentState,metaKeyInterop,keyInterop,key,keySize,metaValueInterop,valueInterop,value,entry,false);
  entry.position(segmentState.valueSizePos - ADDITIONAL_ENTRY_BYTES);
  entry.writeLong(timestamp);
  entry.writeByte(identifier);
  entry.writeBoolean(false);
  onPutMaybeRemote(segmentState.pos,remote);
  if (bytesEventListener != null)   bytesEventListener.onPut(entry,0L,metaDataBytes,segmentState.valueSizePos,true);
  if (eventListener != null)   eventListener.onPut(toKey.toInstance(copies,key,keySize),toValue.toInstance(copies,value,valueSize),null);
  return resultUnused ? null : readValue.readNull();
}

Fixed version (ground truth):
private <KB,KBI,MKBI extends MetaBytesInterop<KB,? super KBI>,RV,VB extends RV,VBI,MVBI extends MetaBytesInterop<RV,? super VBI>>RV putWithoutLock(@Nullable ThreadLocalCopies copies,final @Nullable SegmentState segmentState,MKBI metaKeyInterop,KBI keyInterop,KB key,long keySize,InstanceOrBytesToInstance<KB,K> toKey,GetValueInterops<VB,VBI,MVBI> getValueInterops,VB value,InstanceOrBytesToInstance<? super VB,V> toValue,long hash2,boolean replaceIfPresent,ReadValue<RV> readValue,boolean resultUnused,byte identifier,long timestamp,boolean remote){
}