Program: 188568
Project: 188568
Buggy source:
@Override public Notification processNotification(ModelService model,final Notification notification){
  Notification processedNotification=new Notification(notification);
  try {
    List<String> recipients=notification.getRecipientUsers();
    String templatePath=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str");
    InputStream templateStream=RodaCoreFactory.getConfigurationFileAsStream(templatePath + templateName);
    String template=IOUtils.toString(templateStream,RodaConstants.DEFAULT_ENCODING);
    IOUtils.closeQuietly(templateStream);
    if (!scope.containsKey(FROM)) {
      scope.put(FROM,notification.getFromUser());
    }
    if (recipients.size() == 1) {
      scope.put(RECIPIENT,recipients.get(0));
    }
 else {
      scope.put(RECIPIENT,RodaConstants.NOTIFICATION_VARIOUS_RECIPIENT_USERS);
    }
    processedNotification.setBody(executeHandlebars(template,scope));
    scope.remove(RECIPIENT);
    ConfigurableEmailUtility emailUtility=new ConfigurableEmailUtility(notification.getFromUser(),notification.getSubject());
    for (    String recipient : recipients) {
      String modifiedBody=getUpdatedMessageBody(model,notification,recipient,template,scope);
      String host=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str");
      if (StringUtils.isNotBlank(host)) {
        LOGGER.debug("String_Node_Str");
        emailUtility.sendMail(recipient,modifiedBody);
        LOGGER.debug("String_Node_Str");
        processedNotification.setState(NOTIFICATION_STATE.COMPLETED);
      }
 else {
        processedNotification.setState(NOTIFICATION_STATE.FAILED);
        LOGGER.debug("String_Node_Str");
      }
    }
  }
 catch (  IOException|MessagingException e) {
    processedNotification.setState(NOTIFICATION_STATE.FAILED);
    LOGGER.debug("String_Node_Str",e.getMessage());
  }
  return processedNotification;
}

Fixed version (ground truth):
@Override public Notification processNotification(ModelService model,final Notification notification){
  Notification processedNotification=new Notification(notification);
  try {
    List<String> recipients=processedNotification.getRecipientUsers();
    String templatePath=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str");
    InputStream templateStream=RodaCoreFactory.getConfigurationFileAsStream(templatePath + templateName);
    String template=IOUtils.toString(templateStream,RodaConstants.DEFAULT_ENCODING);
    IOUtils.closeQuietly(templateStream);
    if (!scope.containsKey(FROM)) {
      scope.put(FROM,processedNotification.getFromUser());
    }
    if (recipients.size() == 1) {
      scope.put(RECIPIENT,recipients.get(0));
    }
 else {
      scope.put(RECIPIENT,RodaConstants.NOTIFICATION_VARIOUS_RECIPIENT_USERS);
    }
    processedNotification.setBody(executeHandlebars(template,scope));
    scope.remove(RECIPIENT);
    ConfigurableEmailUtility emailUtility=new ConfigurableEmailUtility(processedNotification.getFromUser(),processedNotification.getSubject());
    for (    String recipient : recipients) {
      String modifiedBody=getUpdatedMessageBody(model,notification,recipient,template,scope);
      String host=RodaCoreFactory.getRodaConfigurationAsString("String_Node_Str","String_Node_Str","String_Node_Str");
      if (StringUtils.isNotBlank(host)) {
        LOGGER.debug("String_Node_Str");
        emailUtility.sendMail(recipient,modifiedBody);
        LOGGER.debug("String_Node_Str");
        processedNotification.setState(NOTIFICATION_STATE.COMPLETED);
      }
 else {
        processedNotification.setState(NOTIFICATION_STATE.FAILED);
        LOGGER.debug("String_Node_Str");
      }
    }
  }
 catch (  IOException|MessagingException e) {
    processedNotification.setState(NOTIFICATION_STATE.FAILED);
    LOGGER.debug("String_Node_Str",e.getMessage());
  }
  return processedNotification;
}