Program: 72348
Project: 72348
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][bNumberOfLines];
  for (int aIndex=1; aIndex < aNumberOfLines; aIndex++) {
    for (int bIndex=1; bIndex < bNumberOfLines; bIndex++) {
      if (aStringSplit[aIndex].equals(bStringSplit[bIndex])) {
        lcs[aIndex][bIndex]=lcs[aIndex - 1][bIndex - 1] + 1;
      }
 else {
        lcs[aIndex][bIndex]=Math.max(lcs[aIndex][bIndex - 1],lcs[aIndex - 1][bIndex]);
      }
    }
  }
  StringBuffer result=new StringBuffer();
  int aIndex=0;
  int bIndex=0;
  while (aIndex < aNumberOfLines && bIndex < bNumberOfLines) {
    if (aStringSplit[aIndex].equals(bStringSplit[bIndex])) {
      aIndex++;
      bIndex++;
    }
 else     if (lcs[aIndex + 1][bIndex] < lcs[aIndex][bIndex + 1]) {
      result.append("String_Node_Str" + bStringSplit[bIndex++] + systemEol);
    }
 else {
      result.append("String_Node_Str" + aStringSplit[aIndex++] + systemEol);
    }
  }
  while (aIndex < aNumberOfLines || bIndex < bNumberOfLines) {
    if (aIndex == aNumberOfLines) {
      result.append("String_Node_Str" + bStringSplit[bIndex++] + systemEol);
    }
 else     if (bIndex == bNumberOfLines) {
      result.append("String_Node_Str" + aStringSplit[aIndex++] + 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 aIndex=1; aIndex < aNumberOfLines; aIndex++) {
    for (int bIndex=1; bIndex < bNumberOfLines; bIndex++) {
      if (aStringSplit[aIndex].equals(bStringSplit[bIndex])) {
        lcs[aIndex][bIndex]=lcs[aIndex - 1][bIndex - 1] + 1;
      }
 else {
        lcs[aIndex][bIndex]=Math.max(lcs[aIndex][bIndex - 1],lcs[aIndex - 1][bIndex]);
      }
    }
  }
  StringBuffer result=new StringBuffer();
  int aIndex=0;
  int bIndex=0;
  while (aIndex < aNumberOfLines && bIndex < bNumberOfLines) {
    if (aStringSplit[aIndex].equals(bStringSplit[bIndex])) {
      aIndex++;
      bIndex++;
    }
 else     if (lcs[aIndex + 1][bIndex] < lcs[aIndex][bIndex + 1]) {
      result.append("String_Node_Str" + bStringSplit[bIndex++] + systemEol);
    }
 else {
      result.append("String_Node_Str" + aStringSplit[aIndex++] + systemEol);
    }
  }
  while (aIndex < aNumberOfLines || bIndex < bNumberOfLines) {
    if (aIndex == aNumberOfLines) {
      result.append("String_Node_Str" + bStringSplit[bIndex++] + systemEol);
    }
 else     if (bIndex == bNumberOfLines) {
      result.append("String_Node_Str" + aStringSplit[aIndex++] + systemEol);
    }
  }
  return result.toString();
}