Program: 116699
Project: 116699
Buggy source:
@Override public void onMessage(Message message){
  TextMessage receivedMessage=(TextMessage)message;
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  try {
    String type=message.getStringProperty(Constants.EVENT_CLASS_NAME);
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str",type));
    }
    if (InstanceStartedEvent.class.getName().equals(type)) {
      String json=receivedMessage.getText();
      InstanceStartedEvent event=(InstanceStartedEvent)Util.jsonToObject(json,InstanceStartedEvent.class);
      String clusterId=event.getClusterId();
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + clusterId);
      }
      Set<CartridgeSubscription> cartridgeSubscriptions=new DataInsertionAndRetrievalManager().getCartridgeSubscription(clusterId);
      if (cartridgeSubscriptions == null || cartridgeSubscriptions.isEmpty()) {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + clusterId);
        }
        return;
      }
      for (      CartridgeSubscription cartridgeSubscription : cartridgeSubscriptions) {
        if (!cartridgeSubscription.getCartridgeInfo().getMultiTenant() && cartridgeSubscription.getRepository() != null) {
          InstanceNotificationPublisher publisher=new InstanceNotificationPublisher();
          publisher.sendArtifactUpdateEvent(cartridgeSubscription.getRepository(),clusterId,String.valueOf(cartridgeSubscription.getSubscriber().getTenantId()));
        }
 else {
          if (log.isDebugEnabled()) {
            log.debug("String_Node_Str" + cartridgeSubscription.getAlias() + "String_Node_Str"+ cartridgeSubscription.getType()+ "String_Node_Str");
          }
        }
      }
    }
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@Override public void onMessage(Message message){
  TextMessage receivedMessage=(TextMessage)message;
  if (log.isInfoEnabled()) {
    log.info("String_Node_Str");
  }
  try {
    String type=message.getStringProperty(Constants.EVENT_CLASS_NAME);
    if (log.isInfoEnabled()) {
      log.info(String.format("String_Node_Str",type));
    }
    if (InstanceStartedEvent.class.getName().equals(type)) {
      String json=receivedMessage.getText();
      InstanceStartedEvent event=(InstanceStartedEvent)Util.jsonToObject(json,InstanceStartedEvent.class);
      String clusterId=event.getClusterId();
      if (log.isInfoEnabled()) {
        log.info("String_Node_Str" + clusterId);
      }
      Set<CartridgeSubscription> cartridgeSubscriptions=new DataInsertionAndRetrievalManager().getCartridgeSubscriptionForCluster(clusterId);
      if (cartridgeSubscriptions == null || cartridgeSubscriptions.isEmpty()) {
        if (log.isDebugEnabled()) {
          log.debug("String_Node_Str" + clusterId);
        }
        return;
      }
      for (      CartridgeSubscription cartridgeSubscription : cartridgeSubscriptions) {
        if (!cartridgeSubscription.getCartridgeInfo().getMultiTenant() && cartridgeSubscription.getRepository() != null) {
          InstanceNotificationPublisher publisher=new InstanceNotificationPublisher();
          publisher.sendArtifactUpdateEvent(cartridgeSubscription.getRepository(),clusterId,String.valueOf(cartridgeSubscription.getSubscriber().getTenantId()));
        }
 else {
          if (log.isDebugEnabled()) {
            log.debug("String_Node_Str" + cartridgeSubscription.getAlias() + "String_Node_Str"+ cartridgeSubscription.getType()+ "String_Node_Str");
          }
        }
      }
    }
  }
 catch (  Exception e) {
    if (log.isErrorEnabled()) {
      log.error("String_Node_Str",e);
    }
  }
}