Program: 89789
Project: 89789
Buggy source:
/** 
 * Print HTML formatted state for missing files 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 printMissingFileStateForReplica(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 activeBitPreservation=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(activeBitPreservation.getNumberOfFiles(replica),locale));
  out.println("String_Node_Str");
  out.println(I18N.getString(locale,"String_Node_Str") + "String_Node_Str" + HTMLUtils.localiseLong(activeBitPreservation.getNumberOfMissingFiles(replica),locale));
  if (activeBitPreservation.getNumberOfMissingFiles(replica) > 0) {
    out.print("String_Node_Str" + Constants.FILESTATUS_MISSING_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",activeBitPreservation.getDateForMissingFiles(replica)));
  out.println("String_Node_Str");
  out.println("String_Node_Str" + Constants.FILESTATUS_PAGE + "String_Node_Str"+ Constants.FIND_MISSING_FILES_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 missing files 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 printMissingFileStateForReplica(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 activeBitPreservation=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(activeBitPreservation.getNumberOfFiles(replica),locale));
  out.println("String_Node_Str");
  out.println(I18N.getString(locale,"String_Node_Str") + "String_Node_Str" + HTMLUtils.localiseLong(activeBitPreservation.getNumberOfMissingFiles(replica),locale));
  if (activeBitPreservation.getNumberOfMissingFiles(replica) > 0) {
    out.print("String_Node_Str" + Constants.FILESTATUS_MISSING_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 lastMissingFilesupdate=activeBitPreservation.getDateForMissingFiles(replica);
  if (lastMissingFilesupdate == null) {
    lastMissingFilesupdate=new Date(0);
  }
  out.println(I18N.getString(locale,"String_Node_Str",lastMissingFilesupdate));
  out.println("String_Node_Str");
  out.println("String_Node_Str" + Constants.FILESTATUS_PAGE + "String_Node_Str"+ Constants.FIND_MISSING_FILES_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");
}