Program: 27478
Project: 27478
Buggy source:
public void onEvent(ValueEvent t,long l,boolean bln) throws Exception {
  LOG.debug("String_Node_Str");
  MessagingEvent evt=t.getEvent();
  if (evt instanceof PublishEvent) {
    processPublish((PublishEvent)evt);
  }
 else   if (evt instanceof StopEvent) {
    processStop();
  }
 else   if (evt instanceof DisconnectEvent) {
    DisconnectEvent disEvt=(DisconnectEvent)evt;
    String clientID=(String)disEvt.getSession().getAttribute(Constants.ATTR_CLIENTID);
    processDisconnect(disEvt.getSession(),clientID);
  }
 else   if (evt instanceof CleanInFlightEvent) {
    m_storageService.cleanInFlight(((CleanInFlightEvent)evt).getMsgId());
  }
 else   if (evt instanceof RepublishEvent) {
    processRepublish((RepublishEvent)evt);
  }
 else   if (evt instanceof ProtocolEvent) {
    IoSession session=((ProtocolEvent)evt).getSession();
    AbstractMessage message=((ProtocolEvent)evt).getMessage();
    if (message instanceof ConnectMessage) {
      processConnect(session,(ConnectMessage)message);
    }
 else     if (message instanceof PublishMessage) {
      PublishMessage pubMsg=(PublishMessage)message;
      PublishEvent pubEvt;
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      if (message.getQos() == QOSType.MOST_ONE) {
        pubEvt=new PublishEvent(pubMsg.getTopicName(),pubMsg.getQos(),pubMsg.getPayload(),pubMsg.isRetainFlag(),clientID,session);
      }
 else {
        pubEvt=new PublishEvent(pubMsg.getTopicName(),pubMsg.getQos(),pubMsg.getPayload(),pubMsg.isRetainFlag(),clientID,pubMsg.getMessageID(),session);
      }
      processPublish(pubEvt);
    }
 else     if (message instanceof DisconnectMessage) {
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      boolean cleanSession=(Boolean)session.getAttribute(Constants.CLEAN_SESSION);
      if (cleanSession) {
        processRemoveAllSubscriptions(clientID);
      }
      processDisconnect(session,clientID);
    }
 else     if (message instanceof UnsubscribeMessage) {
      UnsubscribeMessage unsubMsg=(UnsubscribeMessage)message;
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      processUnsubscribe(session,clientID,unsubMsg.topics(),unsubMsg.getMessageID());
    }
 else     if (message instanceof SubscribeMessage) {
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      boolean cleanSession=(Boolean)session.getAttribute(Constants.CLEAN_SESSION);
      processSubscribe(session,(SubscribeMessage)message,clientID,cleanSession);
    }
 else {
      throw new RuntimeException("String_Node_Str" + message);
    }
  }
 else   if (evt instanceof InitEvent) {
    processInit();
  }
}

Fixed version (ground truth):
public void onEvent(ValueEvent t,long l,boolean bln) throws Exception {
  MessagingEvent evt=t.getEvent();
  LOG.debug("String_Node_Str" + evt);
  if (evt instanceof PublishEvent) {
    processPublish((PublishEvent)evt);
  }
 else   if (evt instanceof StopEvent) {
    processStop();
  }
 else   if (evt instanceof DisconnectEvent) {
    DisconnectEvent disEvt=(DisconnectEvent)evt;
    String clientID=(String)disEvt.getSession().getAttribute(Constants.ATTR_CLIENTID);
    processDisconnect(disEvt.getSession(),clientID);
  }
 else   if (evt instanceof CleanInFlightEvent) {
    m_storageService.cleanInFlight(((CleanInFlightEvent)evt).getMsgId());
  }
 else   if (evt instanceof RepublishEvent) {
    processRepublish((RepublishEvent)evt);
  }
 else   if (evt instanceof ProtocolEvent) {
    IoSession session=((ProtocolEvent)evt).getSession();
    AbstractMessage message=((ProtocolEvent)evt).getMessage();
    if (message instanceof ConnectMessage) {
      processConnect(session,(ConnectMessage)message);
    }
 else     if (message instanceof PublishMessage) {
      PublishMessage pubMsg=(PublishMessage)message;
      PublishEvent pubEvt;
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      if (message.getQos() == QOSType.MOST_ONE) {
        pubEvt=new PublishEvent(pubMsg.getTopicName(),pubMsg.getQos(),pubMsg.getPayload(),pubMsg.isRetainFlag(),clientID,session);
      }
 else {
        pubEvt=new PublishEvent(pubMsg.getTopicName(),pubMsg.getQos(),pubMsg.getPayload(),pubMsg.isRetainFlag(),clientID,pubMsg.getMessageID(),session);
      }
      processPublish(pubEvt);
    }
 else     if (message instanceof DisconnectMessage) {
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      boolean cleanSession=(Boolean)session.getAttribute(Constants.CLEAN_SESSION);
      if (cleanSession) {
        processRemoveAllSubscriptions(clientID);
      }
      processDisconnect(session,clientID);
    }
 else     if (message instanceof UnsubscribeMessage) {
      UnsubscribeMessage unsubMsg=(UnsubscribeMessage)message;
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      processUnsubscribe(session,clientID,unsubMsg.topics(),unsubMsg.getMessageID());
    }
 else     if (message instanceof SubscribeMessage) {
      String clientID=(String)session.getAttribute(Constants.ATTR_CLIENTID);
      boolean cleanSession=(Boolean)session.getAttribute(Constants.CLEAN_SESSION);
      processSubscribe(session,(SubscribeMessage)message,clientID,cleanSession);
    }
 else {
      throw new RuntimeException("String_Node_Str" + message);
    }
  }
 else   if (evt instanceof InitEvent) {
    processInit();
  }
}