Program: 50286
Project: 50286
Buggy source:
/** 
 * Make comparisons of every record at a specific alignment start position.
 * @return The total of the comparison failures for all of the records compared
 */
private int makeComparisons(){
  int resultSum=0;
  if (!sources.isEmpty()) {
    for (    final SAMRecord source : sources) {
      SAMRecord dest=null;
      Alignments.AlignmentEntry gobyDest=null;
      final String sourceClippedRead=usableReadOf(source);
      final LinkedList<Integer> indexesList=destclippedReadToIndexesMap.get(sourceClippedRead);
      int leastDiffIndex=-1;
      int leastDiffValue=Integer.MAX_VALUE;
      if (indexesList != null) {
        final boolean tempOutputFailedComparisons=outputFailedComparisons;
        final int tempComparisonFailureCount=comparisonFailureCount;
        outputFailedComparisons=false;
        for (        final int currentDestIndex : indexesList) {
          dest=dests.get(currentDestIndex);
          if (!gobyDests.isEmpty()) {
            gobyDest=gobyDests.get(currentDestIndex);
          }
          final int currentDiffValue=super.compare(source,dest,gobyDest);
          if (currentDiffValue < leastDiffValue) {
            leastDiffValue=currentDiffValue;
            leastDiffIndex=currentDestIndex;
            if (currentDiffValue == 0) {
              break;
            }
          }
        }
        outputFailedComparisons=tempOutputFailedComparisons;
        comparisonFailureCount=tempComparisonFailureCount;
        if (leastDiffIndex != -1) {
          indexesList.removeFirstOccurrence(leastDiffIndex);
          if (leastDiffValue > 0) {
            super.compare(source,dest,gobyDest);
            if (outputFailedComparisons) {
              dest=dests.get(leastDiffIndex);
              if (!gobyDests.isEmpty()) {
                gobyDest=gobyDests.get(leastDiffIndex);
              }
              dumpComparison(source,dest,gobyDest);
            }
          }
        }
      }
      if (leastDiffIndex == -1) {
        readNum++;
        comparisonFailureCount++;
        System.out.println("String_Node_Str" + source.getReadName());
      }
 else {
        resultSum+=leastDiffValue;
      }
    }
  }
  resetForPosition();
  return resultSum;
}

Fixed version (ground truth):
/** 
 * Make comparisons of every record at a specific alignment start position.
 * @return The total of the comparison failures for all of the records compared
 */
private int makeComparisons(){
  int resultSum=0;
  if (!sources.isEmpty()) {
    for (    final SAMRecord source : sources) {
      SAMRecord dest=null;
      Alignments.AlignmentEntry gobyDest=null;
      final String sourceClippedRead=usableReadOf(source);
      final LinkedList<Integer> indexesList=destclippedReadToIndexesMap.get(sourceClippedRead);
      int leastDiffIndex=-1;
      int leastDiffValue=Integer.MAX_VALUE;
      if (indexesList != null) {
        final boolean tempOutputFailedComparisons=outputFailedComparisons;
        final int tempComparisonFailureCount=comparisonFailureCount;
        outputFailedComparisons=false;
        for (        final int currentDestIndex : indexesList) {
          dest=dests.get(currentDestIndex);
          if (!gobyDests.isEmpty()) {
            gobyDest=gobyDests.get(currentDestIndex);
          }
          final int currentDiffValue=super.compare(source,dest,gobyDest);
          if (currentDiffValue < leastDiffValue) {
            leastDiffValue=currentDiffValue;
            leastDiffIndex=currentDestIndex;
            if (currentDiffValue == 0) {
              break;
            }
          }
        }
        outputFailedComparisons=tempOutputFailedComparisons;
        comparisonFailureCount=tempComparisonFailureCount;
        if (leastDiffIndex != -1) {
          indexesList.removeFirstOccurrence(leastDiffIndex);
          if (leastDiffValue > 0) {
            if (outputFailedComparisons) {
              dest=dests.get(leastDiffIndex);
              if (!gobyDests.isEmpty()) {
                gobyDest=gobyDests.get(leastDiffIndex);
              }
              super.compare(source,dest,gobyDest);
              dumpComparison(source,dest,gobyDest);
            }
          }
        }
      }
      if (leastDiffIndex == -1) {
        readNum++;
        comparisonFailureCount++;
        System.out.println("String_Node_Str" + source.getReadName());
      }
 else {
        resultSum+=leastDiffValue;
      }
    }
  }
  resetForPosition();
  return resultSum;
}