Program: 16765
Project: 16765
Buggy source:
@Override @Auditable @Transactional(readOnly=false) public Poll create(final Poll resource){
  Calendar date=Calendar.getInstance();
  Poll poll=new Poll();
  poll.setAuthor(resource.getAuthor());
  poll.setBody(resource.getBody());
  poll.setTopic(resource.getTopic());
  poll.setCreationDate(date.getTime());
  poll.setAnswers(new ArrayList<Answer>());
  for (int i=0; i < resource.getAnswers().size(); i++) {
    Answer a=resource.getAnswers().get(i);
    Answer answer=new Answer();
    answer.setBody(a.getBody());
    answer.setOrder(i + 1);
    answer.setPoll(poll);
    poll.getAnswers().add(answer);
  }
  if (resource.getIllustration() != null && !"String_Node_Str".equals(resource.getIllustration())) {
    poll.setIllustration(resource.getIllustration());
    String tmpdir=System.getProperty("String_Node_Str");
    String illustrationDir=new StringBuilder(dataDirPath).append(File.separator).append("String_Node_Str").toString();
    String illustrationLocation=new StringBuilder(illustrationDir).append(File.separator).append(resource.getIllustration()).toString();
    String tmpFileLocation=new StringBuilder(tmpdir).append(File.separator).append("String_Node_Str").append(resource.getIllustration()).append("String_Node_Str").toString();
    try {
      FileTools.copy(tmpFileLocation,illustrationLocation);
      LOG.debug("String_Node_Str",illustrationLocation);
    }
 catch (    IOException ex) {
      LOG.error("String_Node_Str",ex);
    }
  }
  if (resource.getExpirationDate() == null) {
    date.add(Calendar.MONTH,1);
    poll.setExpirationDate(date.getTime());
  }
 else {
    poll.setExpirationDate(resource.getExpirationDate());
  }
  return super.create(poll);
}

Fixed version (ground truth):
@Override @Transactional(readOnly=false) public Poll create(final Poll resource){
  Calendar date=Calendar.getInstance();
  Poll poll=new Poll();
  poll.setAuthor(resource.getAuthor());
  poll.setBody(resource.getBody());
  poll.setTopic(resource.getTopic());
  poll.setCreationDate(date.getTime());
  poll.setAnswers(new ArrayList<Answer>());
  for (int i=0; i < resource.getAnswers().size(); i++) {
    Answer a=resource.getAnswers().get(i);
    Answer answer=new Answer();
    answer.setBody(a.getBody());
    answer.setOrder(i + 1);
    answer.setPoll(poll);
    poll.getAnswers().add(answer);
  }
  if (resource.getIllustration() != null && !"String_Node_Str".equals(resource.getIllustration())) {
    poll.setIllustration(resource.getIllustration());
    String tmpdir=System.getProperty("String_Node_Str");
    String illustrationDir=new StringBuilder(dataDirPath).append(File.separator).append("String_Node_Str").toString();
    String illustrationLocation=new StringBuilder(illustrationDir).append(File.separator).append(resource.getIllustration()).toString();
    String tmpFileLocation=new StringBuilder(tmpdir).append(File.separator).append("String_Node_Str").append(resource.getIllustration()).append("String_Node_Str").toString();
    try {
      FileTools.copy(tmpFileLocation,illustrationLocation);
      LOG.debug("String_Node_Str",illustrationLocation);
    }
 catch (    IOException ex) {
      LOG.error("String_Node_Str",ex);
    }
  }
  if (resource.getExpirationDate() == null) {
    date.add(Calendar.MONTH,1);
    poll.setExpirationDate(date.getTime());
  }
 else {
    poll.setExpirationDate(resource.getExpirationDate());
  }
  return super.create(poll);
}