Program: 72349
Project: 72349
Buggy source:
/** 
 * Return the difference between two strings.
 * @param aString The first string to be compared.
 * @param bString The secondString to be compared
 * @return A string describing the difference between the twostrings in a format similar to the Unix diff command.
 */
public static String diff(String aString,String bString){
  String systemEol=System.getProperty("String_Node_Str");
  String eol="String_Node_Str";
  String[] aStringSplit=aString.split(eol);
  String[] bStringSplit=bString.split(eol);
  int aNumberOfLines=aStringSplit.length;
  int bNumberOfLines=bStringSplit.length;
  int[][] lcs=new int[aNumberOfLines + 1][bNumberOfLines + 1];
  for (int i=aNumberOfLines - 1; i >= 0; i--) {
    for (int j=bNumberOfLines - 1; j >= 0; j--) {
      if (aStringSplit[i].equals(bStringSplit[j])) {
        lcs[i][j]=lcs[i + 1][j + 1] + 1;
      }
 else {
        lcs[i][j]=Math.max(lcs[i + 1][j],lcs[i][j + 1]);
      }
    }
  }
  StringBuffer result=new StringBuffer();
  int i=0, j=0;
  while (i < aNumberOfLines && j < bNumberOfLines) {
    if (aStringSplit[i].equals(bStringSplit[j])) {
      i++;
      j++;
    }
 else     if (lcs[i + 1][j] >= lcs[i][j + 1]) {
      result.append("String_Node_Str" + aStringSplit[i++] + systemEol);
    }
 else {
      result.append("String_Node_Str" + bStringSplit[j++] + systemEol);
    }
  }
  while (i < aNumberOfLines || j < bNumberOfLines) {
    if (i == aNumberOfLines) {
      result.append("String_Node_Str" + aStringSplit[j++] + systemEol);
    }
 else     if (j == bNumberOfLines) {
      result.append("String_Node_Str" + bStringSplit[i++] + systemEol);
    }
  }
  return result.toString();
}

Fixed version (ground truth):
/** 
 * Return the difference between two strings.
 * @param aString The first string to be compared.
 * @param bString The secondString to be compared
 * @return A string describing the difference between the twostrings in a format similar to the Unix diff command.
 */
public static String diff(String aString,String bString){
  String systemEol=System.getProperty("String_Node_Str");
  String eol="String_Node_Str";
  String[] aStringSplit=aString.split(eol);
  String[] bStringSplit=bString.split(eol);
  int aNumberOfLines=aStringSplit.length;
  int bNumberOfLines=bStringSplit.length;
  int[][] lcs=new int[aNumberOfLines + 1][bNumberOfLines + 1];
  for (int i=aNumberOfLines - 1; i >= 0; i--) {
    for (int j=bNumberOfLines - 1; j >= 0; j--) {
      if (aStringSplit[i].equals(bStringSplit[j])) {
        lcs[i][j]=lcs[i + 1][j + 1] + 1;
      }
 else {
        lcs[i][j]=Math.max(lcs[i + 1][j],lcs[i][j + 1]);
      }
    }
  }
  StringBuffer result=new StringBuffer();
  int i=0, j=0;
  while (i < aNumberOfLines && j < bNumberOfLines) {
    if (aStringSplit[i].equals(bStringSplit[j])) {
      i++;
      j++;
    }
 else     if (lcs[i + 1][j] >= lcs[i][j + 1]) {
      result.append("String_Node_Str" + aStringSplit[i++] + systemEol);
    }
 else {
      result.append("String_Node_Str" + bStringSplit[j++] + systemEol);
    }
  }
  while (i < aNumberOfLines || j < bNumberOfLines) {
    if (i == aNumberOfLines) {
      result.append("String_Node_Str" + bStringSplit[j++] + systemEol);
    }
 else     if (j == bNumberOfLines) {
      result.append("String_Node_Str" + aStringSplit[i++] + systemEol);
    }
  }
  return result.toString();
}