Program: 61242
Project: 61242
Buggy source:
/** 
 * Story: User can produce final point clustering using a Hadoop map/reduce job and a EuclideanDistanceMeasure.
 */
@Test public void testCanopyEuclideanSeqJob() throws Exception {
  Path input=getTestTempDirPath("String_Node_Str");
  Configuration conf=new Configuration();
  FileSystem fs=FileSystem.get(input.toUri(),conf);
  Collection<VectorWritable> points=new ArrayList<VectorWritable>();
  for (  Vector v : raw) {
    points.add(new VectorWritable(v));
  }
  ClusteringTestUtils.writePointsToFile(points,getTestTempFilePath("String_Node_Str"),fs,conf);
  ClusteringTestUtils.writePointsToFile(points,getTestTempFilePath("String_Node_Str"),fs,conf);
  Path output=getTestTempDirPath("String_Node_Str");
  System.out.println("String_Node_Str" + output.toString());
  String[] args={optKey(DefaultOptionCreator.INPUT_OPTION),getTestTempDirPath("String_Node_Str").toString(),optKey(DefaultOptionCreator.OUTPUT_OPTION),output.toString(),optKey(DefaultOptionCreator.DISTANCE_MEASURE_OPTION),EuclideanDistanceMeasure.class.getName(),optKey(DefaultOptionCreator.T1_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.T2_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.CLUSTERING_OPTION),optKey(DefaultOptionCreator.MAX_ITERATIONS_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.CONVERGENCE_DELTA_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.OVERWRITE_OPTION),optKey(DefaultOptionCreator.METHOD_OPTION),DefaultOptionCreator.SEQUENTIAL_METHOD};
  new MeanShiftCanopyDriver().run(args);
  Path outPart=new Path(output,"String_Node_Str");
  SequenceFile.Reader reader=new SequenceFile.Reader(fs,outPart,conf);
  Writable key=new Text();
  MeanShiftCanopy value=new MeanShiftCanopy();
  int count=0;
  while (reader.next(key,value)) {
    count++;
  }
  reader.close();
  assertEquals("String_Node_Str",5,count);
}

Fixed version (ground truth):
/** 
 * Story: User can produce final point clustering using a Hadoop map/reduce job and a EuclideanDistanceMeasure.
 */
@Test public void testCanopyEuclideanSeqJob() throws Exception {
  Path input=getTestTempDirPath("String_Node_Str");
  Configuration conf=new Configuration();
  FileSystem fs=FileSystem.get(input.toUri(),conf);
  Collection<VectorWritable> points=new ArrayList<VectorWritable>();
  for (  Vector v : raw) {
    points.add(new VectorWritable(v));
  }
  ClusteringTestUtils.writePointsToFile(points,getTestTempFilePath("String_Node_Str"),fs,conf);
  ClusteringTestUtils.writePointsToFile(points,getTestTempFilePath("String_Node_Str"),fs,conf);
  Path output=getTestTempDirPath("String_Node_Str");
  System.out.println("String_Node_Str" + output.toString());
  String[] args={optKey(DefaultOptionCreator.INPUT_OPTION),getTestTempDirPath("String_Node_Str").toString(),optKey(DefaultOptionCreator.OUTPUT_OPTION),output.toString(),optKey(DefaultOptionCreator.DISTANCE_MEASURE_OPTION),EuclideanDistanceMeasure.class.getName(),optKey(DefaultOptionCreator.T1_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.T2_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.CLUSTERING_OPTION),optKey(DefaultOptionCreator.MAX_ITERATIONS_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.CONVERGENCE_DELTA_OPTION),"String_Node_Str",optKey(DefaultOptionCreator.OVERWRITE_OPTION),optKey(DefaultOptionCreator.METHOD_OPTION),DefaultOptionCreator.SEQUENTIAL_METHOD};
  ToolRunner.run(new Configuration(),new MeanShiftCanopyDriver(),args);
  Path outPart=new Path(output,"String_Node_Str");
  SequenceFile.Reader reader=new SequenceFile.Reader(fs,outPart,conf);
  Writable key=new Text();
  MeanShiftCanopy value=new MeanShiftCanopy();
  int count=0;
  while (reader.next(key,value)) {
    count++;
  }
  reader.close();
  assertEquals("String_Node_Str",5,count);
}