Program: 117203
Project: 117203
Buggy source:
/** 
 * <p> <pre> Usage: mltk.predictor.gam.interaction.FAST -d	dataset path -R	residual path -o	output path [-r]	attribute file path [-b]	number of bins (default: 256) [-p]	number of threads (default: 1) </pre> </p>
 * @param args the command line arguments
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
  Options opts=new Options();
  CmdLineParser parser=new CmdLineParser(FAST.class,opts);
  try {
    parser.parse(args);
  }
 catch (  IllegalArgumentException e) {
    parser.printUsage();
    System.exit(1);
  }
  Instances instances=InstancesReader.read(opts.attPath,opts.datasetPath);
  System.out.println("String_Node_Str");
  BufferedReader br=new BufferedReader(new FileReader(opts.residualPath),65535);
  for (int i=0; i < instances.size(); i++) {
    String line=br.readLine();
    double residual=Double.parseDouble(line);
    Instance instance=instances.get(i);
    instance.setTarget(residual);
  }
  br.close();
  List<Attribute> attributes=instances.getAttributes();
  System.out.println("String_Node_Str");
  for (int i=0; i < attributes.size(); i++) {
    if (attributes.get(i).getType() == Type.NUMERIC) {
      Discretizer.discretize(instances,i,opts.maxNumBins);
    }
  }
  System.out.println("String_Node_Str");
  List<Element<IntPair>> pairs=new ArrayList<>();
  for (int i=0; i < attributes.size(); i++) {
    for (int j=i + 1; j < attributes.size(); j++) {
      pairs.add(new Element<IntPair>(new IntPair(i,j),0.0));
    }
  }
  System.out.println("String_Node_Str");
  FASTThread[] threads=new FASTThread[opts.numThreads];
  long start=System.currentTimeMillis();
  for (int i=0; i < threads.length; i++) {
    threads[i]=new FASTThread(instances);
  }
  for (int i=0; i < pairs.size(); i++) {
    threads[i % threads.length].add(pairs.get(i));
  }
  for (int i=0; i < threads.length; i++) {
    threads[i].start();
  }
  System.out.println("String_Node_Str");
  for (int i=0; i < threads.length; i++) {
    threads[i].join();
  }
  long end=System.currentTimeMillis();
  System.out.println("String_Node_Str");
  Collections.sort(pairs);
  System.out.println("String_Node_Str" + (end - start) / 1000.0);
  PrintWriter out=new PrintWriter(opts.outputPath);
  for (int i=0; i < pairs.size(); i++) {
    Element<IntPair> pair=pairs.get(i);
    out.println(pair.element.v1 + "String_Node_Str" + pair.element.v2+ "String_Node_Str"+ pair.weight);
  }
  out.flush();
  out.close();
}

Fixed version (ground truth):
/** 
 * Ranks pairwise interactions using FAST. <pre> Usage: mltk.predictor.gam.interaction.FAST -d	dataset path -R	residual path -o	output path [-r]	attribute file path [-b]	number of bins (default: 256) [-p]	number of threads (default: 1) </pre>
 * @param args the command line arguments
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
  Options opts=new Options();
  CmdLineParser parser=new CmdLineParser(FAST.class,opts);
  try {
    parser.parse(args);
  }
 catch (  IllegalArgumentException e) {
    parser.printUsage();
    System.exit(1);
  }
  Instances instances=InstancesReader.read(opts.attPath,opts.datasetPath);
  System.out.println("String_Node_Str");
  BufferedReader br=new BufferedReader(new FileReader(opts.residualPath),65535);
  for (int i=0; i < instances.size(); i++) {
    String line=br.readLine();
    double residual=Double.parseDouble(line);
    Instance instance=instances.get(i);
    instance.setTarget(residual);
  }
  br.close();
  List<Attribute> attributes=instances.getAttributes();
  System.out.println("String_Node_Str");
  for (int i=0; i < attributes.size(); i++) {
    if (attributes.get(i).getType() == Type.NUMERIC) {
      Discretizer.discretize(instances,i,opts.maxNumBins);
    }
  }
  System.out.println("String_Node_Str");
  List<Element<IntPair>> pairs=new ArrayList<>();
  for (int i=0; i < attributes.size(); i++) {
    for (int j=i + 1; j < attributes.size(); j++) {
      pairs.add(new Element<IntPair>(new IntPair(i,j),0.0));
    }
  }
  System.out.println("String_Node_Str");
  FASTThread[] threads=new FASTThread[opts.numThreads];
  long start=System.currentTimeMillis();
  for (int i=0; i < threads.length; i++) {
    threads[i]=new FASTThread(instances);
  }
  for (int i=0; i < pairs.size(); i++) {
    threads[i % threads.length].add(pairs.get(i));
  }
  for (int i=0; i < threads.length; i++) {
    threads[i].start();
  }
  System.out.println("String_Node_Str");
  for (int i=0; i < threads.length; i++) {
    threads[i].join();
  }
  long end=System.currentTimeMillis();
  System.out.println("String_Node_Str");
  Collections.sort(pairs);
  System.out.println("String_Node_Str" + (end - start) / 1000.0);
  PrintWriter out=new PrintWriter(opts.outputPath);
  for (int i=0; i < pairs.size(); i++) {
    Element<IntPair> pair=pairs.get(i);
    out.println(pair.element.v1 + "String_Node_Str" + pair.element.v2+ "String_Node_Str"+ pair.weight);
  }
  out.flush();
  out.close();
}