Program: 169278
Project: 169278
Buggy source:
public static void main(String[] args) throws Exception {
  Locale.setDefault(Locale.US);
  String inFile=null;
  String toFile=null;
  int kmerSize=DEFAULT_KMER_SIZE;
  double threshold=DEFAULT_THRESHOLD;
  int numWords=DEFAULT_NUM_WORDS;
  int numMinMatches=DEFAULT_NUM_MIN_MATCHES;
  int subSequenceSize=DEFAULT_SUB_SEQUENCE_SIZE;
  boolean storeInMemory=DEFAULT_LARGE_MEMORY;
  int numThreads=DEFAULT_NUM_THREADS;
  boolean noSelf=DEFAULT_NO_SELF;
  String filterFile=null;
  double filterThreshold=DEFAULT_FILTER_CUTOFF;
  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")) {
      toFile=args[++i];
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      filterFile=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]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      filterThreshold=Double.parseDouble(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      numMinMatches=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      subSequenceSize=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      numThreads=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      storeInMemory=false;
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      noSelf=true;
    }
  }
  if (inFile == null) {
    printUsage("String_Node_Str");
  }
  System.err.println("String_Node_Str" + inFile);
  System.err.println("String_Node_Str" + toFile);
  System.err.println("String_Node_Str" + filterFile);
  System.err.println("String_Node_Str" + kmerSize);
  System.err.println("String_Node_Str" + threshold);
  System.err.println("String_Node_Str" + filterThreshold);
  System.err.println("String_Node_Str" + numWords);
  System.err.println("String_Node_Str" + numMinMatches);
  System.err.println("String_Node_Str" + subSequenceSize);
  System.err.println("String_Node_Str" + numThreads);
  System.err.println("String_Node_Str" + storeInMemory);
  System.err.println("String_Node_Str" + !noSelf);
  long startTotalTime=System.nanoTime();
  FastaData data=new FastaData(inFile);
  long startTime=System.nanoTime();
  HashSet<Integer> filter=null;
  if (filterFile != null) {
    System.err.println("String_Node_Str" + filterFile + "String_Node_Str");
    filter=Utils.createKmerFilter(filterFile,filterThreshold,kmerSize);
    System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  }
  long processTime=System.nanoTime();
  MinHashSearch hashSearch=new MinHashSearch(data,kmerSize,numWords,numMinMatches,subSequenceSize,numThreads,storeInMemory,false,filter);
  System.err.println("String_Node_Str" + data.getNumberProcessed() + "String_Node_Str");
  System.err.println("String_Node_Str" + (System.nanoTime() - processTime) * 1.0e-9);
  long startTotalScoringTime=System.nanoTime();
  if (toFile == null) {
    startTime=System.nanoTime();
    hashSearch.findMatches(threshold);
    System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  }
 else {
    File file=new File(toFile);
    if (!file.exists())     throw new FastAlignRuntimeException("String_Node_Str");
    ArrayList<File> toFiles=new ArrayList<>();
    if (!file.isDirectory()) {
      toFiles.add(file);
    }
 else {
      File[] fileList=file.listFiles(new FilenameFilter(){
        @Override public boolean accept(        File dir,        String name){
          if (!name.startsWith("String_Node_Str"))           return true;
          return false;
        }
      }
);
      for (      File cf : fileList)       toFiles.add(cf);
    }
    Collections.sort(toFiles);
    startTime=System.nanoTime();
    if (!noSelf) {
      hashSearch.findMatches(threshold);
      System.out.flush();
      System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
    }
    for (    File cf : toFiles) {
      data=new FastaData(cf.getCanonicalPath());
      System.err.println("String_Node_Str" + cf.getCanonicalPath() + "String_Node_Str");
      startTime=System.nanoTime();
      hashSearch.findMatches(data,threshold);
      System.out.flush();
      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.flush();
  System.err.println("String_Node_Str" + (System.nanoTime() - startTotalScoringTime) * 1.0e-9);
  System.err.println("String_Node_Str" + (System.nanoTime() - startTotalTime) * 1.0e-9);
  System.err.println("String_Node_Str" + hashSearch.getMatchesProcessed());
  System.err.println("String_Node_Str" + (double)hashSearch.getMatchesProcessed() / (double)hashSearch.getNumberSequencesSearched() * 100.0);
  System.err.println("String_Node_Str" + (double)hashSearch.getNumberSequencesHit() / (double)(hashSearch.size() * hashSearch.getNumberSequencesSearched()) * 100.0);
  System.err.println("String_Node_Str" + (double)hashSearch.getMatchesProcessed() / (double)hashSearch.getNumberSequencesHit() * 100.0);
  System.err.println("String_Node_Str" + (double)hashSearch.getMatchesProcessed() / (double)hashSearch.getNumberSequencesFullyCompared() * 100.0);
  System.err.flush();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  Locale.setDefault(Locale.US);
  String inFile=null;
  String toFile=null;
  int kmerSize=DEFAULT_KMER_SIZE;
  double threshold=DEFAULT_THRESHOLD;
  int numWords=DEFAULT_NUM_WORDS;
  int numMinMatches=DEFAULT_NUM_MIN_MATCHES;
  int subSequenceSize=DEFAULT_SUB_SEQUENCE_SIZE;
  boolean storeInMemory=DEFAULT_LARGE_MEMORY;
  int numThreads=DEFAULT_NUM_THREADS;
  boolean noSelf=DEFAULT_NO_SELF;
  String filterFile=null;
  double filterThreshold=DEFAULT_FILTER_CUTOFF;
  int maxShift=DEFAULT_MAX_SHIFT_ALLOWED;
  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")) {
      toFile=args[++i];
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      filterFile=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]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      filterThreshold=Double.parseDouble(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      numMinMatches=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      subSequenceSize=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      maxShift=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      numThreads=Integer.parseInt(args[++i]);
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      storeInMemory=false;
    }
 else     if (args[i].trim().equalsIgnoreCase("String_Node_Str")) {
      noSelf=true;
    }
  }
  if (inFile == null) {
    printUsage("String_Node_Str");
  }
  System.err.println("String_Node_Str" + inFile);
  System.err.println("String_Node_Str" + toFile);
  System.err.println("String_Node_Str" + filterFile);
  System.err.println("String_Node_Str" + kmerSize);
  System.err.println("String_Node_Str" + threshold);
  System.err.println("String_Node_Str" + filterThreshold);
  System.err.println("String_Node_Str" + numWords);
  System.err.println("String_Node_Str" + numMinMatches);
  System.err.println("String_Node_Str" + subSequenceSize);
  System.err.println("String_Node_Str" + maxShift);
  System.err.println("String_Node_Str" + numThreads);
  System.err.println("String_Node_Str" + storeInMemory);
  System.err.println("String_Node_Str" + !noSelf);
  long startTotalTime=System.nanoTime();
  FastaData data=new FastaData(inFile);
  long startTime=System.nanoTime();
  HashSet<Integer> filter=null;
  if (filterFile != null) {
    System.err.println("String_Node_Str" + filterFile + "String_Node_Str");
    filter=Utils.createKmerFilter(filterFile,filterThreshold,kmerSize);
    System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  }
  long processTime=System.nanoTime();
  MinHashSearch hashSearch=new MinHashSearch(data,kmerSize,numWords,numMinMatches,subSequenceSize,numThreads,storeInMemory,false,filter,maxShift);
  System.err.println("String_Node_Str" + data.getNumberProcessed() + "String_Node_Str");
  System.err.println("String_Node_Str" + (System.nanoTime() - processTime) * 1.0e-9);
  long startTotalScoringTime=System.nanoTime();
  if (toFile == null) {
    startTime=System.nanoTime();
    hashSearch.findMatches(threshold);
    System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
  }
 else {
    File file=new File(toFile);
    if (!file.exists())     throw new FastAlignRuntimeException("String_Node_Str");
    ArrayList<File> toFiles=new ArrayList<>();
    if (!file.isDirectory()) {
      toFiles.add(file);
    }
 else {
      File[] fileList=file.listFiles(new FilenameFilter(){
        @Override public boolean accept(        File dir,        String name){
          if (!name.startsWith("String_Node_Str"))           return true;
          return false;
        }
      }
);
      for (      File cf : fileList)       toFiles.add(cf);
    }
    Collections.sort(toFiles);
    startTime=System.nanoTime();
    if (!noSelf) {
      hashSearch.findMatches(threshold);
      System.out.flush();
      System.err.println("String_Node_Str" + (System.nanoTime() - startTime) * 1.0e-9);
    }
    for (    File cf : toFiles) {
      data=new FastaData(cf.getCanonicalPath());
      System.err.println("String_Node_Str" + cf.getCanonicalPath() + "String_Node_Str");
      startTime=System.nanoTime();
      hashSearch.findMatches(data,threshold);
      System.out.flush();
      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.flush();
  System.err.println("String_Node_Str" + (System.nanoTime() - startTotalScoringTime) * 1.0e-9);
  System.err.println("String_Node_Str" + (System.nanoTime() - startTotalTime) * 1.0e-9);
  System.err.println("String_Node_Str" + hashSearch.getMatchesProcessed());
  System.err.println("String_Node_Str" + (double)hashSearch.getMatchesProcessed() / (double)hashSearch.getNumberSequencesSearched() * 100.0);
  System.err.println("String_Node_Str" + (double)hashSearch.getNumberSequencesHit() / (double)(hashSearch.size() * hashSearch.getNumberSequencesSearched()) * 100.0);
  System.err.println("String_Node_Str" + (double)hashSearch.getMatchesProcessed() / (double)hashSearch.getNumberSequencesHit() * 100.0);
  System.err.println("String_Node_Str" + (double)hashSearch.getMatchesProcessed() / (double)hashSearch.getNumberSequencesFullyCompared() * 100.0);
  System.err.flush();
}