Program: 10350
Project: 10350
Buggy source:
public byte[] lookup(byte[] id,long partitionId,boolean callback) throws Exception {
  lookupRequests.mark();
  final Timer.Context context=lookupTimer.time();
  try {
    if (doNothing)     return null;
    StorePartition storePartition=PistachiosServer.storePartitionMap.get(partitionId);
    if (storePartition == null) {
      logger.info("String_Node_Str",partitionId,Joiner.on(',').withKeyValueSeparator("String_Node_Str").join(PistachiosServer.storePartitionMap));
      throw new Exception("String_Node_Str");
    }
    KeyValue toRetrun=storePartition.getFromWriteCache(id);
    if (toRetrun != null && toRetrun.op != Operator.DELETE) {
      logger.debug("String_Node_Str");
      return null;
    }
 else     if (toRetrun != null) {
      logger.debug("String_Node_Str");
      if (callback) {
        LookupCallback lookupCallback=LookupCallbackRegistry.getInstance().getLookupCallback();
        return lookupCallback.onLookup(toRetrun.key,toRetrun.value);
      }
      return toRetrun.value;
    }
    byte[] toRet=PistachiosServer.getInstance().getLocalStorageEngine().get(id,(int)partitionId);
    if (null != toRet) {
      Input input=new Input(toRet);
      ValueOffset valueOffset=kryo.readObject(input,ValueOffset.class);
      input.close();
      logger.debug("String_Node_Str",toRet,valueOffset.value,valueOffset.offset);
      if (callback) {
        LookupCallback lookupCallback=LookupCallbackRegistry.getInstance().getLookupCallback();
        return lookupCallback.onLookup(toRetrun.key,valueOffset.value);
      }
      return valueOffset.value;
    }
    logger.info("String_Node_Str",id);
    return null;
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",DefaultDataInterpreter.getDataInterpreter().interpretId(id),e);
    lookupFailureRequests.mark();
    throw e;
  }
 finally {
    context.stop();
  }
}

Fixed version (ground truth):
public byte[] lookup(byte[] id,long partitionId,boolean callback) throws Exception {
  lookupRequests.mark();
  final Timer.Context context=lookupTimer.time();
  try {
    if (doNothing)     return null;
    StorePartition storePartition=PistachiosServer.storePartitionMap.get(partitionId);
    if (storePartition == null) {
      logger.info("String_Node_Str",partitionId,Joiner.on(',').withKeyValueSeparator("String_Node_Str").join(PistachiosServer.storePartitionMap));
      throw new Exception("String_Node_Str");
    }
    KeyValue toRetrun=storePartition.getFromWriteCache(id);
    if (toRetrun != null && toRetrun.op != Operator.DELETE) {
      logger.debug("String_Node_Str");
      return null;
    }
 else     if (toRetrun != null) {
      logger.debug("String_Node_Str");
      if (callback) {
        LookupCallback lookupCallback=LookupCallbackRegistry.getInstance().getLookupCallback();
        return lookupCallback.onLookup(toRetrun.key,toRetrun.value);
      }
      return toRetrun.value;
    }
    byte[] toRet=PistachiosServer.getInstance().getLocalStorageEngine().get(id,(int)partitionId);
    if (null != toRet) {
      Input input=new Input(toRet);
      ValueOffset valueOffset=kryo.readObject(input,ValueOffset.class);
      input.close();
      logger.debug("String_Node_Str",toRet,valueOffset.value,valueOffset.offset);
      if (callback) {
        LookupCallback lookupCallback=LookupCallbackRegistry.getInstance().getLookupCallback();
        return lookupCallback.onLookup(id,valueOffset.value);
      }
      return valueOffset.value;
    }
    logger.info("String_Node_Str",id);
    return null;
  }
 catch (  Exception e) {
    logger.info("String_Node_Str",DefaultDataInterpreter.getDataInterpreter().interpretId(id),e);
    lookupFailureRequests.mark();
    throw e;
  }
 finally {
    context.stop();
  }
}