Program: 113753
Project: 113753
Buggy source:
private void assembleResponse(SelectionKey key,ServerConnection con){
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str");
  ONCRPCResponseHeader hdr=null;
  ReusableBuffer firstFragment=null;
  try {
    firstFragment=con.getResponseFragments().get(0);
    firstFragment.position(0);
    hdr=new ONCRPCResponseHeader();
    hdr.deserialize(firstFragment);
  }
 catch (  Exception ex) {
    if (Logging.isDebug()) {
      Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + con.getChannel().socket().getRemoteSocketAddress());
      Logging.logMessage(Logging.LEVEL_DEBUG,this,ex);
    }
    closeConnection(key,new IOException("String_Node_Str"));
    return;
  }
  final int xid=hdr.getXID();
  ONCRPCRequest rec=con.getRequest(xid);
  if (rec == null) {
    Logging.logMessage(Logging.LEVEL_WARN,this,"String_Node_Str" + xid);
    return;
  }
  rec.setResponseFragments(con.getResponseFragments());
  con.clearResponseFragments();
  if (hdr.getAcceptStat() == ONCRPCResponseHeader.ACCEPT_STAT_SUCCESS) {
    rec.getListener().responseAvailable(rec);
  }
 else {
    ONCRPCException exception=null;
    String exName=null;
    if (firstFragment.hasRemaining()) {
      try {
        final int exNameLen=firstFragment.getInt();
        final byte[] exBytes=new byte[exNameLen];
        firstFragment.get(exBytes);
        exName=new String(exBytes);
        if (exNameLen % 4 > 0) {
          for (int i=0; i < (4 - exNameLen % 4); i++) {
            firstFragment.get();
          }
        }
        exception=Exceptions.createException(exName);
        Serializable exAsSer=(Serializable)exception;
        exAsSer.deserialize(firstFragment);
      }
 catch (      IOException ex) {
        exName="String_Node_Str";
        rec.getListener().requestFailed(rec,new IOException("String_Node_Str"));
        return;
      }
    }
    if (exName == null) {
      exception=new ProtocolException(hdr.getAcceptStat(),0,"String_Node_Str");
    }
    if (Logging.isDebug()) {
      Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + exName + "String_Node_Str"+ exception);
    }
    rec.getListener().remoteExceptionThrown(rec,exception);
  }
}

Fixed version (ground truth):
private void assembleResponse(SelectionKey key,ServerConnection con){
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str");
  ONCRPCResponseHeader hdr=null;
  ReusableBuffer firstFragment=null;
  try {
    firstFragment=con.getResponseFragments().get(0);
    firstFragment.position(0);
    hdr=new ONCRPCResponseHeader();
    hdr.deserialize(firstFragment);
  }
 catch (  Exception ex) {
    if (Logging.isDebug()) {
      Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + con.getChannel().socket().getRemoteSocketAddress());
      Logging.logMessage(Logging.LEVEL_DEBUG,this,ex);
    }
    closeConnection(key,new IOException("String_Node_Str"));
    return;
  }
  final int xid=hdr.getXID();
  ONCRPCRequest rec=con.getRequest(xid);
  if (rec == null) {
    Logging.logMessage(Logging.LEVEL_WARN,this,"String_Node_Str" + xid);
    con.clearResponseFragments();
    return;
  }
  rec.setResponseFragments(con.getResponseFragments());
  con.clearResponseFragments();
  if (hdr.getAcceptStat() == ONCRPCResponseHeader.ACCEPT_STAT_SUCCESS) {
    rec.getListener().responseAvailable(rec);
  }
 else {
    ONCRPCException exception=null;
    String exName=null;
    if (firstFragment.hasRemaining()) {
      try {
        final int exNameLen=firstFragment.getInt();
        final byte[] exBytes=new byte[exNameLen];
        firstFragment.get(exBytes);
        exName=new String(exBytes);
        if (exNameLen % 4 > 0) {
          for (int i=0; i < (4 - exNameLen % 4); i++) {
            firstFragment.get();
          }
        }
        exception=Exceptions.createException(exName);
        Serializable exAsSer=(Serializable)exception;
        exAsSer.deserialize(firstFragment);
      }
 catch (      IOException ex) {
        exName="String_Node_Str";
        rec.getListener().requestFailed(rec,new IOException("String_Node_Str"));
        return;
      }
    }
    if (exName == null) {
      exception=new ProtocolException(hdr.getAcceptStat(),ErrNo.EINVAL,"String_Node_Str");
    }
    if (Logging.isDebug()) {
      Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + exName + "String_Node_Str"+ exception);
    }
    rec.getListener().remoteExceptionThrown(rec,exception);
  }
}