Program: 169276
Project: 169276
Buggy source:
@Override public List<MatchResult> findMatches(SequenceMinHashes seqMinHashes,double minScore,boolean allToAll){
  MinHash minHash=seqMinHashes.getMainHashes();
  if (this.hashes.size() != minHash.numHashes())   throw new FastAlignRuntimeException("String_Node_Str" + this.hashes.size() + "String_Node_Str"+ minHash.numHashes()+ "String_Node_Str");
  HashMap<MatchId,HitInfo> matchHitMap=new HashMap<MatchId,HitInfo>(size() / 10 + 1);
  int[][] subSeqMinHashes=minHash.getSubSeqMinHashes();
  for (int subSequence=0; subSequence < subSeqMinHashes.length; subSequence++) {
    int hashIndex=0;
    for (    HashMap<Integer,ArrayList<SubSequenceId>> currHash : this.hashes) {
      ArrayList<SubSequenceId> currentHashMatchList=currHash.get(subSeqMinHashes[subSequence][hashIndex]);
      if (currentHashMatchList != null) {
        for (        SubSequenceId subSequenceId : currentHashMatchList) {
          MatchId matchedId=new MatchId(subSequenceId,subSequence);
          HitInfo currentHitInfo=matchHitMap.get(matchedId);
          if (currentHitInfo == null) {
            currentHitInfo=new HitInfo();
            matchHitMap.put(matchedId,currentHitInfo);
          }
          currentHitInfo.addHit();
        }
      }
      hashIndex++;
    }
  }
  this.numberSubSequencesHit.getAndAdd(matchHitMap.size());
  HashMap<SequenceId,Integer> bestSequenceHit=new HashMap<SequenceId,Integer>(matchHitMap.size());
  for (  Entry<MatchId,HitInfo> match : matchHitMap.entrySet()) {
    SequenceId currId=match.getKey().id.getId();
    int currValue=match.getValue().count;
    Integer prevBestCount=bestSequenceHit.get(currId);
    if (prevBestCount == null || prevBestCount < currValue)     bestSequenceHit.put(currId,currValue);
  }
  this.numberSequencesHit.getAndAdd(bestSequenceHit.size());
  ArrayList<MatchResult> matches=new ArrayList<MatchResult>(32);
  int[][] fullKmerMatch=null;
  for (  Entry<SequenceId,Integer> match : bestSequenceHit.entrySet()) {
    if (match.getKey().getHeaderId() == seqMinHashes.getSequenceId().getHeaderId())     continue;
    if (allToAll && match.getKey().getHeaderId() > seqMinHashes.getSequenceId().getHeaderId())     continue;
    if (match.getValue() >= this.numMinMatches) {
      SequenceMinHashes matchedHash=this.sequenceVectorsHash.get(match.getKey());
      if (fullKmerMatch == null)       fullKmerMatch=seqMinHashes.getFullHashes();
      Pair<Double,Integer> result=seqMinHashes.getFullScore(fullKmerMatch,matchedHash,maxShift);
      double matchScore=result.x;
      int shift=result.y;
      int shiftb=-shift - seqMinHashes.getSequenceLength() + matchedHash.getSequenceLength();
      this.numberSequencesFullyCompared.getAndIncrement();
      if (matchScore >= minScore) {
        MatchResult currResult=new MatchResult(seqMinHashes.getSequenceId(),match.getKey(),matchScore,-shift,shiftb);
        matches.add(currResult);
      }
    }
  }
  return matches;
}

Fixed version (ground truth):
@Override public List<MatchResult> findMatches(SequenceMinHashes seqMinHashes,double minScore,boolean allToAll){
  MinHash minHash=seqMinHashes.getMainHashes();
  if (this.hashes.size() != minHash.numHashes())   throw new FastAlignRuntimeException("String_Node_Str" + this.hashes.size() + "String_Node_Str"+ minHash.numHashes()+ "String_Node_Str");
  HashMap<MatchId,HitInfo> matchHitMap=new HashMap<MatchId,HitInfo>(size() / 10 + 1);
  int[][] subSeqMinHashes=minHash.getSubSeqMinHashes();
  for (int subSequence=0; subSequence < subSeqMinHashes.length; subSequence++) {
    int hashIndex=0;
    for (    HashMap<Integer,ArrayList<SubSequenceId>> currHash : this.hashes) {
      ArrayList<SubSequenceId> currentHashMatchList=currHash.get(subSeqMinHashes[subSequence][hashIndex]);
      if (currentHashMatchList != null) {
        for (        SubSequenceId subSequenceId : currentHashMatchList) {
          MatchId matchedId=new MatchId(subSequenceId,subSequence);
          HitInfo currentHitInfo=matchHitMap.get(matchedId);
          if (currentHitInfo == null) {
            currentHitInfo=new HitInfo();
            matchHitMap.put(matchedId,currentHitInfo);
          }
          currentHitInfo.addHit();
        }
      }
      hashIndex++;
    }
  }
  this.numberSubSequencesHit.getAndAdd(matchHitMap.size());
  HashMap<SequenceId,Integer> bestSequenceHit=new HashMap<SequenceId,Integer>(matchHitMap.size());
  for (  Entry<MatchId,HitInfo> match : matchHitMap.entrySet()) {
    SequenceId currId=match.getKey().id.getId();
    int currValue=match.getValue().count;
    Integer prevBestCount=bestSequenceHit.get(currId);
    if (prevBestCount == null || prevBestCount < currValue)     bestSequenceHit.put(currId,currValue);
  }
  this.numberSequencesHit.getAndAdd(bestSequenceHit.size());
  ArrayList<MatchResult> matches=new ArrayList<MatchResult>(32);
  int[][] fullKmerMatch=null;
  for (  Entry<SequenceId,Integer> match : bestSequenceHit.entrySet()) {
    if (match.getKey().getHeaderId() == seqMinHashes.getSequenceId().getHeaderId())     continue;
    if (allToAll && match.getKey().getHeaderId() > seqMinHashes.getSequenceId().getHeaderId())     continue;
    if (match.getValue() >= this.numMinMatches) {
      SequenceMinHashes matchedHash=this.sequenceVectorsHash.get(match.getKey());
      if (fullKmerMatch == null)       fullKmerMatch=seqMinHashes.getFullHashes();
      Pair<Double,Integer> result=seqMinHashes.getFullScore(fullKmerMatch,matchedHash,this.maxShift);
      double matchScore=result.x;
      int shift=result.y;
      int shiftb=-shift - seqMinHashes.getSequenceLength() + matchedHash.getSequenceLength();
      this.numberSequencesFullyCompared.getAndIncrement();
      if (matchScore >= minScore) {
        MatchResult currResult=new MatchResult(seqMinHashes.getSequenceId(),match.getKey(),matchScore,-shift,shiftb);
        matches.add(currResult);
      }
    }
  }
  return matches;
}