Program: 188214
Project: 188214
Buggy source:
private void update(){
  dateEndedLabel.setVisible(job.getEndDate() != null);
  dateEnded.setVisible(job.getEndDate() != null);
  if (job.getEndDate() != null) {
    dateEnded.setText(dateTimeFormat.format(job.getEndDate()));
  }
  duration.setText(Humanize.durationInDHMS(job.getStartDate(),job.getEndDate(),DHMSFormat.LONG));
  status.setHTML(HtmlSnippetUtils.getJobStateHtml(job));
  boolean hasStateDetails=StringUtils.isNotBlank(job.getStateDetails());
  stateDetailsLabel.setVisible(hasStateDetails);
  stateDetailsValue.setVisible(hasStateDetails);
  if (hasStateDetails) {
    stateDetailsValue.setText(job.getStateDetails());
  }
  SafeHtmlBuilder b=new SafeHtmlBuilder();
  b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  b.append(messages.showJobProgressCompletionPercentage(job.getJobStats().getCompletionPercentage()));
  b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  if (job.getJobStats().getSourceObjectsCount() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressTotalCount(job.getJobStats().getSourceObjectsCount()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsProcessedWithSuccess() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressSuccessfulCount(job.getJobStats().getSourceObjectsProcessedWithSuccess()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsProcessedWithFailure() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressFailedCount(job.getJobStats().getSourceObjectsProcessedWithFailure()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsBeingProcessed() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressProcessingCount(job.getJobStats().getSourceObjectsBeingProcessed()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsWaitingToBeProcessed() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressWaitingCount(job.getJobStats().getSourceObjectsWaitingToBeProcessed()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  progress.setHTML(b.toSafeHtml());
  buttonStop.setText(messages.stopButton());
  buttonStop.setVisible(!job.isInFinalState());
  buttonStop.setEnabled(!job.isStopping());
  buttonAppraisal.setText(messages.appraisalTitle() + "String_Node_Str" + job.getJobStats().getOutcomeObjectsWithManualIntervention()+ "String_Node_Str");
  buttonAppraisal.setVisible(job.getJobStats().getOutcomeObjectsWithManualIntervention() > 0);
  scheduleUpdateStatus();
}

Fixed version (ground truth):
private void update(){
  dateEndedLabel.setVisible(job.getEndDate() != null);
  dateEnded.setVisible(job.getEndDate() != null);
  if (job.getEndDate() != null) {
    dateEnded.setText(Humanize.formatDateTime(job.getEndDate()));
  }
  duration.setText(Humanize.durationInDHMS(job.getStartDate(),job.getEndDate(),DHMSFormat.LONG));
  status.setHTML(HtmlSnippetUtils.getJobStateHtml(job));
  boolean hasStateDetails=StringUtils.isNotBlank(job.getStateDetails());
  stateDetailsLabel.setVisible(hasStateDetails);
  stateDetailsValue.setVisible(hasStateDetails);
  if (hasStateDetails) {
    stateDetailsValue.setText(job.getStateDetails());
  }
  SafeHtmlBuilder b=new SafeHtmlBuilder();
  b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  b.append(messages.showJobProgressCompletionPercentage(job.getJobStats().getCompletionPercentage()));
  b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  if (job.getJobStats().getSourceObjectsCount() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressTotalCount(job.getJobStats().getSourceObjectsCount()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsProcessedWithSuccess() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressSuccessfulCount(job.getJobStats().getSourceObjectsProcessedWithSuccess()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsProcessedWithFailure() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressFailedCount(job.getJobStats().getSourceObjectsProcessedWithFailure()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsBeingProcessed() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressProcessingCount(job.getJobStats().getSourceObjectsBeingProcessed()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  if (job.getJobStats().getSourceObjectsWaitingToBeProcessed() > 0) {
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
    b.append(messages.showJobProgressWaitingCount(job.getJobStats().getSourceObjectsWaitingToBeProcessed()));
    b.append(SafeHtmlUtils.fromSafeConstant("String_Node_Str"));
  }
  progress.setHTML(b.toSafeHtml());
  buttonStop.setText(messages.stopButton());
  buttonStop.setVisible(!job.isInFinalState());
  buttonStop.setEnabled(!job.isStopping());
  buttonAppraisal.setText(messages.appraisalTitle() + "String_Node_Str" + job.getJobStats().getOutcomeObjectsWithManualIntervention()+ "String_Node_Str");
  buttonAppraisal.setVisible(job.getJobStats().getOutcomeObjectsWithManualIntervention() > 0);
  scheduleUpdateStatus();
}