Program: 91428
Project: 91428
Buggy source:
/** 
 * Used to acquire an object of type V from the Segment. <p/>  {@code usingValue} is reused to read the value if key is presentin this Segment, if key is absent in this Segment: <p/> <ol><li>If  {@code create == false}, just   {@code null} is returned(except when event listener provides a value "on get missing" - then it is put into this Segment for the key).</li> <p/> <li>If  {@code create == true},   {@code usingValue} or a newlycreated instance of value class, if  {@code usingValue == null}, is put into this Segment for the key.</li></ol>
 * @param keyBytes serialized {@code key}
 * @param hash2    a hash code related to the {@code keyBytes}
 * @return the value which is finally associated with the given key inthis Segment after execution of this method, or  {@code null}.
 */
V acquire(Bytes keyBytes,K key,V usingValue,int hash2,boolean create){
  lock();
  try {
    long keyLen=keyBytes.remaining();
    hashLookup.startSearch(hash2);
    int pos;
    while ((pos=hashLookup.nextPos()) >= 0) {
      long offset=offsetFromPos(pos);
      NativeBytes entry=entry(offset);
      if (!keyEqualsForAcquire(keyBytes,keyLen,entry))       continue;
      entry.skip(keyLen);
      V v=readValue(entry,usingValue);
      notifyGet(offset,key,v);
      return v;
    }
    if (create) {
      usingValue=createValueIfNull(usingValue);
    }
 else {
      if (usingValue instanceof Byteable)       ((Byteable)usingValue).bytes(null,0);
      usingValue=notifyMissed(keyBytes,key,usingValue);
      if (usingValue == null)       return null;
    }
    long offset=putEntryConsideringByteableValue(keyBytes,usingValue);
    incrementSize();
    notifyPut(offset,true,key,usingValue,pos);
    return usingValue;
  }
  finally {
    unlock();
  }
}

Fixed version (ground truth):
/** 
 * Used to acquire an object of type V from the Segment. <p/>  {@code usingValue} is reused to read the value if key is presentin this Segment, if key is absent in this Segment: <p/> <ol><li>If  {@code create == false}, just   {@code null} is returned(except when event listener provides a value "on get missing" - then it is put into this Segment for the key).</li> <p/> <li>If  {@code create == true},   {@code usingValue} or a newlycreated instance of value class, if  {@code usingValue == null}, is put into this Segment for the key.</li></ol>
 * @param keyBytes serialized {@code key}
 * @param hash2    a hash code related to the {@code keyBytes}
 * @return the value which is finally associated with the given key inthis Segment after execution of this method, or  {@code null}.
 */
V acquire(Bytes keyBytes,K key,V usingValue,int hash2,boolean create){
  lock();
  try {
    long keyLen=keyBytes.remaining();
    hashLookup.startSearch(hash2);
    for (int pos; (pos=hashLookup.nextPos()) >= 0; ) {
      long offset=offsetFromPos(pos);
      NativeBytes entry=entry(offset);
      if (!keyEqualsForAcquire(keyBytes,keyLen,entry))       continue;
      entry.skip(keyLen);
      V v=readValue(entry,usingValue);
      notifyGet(offset,key,v);
      return v;
    }
    if (create) {
      usingValue=createValueIfNull(usingValue);
    }
 else {
      if (usingValue instanceof Byteable)       ((Byteable)usingValue).bytes(null,0);
      usingValue=notifyMissed(keyBytes,key,usingValue);
      if (usingValue == null)       return null;
    }
    long offset=putEntryConsideringByteableValue(keyBytes,usingValue);
    incrementSize();
    notifyPut(offset,true,key,usingValue,posFromOffset(offset));
    return usingValue;
  }
  finally {
    unlock();
  }
}