Program: 175285
Project: 175285
Buggy source:
private LogOperation scanOneRecord(){
  skipHeader();
  byte operation=mappedByteBuffer.get(nextIndex + 1);
  LogOperation logOperation;
  skipKey();
  if (operation == U_OPERATION) {
    long prevKey=getNextLongForUpdate();
    if (nextIndex + primaryKeyDigitNum + 2 < mappedByteBuffer.limit() && mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 1) == '|' && (mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 2) == 's' || mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 2) == 'f' || mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 2) == 'l')) {
      nextIndex+=primaryKeyDigitNum + 1;
      logOperation=new UpdateOperation(prevKey);
      int localIndex=skipFieldName();
      skipField(localIndex);
      getNextBytesIntoTmp();
      ((UpdateOperation)logOperation).addData(localIndex,tmpBuffer);
    }
 else {
      long curKey=getNextLong();
      logOperation=new UpdateKeyOperation(prevKey,curKey);
    }
  }
 else   if (operation == I_OPERATION) {
    skipNull();
    logOperation=new InsertOperation(getNextLong());
    int localIndex=0;
    while (mappedByteBuffer.get(nextIndex + 1) != LINE_SPLITTER) {
      skipFieldForInsert(localIndex);
      skipNull();
      getNextBytesIntoTmp();
      ((InsertOperation)logOperation).addData(localIndex,tmpBuffer);
      localIndex++;
    }
  }
 else {
    logOperation=new DeleteOperation(getNextLong());
    skipNull();
    while (mappedByteBuffer.get(nextIndex + 1) != LINE_SPLITTER) {
      int localIndex=skipFieldName();
      skipField(localIndex);
      skipNull();
    }
  }
  nextIndex+=2;
  return logOperation;
}

Fixed version (ground truth):
private LogOperation scanOneRecord(){
  skipHeader();
  byte operation=mappedByteBuffer.get(nextIndex + 1);
  LogOperation logOperation=null;
  boolean flag=false;
  skipKey();
  if (operation == U_OPERATION) {
    long prevKey=getNextLongForUpdate();
    if (nextIndex + primaryKeyDigitNum + 2 < mappedByteBuffer.limit() && mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 1) == '|' && (mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 2) == 's' || mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 2) == 'f' || mappedByteBuffer.get(nextIndex + primaryKeyDigitNum + 2) == 'l')) {
      nextIndex+=primaryKeyDigitNum + 1;
      if (isKeyInRange(prevKey)) {
        flag=true;
        logOperation=new UpdateOperation(prevKey);
      }
      int localIndex=skipFieldName();
      skipField(localIndex);
      getNextBytesIntoTmp();
      if (flag)       ((UpdateOperation)logOperation).addData(localIndex,tmpBuffer);
    }
 else {
      long curKey=getNextLong();
      logOperation=new UpdateKeyOperation(prevKey,curKey);
    }
  }
 else   if (operation == I_OPERATION) {
    skipNull();
    long pk=getNextLong();
    if (isKeyInRange(pk)) {
      logOperation=new InsertOperation(pk);
      flag=true;
    }
    int localIndex=0;
    while (mappedByteBuffer.get(nextIndex + 1) != LINE_SPLITTER) {
      skipFieldForInsert(localIndex);
      skipNull();
      getNextBytesIntoTmp();
      if (flag)       ((InsertOperation)logOperation).addData(localIndex,tmpBuffer);
      localIndex++;
    }
  }
 else {
    long pk=getNextLong();
    if (isKeyInRange(pk)) {
      logOperation=new DeleteOperation(pk);
    }
    skipNull();
    while (mappedByteBuffer.get(nextIndex + 1) != LINE_SPLITTER) {
      int localIndex=skipFieldName();
      skipField(localIndex);
      skipNull();
    }
  }
  nextIndex+=2;
  return logOperation;
}