Program: 61390
Project: 61390
Buggy source:
/** 
 * Run the kmeans clustering job on an input dataset using the given distance measure, t1, t2 and iteration parameters. All output data will be written to the output directory, which will be initially deleted if it exists. The clustered points will reside in the path <output>/clustered-points. By default, the job expects the a file containing synthetic_control.data as obtained from http://archive.ics.uci.edu/ml/datasets/Synthetic+Control+Chart+Time+Series resides in a directory named "testdata", and writes output to a directory named "output".
 * @param input the String denoting the input directory path
 * @param output the String denoting the output directory path
 * @param measureClass the String class name of the DistanceMeasure to use
 * @param t1 the canopy T1 threshold
 * @param t2 the canopy T2 threshold
 * @param convergenceDelta the double convergence criteria for iterations
 * @param maxIterations the int maximum number of iterations
 */
private static void runJob(String input,String output,String measureClass,double t1,double t2,double convergenceDelta,int maxIterations) throws IOException {
  JobClient client=new JobClient();
  JobConf conf=new JobConf(Job.class);
  Path outPath=new Path(output);
  client.setConf(conf);
  FileSystem dfs=FileSystem.get(conf);
  if (dfs.exists(outPath))   dfs.delete(outPath,true);
  InputDriver.runJob(input,output + "String_Node_Str");
  CanopyClusteringJob.runJob(output + "String_Node_Str",output,measureClass,t1,t2);
  KMeansDriver.runJob(output + "String_Node_Str",output + "String_Node_Str",output,measureClass,convergenceDelta,maxIterations,1);
  OutputDriver.runJob(output + "String_Node_Str",output + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Run the kmeans clustering job on an input dataset using the given distance measure, t1, t2 and iteration parameters. All output data will be written to the output directory, which will be initially deleted if it exists. The clustered points will reside in the path <output>/clustered-points. By default, the job expects the a file containing synthetic_control.data as obtained from http://archive.ics.uci.edu/ml/datasets/Synthetic+Control+Chart+Time+Series resides in a directory named "testdata", and writes output to a directory named "output".
 * @param input the String denoting the input directory path
 * @param output the String denoting the output directory path
 * @param measureClass the String class name of the DistanceMeasure to use
 * @param t1 the canopy T1 threshold
 * @param t2 the canopy T2 threshold
 * @param convergenceDelta the double convergence criteria for iterations
 * @param maxIterations the int maximum number of iterations
 */
private static void runJob(String input,String output,String measureClass,double t1,double t2,double convergenceDelta,int maxIterations) throws IOException {
  JobClient client=new JobClient();
  JobConf conf=new JobConf(Job.class);
  Path outPath=new Path(output);
  client.setConf(conf);
  FileSystem dfs=FileSystem.get(conf);
  if (dfs.exists(outPath))   dfs.delete(outPath,true);
  InputDriver.runJob(input,output + "String_Node_Str");
  CanopyClusteringJob.runJob(output + "String_Node_Str",output,measureClass,t1,t2);
  KMeansDriver.runJob(output + "String_Node_Str",output + "String_Node_Str",output,measureClass,convergenceDelta,maxIterations,1);
}