Program: 155022
Project: 155022
Buggy source:
private boolean getMessage(){
  if (!acquireReadBuffer()) {
    return false;
  }
  try {
    buffer.limit(17);
    int read=connection.read();
    if (read == 17) {
      buffer.flip();
      byte request=buffer.get();
      if (request != HeaderConstants.OFFER_LOG) {
        log("String_Node_Str" + request);
        close();
        return true;
      }
      long version=buffer.getLong();
      if (version < xaDs.getCurrentLogVersion()) {
        log("String_Node_Str" + version + "String_Node_Str");
        setStatus(Status.SETUP_NOT_OK);
        return true;
      }
      logLength=buffer.getLong();
      log("String_Node_Str" + version + "String_Node_Str"+ logLength);
      if (!xaDs.hasLogicalLog(version)) {
        try {
          logVersionWriting=version;
          do {
            tempFile=new File(xaDs.getName() + "String_Node_Str" + Long.toString(version)+ "String_Node_Str"+ r.nextLong());
          }
 while (tempFile.exists());
          logToWrite=new RandomAccessFile(tempFile,"String_Node_Str").getChannel();
          logToWrite.truncate(0);
        }
 catch (        IOException e) {
          close();
          throw new SocketException("String_Node_Str" + version + "String_Node_Str",e);
        }
        setStatus(Status.SETUP_OK);
      }
 else {
        log("String_Node_Str" + version + "String_Node_Str");
        setStatus(Status.SETUP_NOT_OK);
      }
      retries=0;
      return true;
    }
 else {
      if (read > 0) {
        connection.pushBackAllReadData();
      }
      return false;
    }
  }
  finally {
    releaseReadBuffer();
  }
}

Fixed version (ground truth):
private boolean getMessage(){
  if (!acquireReadBuffer()) {
    return false;
  }
  try {
    buffer.limit(17);
    int read=connection.read();
    if (read == 17) {
      buffer.flip();
      byte request=buffer.get();
      if (request != HeaderConstants.OFFER_LOG) {
        log("String_Node_Str" + request);
        close();
        return true;
      }
      long version=buffer.getLong();
      if (version < xaDs.getCurrentLogVersion()) {
        log("String_Node_Str" + version + "String_Node_Str");
        setStatus(Status.SETUP_NOT_OK);
        return true;
      }
      if (version > masterVersion) {
        masterVersion=version;
      }
      logLength=buffer.getLong();
      log("String_Node_Str" + version + "String_Node_Str"+ logLength);
      if (!xaDs.hasLogicalLog(version)) {
        try {
          logVersionWriting=version;
          do {
            tempFile=new File(xaDs.getName() + "String_Node_Str" + Long.toString(version)+ "String_Node_Str"+ r.nextLong());
          }
 while (tempFile.exists());
          logToWrite=new RandomAccessFile(tempFile,"String_Node_Str").getChannel();
          logToWrite.truncate(0);
        }
 catch (        IOException e) {
          close();
          throw new SocketException("String_Node_Str" + version + "String_Node_Str",e);
        }
        setStatus(Status.SETUP_OK);
      }
 else {
        log("String_Node_Str" + version + "String_Node_Str");
        setStatus(Status.SETUP_NOT_OK);
      }
      retries=0;
      return true;
    }
 else {
      if (read > 0) {
        connection.pushBackAllReadData();
      }
      return false;
    }
  }
  finally {
    releaseReadBuffer();
  }
}