Program: 63469
Project: 63469
Buggy source:
protected void processMessage(Session nettySession,Message message){
  logDebug(nettySession,null,"String_Node_Str");
  quickfix.Session quickfixSession=getQuickFixSession(nettySession,message);
  if (quickfixSession == null) {
    return;
  }
  try {
    FIXMessageData fixMessageData=(FIXMessageData)message;
    quickfixSession.getState().logIncoming(fixMessageData.toString());
    DataDictionary dataDictionary=quickfixSession.getDataDictionary();
    quickfix.Message fixMessage=fixMessageData.parse(dataDictionary);
    try {
      if (fixMessage.getHeader().getString(MsgType.FIELD).equals(MsgType.LOGON)) {
        if (quickfixSession.isLoggedOn()) {
          for (long i=0; i < logonPollingTimeout && quickfixSession.isLoggedOn(); i+=logonPollingPeriod) {
            Thread.sleep(logonPollingPeriod);
          }
          if (quickfixSession.isLoggedOn()) {
            logError(nettySession,quickfixSession.getSessionID(),"String_Node_Str",null);
            nettySession.close();
            return;
          }
        }
        if (fixMessage.isSetField(HeartBtInt.FIELD)) {
          int heartbeatInterval=fixMessage.getInt(HeartBtInt.FIELD);
          nettySession.getConfig().setIdleTime(heartbeatInterval);
          quickfixSession.getState().setHeartBeatInterval(heartbeatInterval);
          if (log.isDebugEnabled()) {
            logDebug(nettySession,quickfixSession.getSessionID(),"String_Node_Str" + heartbeatInterval);
          }
        }
        quickfixSessionForNettySession.put(nettySession,quickfixSession);
        ResponderAdapter responderAdapter=new ResponderAdapter(nettySession);
        quickfixSession.setResponder(responderAdapter);
        logDebug(nettySession,quickfixSession.getSessionID(),"String_Node_Str");
      }
      quickfixSession.next(fixMessage);
    }
 catch (    Throwable e) {
      quickfix.Log sessionLog=quickfixSession.getLog();
      LogUtil.logThrowable(sessionLog,"String_Node_Str",e);
      if (fixMessageData.isLogon()) {
        try {
          quickfixSession.disconnect();
        }
 catch (        IOException ioException) {
          LogUtil.logThrowable(sessionLog,"String_Node_Str",ioException);
        }
      }
    }
  }
 catch (  InvalidMessage e) {
    LogUtil.logThrowable(quickfixSession.getLog(),"String_Node_Str",e);
  }
}

Fixed version (ground truth):
protected void processMessage(Session nettySession,Message message){
  logDebug(nettySession,null,"String_Node_Str");
  quickfix.Session quickfixSession=getQuickFixSession(nettySession,message);
  if (quickfixSession == null) {
    return;
  }
  try {
    FIXMessageData fixMessageData=(FIXMessageData)message;
    quickfixSession.getState().logIncoming(fixMessageData.toString());
    DataDictionary dataDictionary=quickfixSession.getDataDictionary();
    fixMessageData.setSession(quickfixSession);
    quickfix.Message fixMessage=fixMessageData.parse(dataDictionary);
    try {
      if (fixMessage.getHeader().getString(MsgType.FIELD).equals(MsgType.LOGON)) {
        if (quickfixSession.isLoggedOn()) {
          for (long i=0; i < logonPollingTimeout && quickfixSession.isLoggedOn(); i+=logonPollingPeriod) {
            Thread.sleep(logonPollingPeriod);
          }
          if (quickfixSession.isLoggedOn()) {
            logError(nettySession,quickfixSession.getSessionID(),"String_Node_Str",null);
            nettySession.close();
            return;
          }
        }
        if (fixMessage.isSetField(HeartBtInt.FIELD)) {
          int heartbeatInterval=fixMessage.getInt(HeartBtInt.FIELD);
          nettySession.getConfig().setIdleTime(heartbeatInterval);
          quickfixSession.getState().setHeartBeatInterval(heartbeatInterval);
          if (log.isDebugEnabled()) {
            logDebug(nettySession,quickfixSession.getSessionID(),"String_Node_Str" + heartbeatInterval);
          }
        }
        quickfixSessionForNettySession.put(nettySession,quickfixSession);
        ResponderAdapter responderAdapter=new ResponderAdapter(nettySession);
        quickfixSession.setResponder(responderAdapter);
        logDebug(nettySession,quickfixSession.getSessionID(),"String_Node_Str");
      }
      quickfixSession.next(fixMessage);
    }
 catch (    Throwable e) {
      quickfix.Log sessionLog=quickfixSession.getLog();
      LogUtil.logThrowable(sessionLog,"String_Node_Str",e);
      if (fixMessageData.isLogon()) {
        try {
          quickfixSession.disconnect();
        }
 catch (        IOException ioException) {
          LogUtil.logThrowable(sessionLog,"String_Node_Str",ioException);
        }
      }
    }
  }
 catch (  InvalidMessage e) {
    LogUtil.logThrowable(quickfixSession.getLog(),"String_Node_Str",e);
  }
}