Program: 169265
Project: 169265
Buggy source:
public static void main(String[] args) throws Exception {
  String inFile=null;
  int kmerSize=DEFAULT_KMER_SIZE;
  double threshold=DEFAULT_THRESHOLD;
  int numWords=DEFAULT_NUM_WORDS;
  int numThreads=Runtime.getRuntime().availableProcessors() * 2;
  for (int i=0; i < args.length; i++) {
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      kmerSize=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      inFile=args[++i];
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      numWords=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      threshold=Double.parseDouble(args[++i]);
    }
  }
  System.err.println("String_Node_Str" + inFile);
  System.err.println("String_Node_Str" + kmerSize);
  System.err.println("String_Node_Str" + threshold);
  System.err.println("String_Node_Str" + numWords);
  LogManager.getLogManager().reset();
  double kmerError=MinHashSearch.probabilityKmerMatches(DEFAULT_DATA_ERROR,kmerSize);
  System.out.println("String_Node_Str" + kmerError);
  long startTime=System.nanoTime();
  FastaData data=new FastaData(inFile);
  MinHashSearch hashSearch=new MinHashSearch(data.clone(),kmerSize,numWords,DEFAULT_NUM_MIN_MATCHES,DEFAULT_SUB_SEQUENCE_SIZE,numThreads,DEFAULT_LARGE_MEMORY,true,null);
  System.err.println("String_Node_Str" + data.getNumberProcessed() + "String_Node_Str");
  System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  System.out.println("String_Node_Str" + data.getNumberProcessed() + "String_Node_Str");
  startTime=System.nanoTime();
  ArrayList<MatchResult> results=hashSearch.findMatches(DEFAULT_THRESHOLD);
  System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  ArrayList<MatchResult> mixedResults=new ArrayList<MatchResult>();
  Collections.sort(results);
  mixedResults.addAll(results.subList(0,Math.min(results.size(),100)));
  mixedResults.addAll(results.subList(Math.max(0,results.size() - 50),results.size()));
  System.out.println("String_Node_Str" + results.size() + "String_Node_Str");
  Matrix matrix=MatrixLoader.load("String_Node_Str");
  int count=0;
  double mean=0;
  for (  MatchResult match : mixedResults) {
    Sequence s1=data.getSequence(match.getFromId());
    Sequence s2=data.getSequence(match.getToId());
    double score=computeAlignment(s1,s2,matrix);
    System.out.format("String_Node_Str",match,match.getScore(),score);
    mean+=match.getScore();
    count++;
    if (count > 200)     break;
  }
  mean=mean / count;
  System.out.println("String_Node_Str" + mean);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  String inFile=null;
  int kmerSize=DEFAULT_KMER_SIZE;
  double threshold=DEFAULT_THRESHOLD;
  int numWords=DEFAULT_NUM_WORDS;
  int numThreads=Runtime.getRuntime().availableProcessors() * 2;
  for (int i=0; i < args.length; i++) {
    if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      kmerSize=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      inFile=args[++i];
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      numWords=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      threshold=Double.parseDouble(args[++i]);
    }
  }
  System.err.println("String_Node_Str" + inFile);
  System.err.println("String_Node_Str" + kmerSize);
  System.err.println("String_Node_Str" + threshold);
  System.err.println("String_Node_Str" + numWords);
  LogManager.getLogManager().reset();
  double kmerError=MinHashSearch.probabilityKmerMatches(DEFAULT_DATA_ERROR,kmerSize);
  System.out.println("String_Node_Str" + kmerError);
  long startTime=System.nanoTime();
  FastaData data=new FastaData(inFile);
  MinHashSearch hashSearch=new MinHashSearch(data.clone(),kmerSize,numWords,DEFAULT_NUM_MIN_MATCHES,DEFAULT_SUB_SEQUENCE_SIZE,numThreads,DEFAULT_LARGE_MEMORY,true,null,800);
  System.err.println("String_Node_Str" + data.getNumberProcessed() + "String_Node_Str");
  System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  System.out.println("String_Node_Str" + data.getNumberProcessed() + "String_Node_Str");
  startTime=System.nanoTime();
  ArrayList<MatchResult> results=hashSearch.findMatches(DEFAULT_THRESHOLD);
  System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  ArrayList<MatchResult> mixedResults=new ArrayList<MatchResult>();
  Collections.sort(results);
  mixedResults.addAll(results.subList(0,Math.min(results.size(),100)));
  mixedResults.addAll(results.subList(Math.max(0,results.size() - 50),results.size()));
  System.out.println("String_Node_Str" + results.size() + "String_Node_Str");
  Matrix matrix=MatrixLoader.load("String_Node_Str");
  int count=0;
  double mean=0;
  for (  MatchResult match : mixedResults) {
    Sequence s1=data.getSequence(match.getFromId());
    Sequence s2=data.getSequence(match.getToId());
    double score=computeAlignment(s1,s2,matrix);
    System.out.format("String_Node_Str",match,match.getScore(),score);
    mean+=match.getScore();
    count++;
    if (count > 200)     break;
  }
  mean=mean / count;
  System.out.println("String_Node_Str" + mean);
}