Program: 37855
Project: 37855
Buggy source:
protected Message buildCheckMessage(CheckNotification notification) throws Exception {
  Message message=new MimeMessage(this.session){
    @Override protected void updateMessageID() throws MessagingException {
    }
  }
;
  message.setFrom(new InternetAddress(this.fromAddress));
  for (  ContactMO contact : notification.getTo()) {
    if ((!Util.isEmpty(contact.getEmail())) && contact.hasEngine(this.getName())) {
      message.addRecipient(RecipientType.TO,new InternetAddress(contact.getEmail()));
    }
  }
  if (notification instanceof SendAlert) {
    UUID alertId=((SendAlert)notification).getAlertId();
    if (alertId != null)     message.setHeader("String_Node_Str",alertId.toString());
    message.setHeader("String_Node_Str",this.messageId(alertId,"String_Node_Str"));
  }
 else   if (notification instanceof SendRecovery) {
    UUID alertId=((SendAlert)notification).getAlertId();
    if (alertId != null)     message.setHeader("String_Node_Str",alertId.toString());
    message.setHeader("String_Node_Str",this.messageId(alertId,"String_Node_Str"));
    String alertMessageId=this.messageId(alertId,"String_Node_Str");
    message.setHeader("String_Node_Str",alertMessageId);
    message.setHeader("String_Node_Str",alertMessageId);
  }
 else {
    message.setHeader("String_Node_Str",this.messageId(notification.getId(),notification.getNotificationType()));
  }
  message.setHeader("String_Node_Str",notification.getId().toString());
  message.setHeader("String_Node_Str",notification.getCheck().getType());
  message.setHeader("String_Node_Str",notification.getCheck().getId().toString());
  message.setHeader("String_Node_Str",notification.getCheck().getState().getStatus().toString());
  message.setSentDate(new Date(notification.getRaised()));
  this.buildCheckMessageContent(message,notification);
  return message;
}

Fixed version (ground truth):
protected Message buildCheckMessage(CheckNotification notification) throws Exception {
  Message message=new MimeMessage(this.session){
    @Override protected void updateMessageID() throws MessagingException {
    }
  }
;
  message.setFrom(new InternetAddress(this.fromAddress));
  for (  ContactMO contact : notification.getTo()) {
    if ((!Util.isEmpty(contact.getEmail())) && contact.hasEngine(this.getName())) {
      message.addRecipient(RecipientType.TO,new InternetAddress(contact.getEmail()));
    }
  }
  if (notification instanceof SendAlert) {
    UUID alertId=((SendAlert)notification).getAlertId();
    if (alertId != null)     message.setHeader("String_Node_Str",alertId.toString());
    message.setHeader("String_Node_Str",this.messageId(alertId,"String_Node_Str"));
  }
 else   if (notification instanceof SendRecovery) {
    UUID alertId=((SendRecovery)notification).getAlertId();
    if (alertId != null)     message.setHeader("String_Node_Str",alertId.toString());
    message.setHeader("String_Node_Str",this.messageId(alertId,"String_Node_Str"));
    String alertMessageId=this.messageId(alertId,"String_Node_Str");
    message.setHeader("String_Node_Str",alertMessageId);
    message.setHeader("String_Node_Str",alertMessageId);
  }
 else {
    message.setHeader("String_Node_Str",this.messageId(notification.getId(),notification.getNotificationType()));
  }
  message.setHeader("String_Node_Str",notification.getId().toString());
  message.setHeader("String_Node_Str",notification.getCheck().getType());
  message.setHeader("String_Node_Str",notification.getCheck().getId().toString());
  message.setHeader("String_Node_Str",notification.getCheck().getState().getStatus().toString());
  message.setSentDate(new Date(notification.getRaised()));
  this.buildCheckMessageContent(message,notification);
  return message;
}