Program: 101614
Project: 101614
Buggy source:
/** 
 * Does a substring of shortText exist within longText such that the substring is at least half the length of longText?
 * @param longText Longer string
 * @param shortText Shorter string
 * @param startIndex Start index of quarter length substring within longText
 * @return Five element String array, containing the prefix of longText, thesuffix of longText, the prefix of shortText, the suffix of shortText and the common middle.  Or null if there was no match.
 */
private static CommonMiddle halfMatch(final String longText,final String shortText,final int startIndex){
  String seed=longText.substring(startIndex,startIndex + (longText.length() / 4));
  int j=-1;
  String bestCommon="String_Node_Str";
  String bestLongTextA="String_Node_Str";
  String bestLongTextB="String_Node_Str";
  String bestShortTextA="String_Node_Str";
  String bestShortTextB="String_Node_Str";
  while ((j=shortText.indexOf(seed,j + 1)) != -1) {
    int prefixLength=Commonality.prefix(longText.substring(startIndex),shortText.substring(j));
    int suffixLength=Commonality.suffix(longText.substring(0,startIndex),shortText.substring(0,j));
    if (bestCommon.length() < (prefixLength + suffixLength)) {
      bestCommon=shortText.substring(j - suffixLength,j) + shortText.substring(j,j + prefixLength);
      bestLongTextA=longText.substring(0,startIndex - suffixLength);
      bestLongTextB=longText.substring(startIndex + prefixLength);
      bestShortTextA=shortText.substring(0,j - suffixLength);
      bestShortTextB=shortText.substring(j + prefixLength);
    }
  }
  if (bestCommon.length() >= longText.length() / 2) {
    return new CommonMiddle(bestLongTextA,bestLongTextB,bestCommon,bestShortTextA,bestShortTextB);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Does a substring of shortText exist within longText such that the substring is at least half the length of longText?
 * @param longText Longer string
 * @param shortText Shorter string
 * @param startIndex Start index of quarter length substring within longText
 * @return Five element String array, containing the prefix of longText, thesuffix of longText, the prefix of shortText, the suffix of shortText and the common middle.  Or null if there was no match.
 */
private static CommonMiddle halfMatch(final String longText,final String shortText,final int startIndex){
  String seed=longText.substring(startIndex,startIndex + (longText.length() / 4));
  int j=-1;
  String common="String_Node_Str";
  String longTextPrefix="String_Node_Str";
  String longTextSuffix="String_Node_Str";
  String shortTextPrefix="String_Node_Str";
  String shortTextSuffix="String_Node_Str";
  while ((j=shortText.indexOf(seed,j + 1)) != -1) {
    int prefixLength=Commonality.prefix(longText.substring(startIndex),shortText.substring(j));
    int suffixLength=Commonality.suffix(longText.substring(0,startIndex),shortText.substring(0,j));
    if (common.length() < (prefixLength + suffixLength)) {
      common=shortText.substring(j - suffixLength,j) + shortText.substring(j,j + prefixLength);
      longTextPrefix=longText.substring(0,startIndex - suffixLength);
      longTextSuffix=longText.substring(startIndex + prefixLength);
      shortTextPrefix=shortText.substring(0,j - suffixLength);
      shortTextSuffix=shortText.substring(j + prefixLength);
    }
  }
  if (common.length() >= longText.length() / 2) {
    return new CommonMiddle(longTextPrefix,longTextSuffix,shortTextPrefix,shortTextSuffix,common);
  }
  return null;
}