Program: 89788
Project: 89788
Buggy source:
/** 
 * Print HTML formatted state for checksum errors on a given replica in a given locale.
 * @param out      The writer to write state to.
 * @param replica The replica to write state for.
 * @param locale   The locale to write state in.
 * @throws IOException On IO trouble writing state to the writer.
 */
public static void printChecksumErrorStateForReplica(JspWriter out,Replica replica,Locale locale) throws IOException {
  ArgumentNotValid.checkNotNull(out,"String_Node_Str");
  ArgumentNotValid.checkNotNull(replica,"String_Node_Str");
  ArgumentNotValid.checkNotNull(locale,"String_Node_Str");
  ActiveBitPreservation bitPreservation=ActiveBitPreservationFactory.getInstance();
  out.println(I18N.getString(locale,"String_Node_Str") + "String_Node_Str" + HTMLUtils.escapeHtmlValues(replica.getName())+ "String_Node_Str");
  out.println("String_Node_Str");
  out.println(I18N.getString(locale,"String_Node_Str") + "String_Node_Str" + HTMLUtils.localiseLong(bitPreservation.getNumberOfChangedFiles(replica),locale));
  if (bitPreservation.getNumberOfChangedFiles(replica) > 0) {
    out.print("String_Node_Str" + Constants.FILESTATUS_CHECKSUM_PAGE + "String_Node_Str"+ (Constants.BITARCHIVE_NAME_PARAM + "String_Node_Str" + HTMLUtils.encodeAndEscapeHTML(replica.getName()))+ "String_Node_Str");
    out.print(I18N.getString(locale,"String_Node_Str"));
    out.print("String_Node_Str");
  }
  out.println("String_Node_Str");
  out.println(I18N.getString(locale,"String_Node_Str",bitPreservation.getDateForChangedFiles(replica)));
  out.println("String_Node_Str");
  out.println("String_Node_Str" + Constants.FILESTATUS_PAGE + "String_Node_Str"+ Constants.CHECKSUM_PARAM+ "String_Node_Str"+ (Constants.BITARCHIVE_NAME_PARAM + "String_Node_Str" + HTMLUtils.encodeAndEscapeHTML(replica.getName()))+ "String_Node_Str"+ I18N.getString(locale,"String_Node_Str")+ "String_Node_Str");
  out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Print HTML formatted state for checksum errors on a given replica in a given locale.
 * @param out      The writer to write state to.
 * @param replica The replica to write state for.
 * @param locale   The locale to write state in.
 * @throws IOException On IO trouble writing state to the writer.
 */
public static void printChecksumErrorStateForReplica(JspWriter out,Replica replica,Locale locale) throws IOException {
  ArgumentNotValid.checkNotNull(out,"String_Node_Str");
  ArgumentNotValid.checkNotNull(replica,"String_Node_Str");
  ArgumentNotValid.checkNotNull(locale,"String_Node_Str");
  ActiveBitPreservation bitPreservation=ActiveBitPreservationFactory.getInstance();
  out.println(I18N.getString(locale,"String_Node_Str") + "String_Node_Str" + HTMLUtils.escapeHtmlValues(replica.getName())+ "String_Node_Str");
  out.println("String_Node_Str");
  out.println(I18N.getString(locale,"String_Node_Str") + "String_Node_Str" + HTMLUtils.localiseLong(bitPreservation.getNumberOfChangedFiles(replica),locale));
  if (bitPreservation.getNumberOfChangedFiles(replica) > 0) {
    out.print("String_Node_Str" + Constants.FILESTATUS_CHECKSUM_PAGE + "String_Node_Str"+ (Constants.BITARCHIVE_NAME_PARAM + "String_Node_Str" + HTMLUtils.encodeAndEscapeHTML(replica.getName()))+ "String_Node_Str");
    out.print(I18N.getString(locale,"String_Node_Str"));
    out.print("String_Node_Str");
  }
  out.println("String_Node_Str");
  Date lastChangedFilesupdate=bitPreservation.getDateForChangedFiles(replica);
  if (lastChangedFilesupdate == null) {
    lastChangedFilesupdate=new Date(0);
  }
  out.println(I18N.getString(locale,"String_Node_Str",lastChangedFilesupdate));
  out.println("String_Node_Str");
  out.println("String_Node_Str" + Constants.FILESTATUS_PAGE + "String_Node_Str"+ Constants.CHECKSUM_PARAM+ "String_Node_Str"+ (Constants.BITARCHIVE_NAME_PARAM + "String_Node_Str" + HTMLUtils.encodeAndEscapeHTML(replica.getName()))+ "String_Node_Str"+ I18N.getString(locale,"String_Node_Str")+ "String_Node_Str");
  out.println("String_Node_Str");
}