Program: 58776
Project: 58776
Buggy source:
protected Message createMessage(String content,EmailAddress fromEmailAddress,String relatedTo1Select,int relatedTo1SelectId,String relatedTo2Select,int relatedTo2SelectId,LocalDateTime sentDate,boolean sentByEmail,int statusSelect,String subject,int typeSelect,List<EmailAddress> replyToEmailAddressList,List<EmailAddress> toEmailAddressList,List<EmailAddress> ccEmailAddressList,List<EmailAddress> bccEmailAddressList,String addressBlock,int mediaTypeSelect){
  Set<EmailAddress> replyToEmailAddressSet=Sets.newHashSet(), bccEmailAddressSet=Sets.newHashSet(), toEmailAddressSet=Sets.newHashSet(), ccEmailAddressSet=Sets.newHashSet();
  if (mediaTypeSelect == MessageRepository.MEDIA_TYPE_EMAIL) {
    if (replyToEmailAddressSet != null) {
      replyToEmailAddressSet.addAll(bccEmailAddressList);
    }
    if (bccEmailAddressList != null) {
      bccEmailAddressSet.addAll(bccEmailAddressList);
    }
    if (toEmailAddressList != null) {
      toEmailAddressSet.addAll(toEmailAddressList);
    }
    if (ccEmailAddressList != null) {
      ccEmailAddressSet.addAll(ccEmailAddressList);
    }
  }
  MailAccount mailAccount=mailAccountService.getDefaultMailAccount();
  if (mailAccount != null) {
    mailAccount=mailAccountRepo.find(mailAccount.getId());
    content+="String_Node_Str" + mailAccountService.getSignature(mailAccount);
    log.debug("String_Node_Str",mailAccount);
  }
  Message message=new Message(typeSelect,subject,content,statusSelect,mediaTypeSelect,addressBlock,fromEmailAddress,replyToEmailAddressSet,toEmailAddressSet,ccEmailAddressSet,bccEmailAddressSet,sentByEmail,mailAccount);
  message.setRelatedTo1Select(relatedTo1Select);
  message.setRelatedTo1SelectId(relatedTo1SelectId);
  message.setRelatedTo2Select(relatedTo2Select);
  message.setRelatedTo2SelectId(relatedTo2SelectId);
  message.setSentDateT(sentDate);
  return message;
}

Fixed version (ground truth):
protected Message createMessage(String content,EmailAddress fromEmailAddress,String relatedTo1Select,int relatedTo1SelectId,String relatedTo2Select,int relatedTo2SelectId,LocalDateTime sentDate,boolean sentByEmail,int statusSelect,String subject,int typeSelect,List<EmailAddress> replyToEmailAddressList,List<EmailAddress> toEmailAddressList,List<EmailAddress> ccEmailAddressList,List<EmailAddress> bccEmailAddressList,String addressBlock,int mediaTypeSelect){
  Set<EmailAddress> replyToEmailAddressSet=Sets.newHashSet(), bccEmailAddressSet=Sets.newHashSet(), toEmailAddressSet=Sets.newHashSet(), ccEmailAddressSet=Sets.newHashSet();
  if (mediaTypeSelect == MessageRepository.MEDIA_TYPE_EMAIL) {
    if (replyToEmailAddressList != null) {
      replyToEmailAddressSet.addAll(replyToEmailAddressList);
    }
    if (bccEmailAddressList != null) {
      bccEmailAddressSet.addAll(bccEmailAddressList);
    }
    if (toEmailAddressList != null) {
      toEmailAddressSet.addAll(toEmailAddressList);
    }
    if (ccEmailAddressList != null) {
      ccEmailAddressSet.addAll(ccEmailAddressList);
    }
  }
  MailAccount mailAccount=mailAccountService.getDefaultMailAccount();
  if (mailAccount != null) {
    mailAccount=mailAccountRepo.find(mailAccount.getId());
    content+="String_Node_Str" + mailAccountService.getSignature(mailAccount);
    log.debug("String_Node_Str",mailAccount);
  }
  Message message=new Message(typeSelect,subject,content,statusSelect,mediaTypeSelect,addressBlock,fromEmailAddress,replyToEmailAddressSet,toEmailAddressSet,ccEmailAddressSet,bccEmailAddressSet,sentByEmail,mailAccount);
  message.setRelatedTo1Select(relatedTo1Select);
  message.setRelatedTo1SelectId(relatedTo1SelectId);
  message.setRelatedTo2Select(relatedTo2Select);
  message.setRelatedTo2SelectId(relatedTo2SelectId);
  message.setSentDateT(sentDate);
  return message;
}