Program: 37774
Project: 37774
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void execute(Tuple tuple){
  if (CtrlAction.boltHandlerEntrance(this,tuple))   return;
  logger.trace("String_Node_Str",flowCache);
  ComponentType componentId=ComponentType.valueOf(tuple.getSourceComponent());
  String correlationId=Utils.DEFAULT_CORRELATION_ID;
  StreamType streamId=null;
  String flowId=null;
  if (!componentId.equals(ComponentType.LCM_FLOW_SYNC_BOLT)) {
    streamId=StreamType.valueOf(tuple.getSourceStreamId());
    flowId=tuple.getStringByField(Utils.FLOW_ID);
  }
  try {
    logger.debug("String_Node_Str",tuple);
switch (componentId) {
case SPLITTER_BOLT:
      Message msg=(Message)tuple.getValueByField(AbstractTopology.MESSAGE_FIELD);
    correlationId=msg.getCorrelationId();
  CommandMessage cmsg=(msg instanceof CommandMessage) ? (CommandMessage)msg : null;
InfoMessage imsg=(msg instanceof InfoMessage) ? (InfoMessage)msg : null;
logger.info("String_Node_Str",Utils.CORRELATION_ID,correlationId,Utils.FLOW_ID,flowId,componentId,streamId);
switch (streamId) {
case CREATE:
handleCreateRequest(cmsg,tuple);
break;
case UPDATE:
handleUpdateRequest(cmsg,tuple);
break;
case DELETE:
handleDeleteRequest(flowId,cmsg,tuple);
break;
case PUSH:
handlePushRequest(flowId,imsg,tuple);
break;
case UNPUSH:
handleUnpushRequest(flowId,imsg,tuple);
break;
case PATH:
handlePathRequest(flowId,cmsg,tuple);
break;
case RESTORE:
handleRestoreRequest(cmsg,tuple);
break;
case REROUTE:
handleRerouteRequest(cmsg,tuple);
break;
case STATUS:
handleStatusRequest(flowId,cmsg,tuple);
break;
case CACHE_SYNC:
handleCacheSyncRequest(cmsg,tuple);
break;
case READ:
if (flowId != null) {
handleReadRequest(flowId,cmsg,tuple);
}
 else {
handleDumpRequest(cmsg,tuple);
}
break;
default :
logger.debug("String_Node_Str",componentId,streamId);
break;
}
break;
case SPEAKER_BOLT:
case TRANSACTION_BOLT:
FlowState newStatus=(FlowState)tuple.getValueByField(FlowTopology.STATUS_FIELD);
logger.info("String_Node_Str",flowId,newStatus,componentId,streamId);
switch (streamId) {
case STATUS:
handleStateRequest(flowId,newStatus,tuple);
break;
default :
logger.debug("String_Node_Str",componentId,streamId);
break;
}
break;
case TOPOLOGY_ENGINE_BOLT:
ErrorMessage errorMessage=(ErrorMessage)tuple.getValueByField(AbstractTopology.MESSAGE_FIELD);
logger.info("String_Node_Str",flowId,componentId,streamId);
switch (streamId) {
case STATUS:
handleErrorRequest(flowId,errorMessage,tuple);
break;
default :
logger.debug("String_Node_Str",componentId,streamId);
break;
}
break;
case LCM_FLOW_SYNC_BOLT:
logger.debug("String_Node_Str");
NetworkInfoData networkDump=(NetworkInfoData)tuple.getValueByField(LcmFlowCacheSyncBolt.FIELD_ID_NETWORK_DUMP);
handleFlowSync(networkDump);
break;
default :
logger.debug("String_Node_Str",componentId);
break;
}
}
 catch (CacheException exception) {
String logMessage=format("String_Node_Str",exception.getErrorMessage(),exception.getErrorDescription());
logger.error("String_Node_Str",logMessage,Utils.CORRELATION_ID,correlationId,Utils.FLOW_ID,flowId,componentId,streamId,exception);
ErrorMessage errorMessage=buildErrorMessage(correlationId,exception.getErrorType(),logMessage,componentId.toString().toLowerCase());
Values error=new Values(errorMessage,exception.getErrorType());
outputCollector.emit(StreamType.ERROR.toString(),tuple,error);
}
catch (IOException exception) {
logger.error("String_Node_Str",tuple,exception);
}
catch (Exception e) {
logger.error(String.format("String_Node_Str",getClass().getName()),e);
}
 finally {
logger.debug("String_Node_Str",tuple.getSourceComponent(),tuple.getSourceStreamId(),tuple);
outputCollector.ack(tuple);
}
logger.trace("String_Node_Str",flowCache);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void execute(Tuple tuple){
  if (CtrlAction.boltHandlerEntrance(this,tuple))   return;
  logger.trace("String_Node_Str",flowCache);
  ComponentType componentId=ComponentType.valueOf(tuple.getSourceComponent());
  String correlationId=Utils.DEFAULT_CORRELATION_ID;
  StreamType streamId=null;
  String flowId=null;
  if (!componentId.equals(ComponentType.LCM_FLOW_SYNC_BOLT)) {
    streamId=StreamType.valueOf(tuple.getSourceStreamId());
    flowId=tuple.getStringByField(Utils.FLOW_ID);
  }
  boolean isRecoverable=false;
  try {
    logger.debug("String_Node_Str",tuple);
switch (componentId) {
case SPLITTER_BOLT:
      Message msg=(Message)tuple.getValueByField(AbstractTopology.MESSAGE_FIELD);
    correlationId=msg.getCorrelationId();
  CommandMessage cmsg=(msg instanceof CommandMessage) ? (CommandMessage)msg : null;
InfoMessage imsg=(msg instanceof InfoMessage) ? (InfoMessage)msg : null;
logger.info("String_Node_Str",Utils.CORRELATION_ID,correlationId,Utils.FLOW_ID,flowId,componentId,streamId);
switch (streamId) {
case CREATE:
handleCreateRequest(cmsg,tuple);
break;
case UPDATE:
handleUpdateRequest(cmsg,tuple);
break;
case DELETE:
handleDeleteRequest(flowId,cmsg,tuple);
break;
case PUSH:
handlePushRequest(flowId,imsg,tuple);
break;
case UNPUSH:
handleUnpushRequest(flowId,imsg,tuple);
break;
case PATH:
handlePathRequest(flowId,cmsg,tuple);
break;
case RESTORE:
handleRestoreRequest(cmsg,tuple);
break;
case REROUTE:
handleRerouteRequest(cmsg,tuple);
break;
case STATUS:
handleStatusRequest(flowId,cmsg,tuple);
break;
case CACHE_SYNC:
handleCacheSyncRequest(cmsg,tuple);
break;
case READ:
if (flowId != null) {
handleReadRequest(flowId,cmsg,tuple);
}
 else {
handleDumpRequest(cmsg,tuple);
}
break;
default :
logger.debug("String_Node_Str",componentId,streamId);
break;
}
break;
case SPEAKER_BOLT:
case TRANSACTION_BOLT:
FlowState newStatus=(FlowState)tuple.getValueByField(FlowTopology.STATUS_FIELD);
logger.info("String_Node_Str",flowId,newStatus,componentId,streamId);
switch (streamId) {
case STATUS:
handleStateRequest(flowId,newStatus,tuple);
break;
default :
logger.debug("String_Node_Str",componentId,streamId);
break;
}
break;
case TOPOLOGY_ENGINE_BOLT:
ErrorMessage errorMessage=(ErrorMessage)tuple.getValueByField(AbstractTopology.MESSAGE_FIELD);
logger.info("String_Node_Str",flowId,componentId,streamId);
switch (streamId) {
case STATUS:
handleErrorRequest(flowId,errorMessage,tuple);
break;
default :
logger.debug("String_Node_Str",componentId,streamId);
break;
}
break;
case LCM_FLOW_SYNC_BOLT:
logger.debug("String_Node_Str");
NetworkInfoData networkDump=(NetworkInfoData)tuple.getValueByField(LcmFlowCacheSyncBolt.FIELD_ID_NETWORK_DUMP);
handleFlowSync(networkDump);
break;
default :
logger.debug("String_Node_Str",componentId);
break;
}
}
 catch (RecoverableException e) {
logger.error("String_Node_Str",e);
}
catch (CacheException exception) {
String logMessage=format("String_Node_Str",exception.getErrorMessage(),exception.getErrorDescription());
logger.error("String_Node_Str",logMessage,Utils.CORRELATION_ID,correlationId,Utils.FLOW_ID,flowId,componentId,streamId,exception);
ErrorMessage errorMessage=buildErrorMessage(correlationId,exception.getErrorType(),logMessage,componentId.toString().toLowerCase());
Values error=new Values(errorMessage,exception.getErrorType());
outputCollector.emit(StreamType.ERROR.toString(),tuple,error);
}
catch (IOException exception) {
logger.error("String_Node_Str",tuple,exception);
}
catch (Exception e) {
logger.error(String.format("String_Node_Str",getClass().getName()),e);
}
 finally {
logger.debug("String_Node_Str",tuple.getSourceComponent(),tuple.getSourceStreamId(),tuple);
if (isRecoverable) {
outputCollector.fail(tuple);
}
 else {
outputCollector.ack(tuple);
}
}
logger.trace("String_Node_Str",flowCache);
}