nus-yam/ex-repair huggingface dataset:
Program: 61387
Project: 61387
Buggy source:
/** 
 * Configure the mapper with the cluster info
 * @param job
 * @param clusters
 */
public static void configureWithClusterInfo(String clusterPathStr,List<Cluster> clusters){
  JobConf job=new JobConf(KMeansUtil.class);
  Path clusterPath=new Path(clusterPathStr);
  List<Path> result=new ArrayList<Path>();
  PathFilter clusterFileFilter=new PathFilter(){
    public boolean accept(    Path path){
      return path.getName().startsWith("String_Node_Str");
    }
  }
;
  try {
    FileSystem fs=clusterPath.getFileSystem(job);
    FileStatus[] matches=fs.listStatus(FileUtil.stat2Paths(fs.globStatus(clusterPath,clusterFileFilter)),clusterFileFilter);
    for (    FileStatus match : matches) {
      result.add(fs.makeQualified(match.getPath()));
    }
    for (    Path path : result) {
      RecordReader<Text,Text> recordReader=null;
      try {
        recordReader=new KeyValueLineRecordReader(job,new FileSplit(path,0,fs.getFileStatus(path).getLen(),(String[])null));
        Text key=new Text();
        Text value=new Text();
        int counter=1;
        while (recordReader.next(key,value)) {
          Cluster cluster=Cluster.decodeCluster(value.toString());
          clusters.add(cluster);
        }
      }
  finally {
        if (recordReader != null) {
          recordReader.close();
        }
      }
    }
  }
 catch (  IOException e) {
    log.info("String_Node_Str",e);
    e.printStackTrace();
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Configure the mapper with the cluster info
 * @param job
 * @param clusters
 */
public static void configureWithClusterInfo(String clusterPathStr,List<Cluster> clusters){
  JobConf job=new JobConf(KMeansUtil.class);
  Path clusterPath=new Path(clusterPathStr);
  List<Path> result=new ArrayList<Path>();
  PathFilter clusterFileFilter=new PathFilter(){
    public boolean accept(    Path path){
      return path.getName().startsWith("String_Node_Str");
    }
  }
;
  try {
    FileSystem fs=clusterPath.getFileSystem(job);
    FileStatus[] matches=fs.listStatus(FileUtil.stat2Paths(fs.globStatus(clusterPath,clusterFileFilter)),clusterFileFilter);
    for (    FileStatus match : matches) {
      result.add(fs.makeQualified(match.getPath()));
    }
    for (    Path path : result) {
      SequenceFile.Reader reader=null;
      try {
        reader=new SequenceFile.Reader(fs,path,job);
        Text key=new Text();
        Text value=new Text();
        int counter=1;
        while (reader.next(key,value)) {
          Cluster cluster=Cluster.decodeCluster(value.toString());
          clusters.add(cluster);
        }
      }
  finally {
        if (reader != null) {
          reader.close();
        }
      }
    }
  }
 catch (  IOException e) {
    log.info("String_Node_Str",e);
    e.printStackTrace();
    throw new RuntimeException(e);
  }
}
Program: 61388
Project: 61388
Buggy source:
/** 
 * Story: Test the reference implementation
 * @throws Exception
 */
public void testReferenceImplementation() throws Exception {
  List<Vector> points=getPoints(reference);
  DistanceMeasure measure=new EuclideanDistanceMeasure();
  Cluster.config(measure,0.001);
  for (int k=0; k < points.size(); k++) {
    System.out.println("String_Node_Str" + (k + 1) + "String_Node_Str");
    List<Cluster> clusters=new ArrayList<Cluster>();
    for (int i=0; i < k + 1; i++) {
      Vector vec=points.get(i);
      clusters.add(new VisibleCluster(vec));
    }
    int maxIter=10;
    referenceKmeans(points,clusters,measure,maxIter);
    for (int c=0; c < clusters.size(); c++) {
      Cluster cluster=clusters.get(c);
      assertEquals("String_Node_Str" + c + "String_Node_Str"+ k,expectedNumPoints[k][c],cluster.getNumPoints());
      System.out.println(cluster.toString());
    }
  }
}

Fixed version (ground truth):
/** 
 * Story: Test the reference implementation
 * @throws Exception
 */
public void testReferenceImplementation() throws Exception {
  List<Vector> points=getPoints(reference);
  DistanceMeasure measure=new EuclideanDistanceMeasure();
  Cluster.config(measure,0.001);
  for (int k=0; k < points.size(); k++) {
    System.out.println("String_Node_Str" + (k + 1) + ':');
    List<Cluster> clusters=new ArrayList<Cluster>();
    for (int i=0; i < k + 1; i++) {
      Vector vec=points.get(i);
      clusters.add(new VisibleCluster(vec));
    }
    int maxIter=10;
    referenceKmeans(points,clusters,measure,maxIter);
    for (int c=0; c < clusters.size(); c++) {
      Cluster cluster=clusters.get(c);
      assertEquals("String_Node_Str" + c + "String_Node_Str"+ k,expectedNumPoints[k][c],cluster.getNumPoints());
      System.out.println(cluster.toString());
    }
  }
}
Program: 61391
Project: 61391
Buggy source:
/** 
 * Add the point to the cluster
 * @param count the number of points in the delta
 * @param delta a point to add
 */
public void addPoints(int count,Vector delta){
  centroid=null;
  numPoints+=count;
  if (pointTotal == null)   pointTotal=delta.copy();
 else   pointTotal=delta.plus(pointTotal);
}

Fixed version (ground truth):
/** 
 * Add the point to the cluster
 * @param count the number of points in the delta
 * @param delta a point to add
 */
public void addPoints(int count,Vector delta){
  centroid=null;
  numPoints+=count;
  if (pointTotal == null)   pointTotal=delta.copy();
 else   pointTotal=pointTotal.plus(delta);
}
Program: 61392
Project: 61392
Buggy source:
/** 
 * Format the cluster for output
 * @param cluster the Cluster
 */
public static String formatCluster(Cluster cluster){
  return cluster.getIdentifier() + "String_Node_Str" + cluster.computeCentroid().asFormatString();
}

Fixed version (ground truth):
/** 
 * Format the cluster for output
 * @param cluster the Cluster
 * @return
 */
public static String formatCluster(Cluster cluster){
  return cluster.getIdentifier() + "String_Node_Str" + cluster.computeCentroid().asFormatString();
}
Program: 61393
Project: 61393
Buggy source:
/** 
 * Construct a new cluster with the given point as its center
 * @param center the center point
 */
public Cluster(Vector center,int clusterId){
  this.clusterId=clusterId;
  this.center=center;
  this.numPoints=0;
  this.pointTotal=center.like();
}

Fixed version (ground truth):
/** 
 * Construct a new clsuter with the given id as identifier
 * @param identifier
 */
public Cluster(String clusterId){
  this.clusterId=Integer.parseInt((clusterId.substring(1)));
  this.numPoints=0;
  this.converged=clusterId.startsWith("String_Node_Str");
}
Program: 61394
Project: 61394
Buggy source:
/** 
 * Configure the distance measure from the job
 * @param job the JobConf for the job
 */
public static void configure(JobConf job){
  try {
    ClassLoader ccl=Thread.currentThread().getContextClassLoader();
    Class<?> cl=ccl.loadClass(job.get(DISTANCE_MEASURE_KEY));
    measure=(DistanceMeasure)cl.newInstance();
    measure.configure(job);
    convergenceDelta=Double.parseDouble(job.get(CLUSTER_CONVERGENCE_KEY));
    nextClusterId=0;
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(e);
  }
catch (  InstantiationException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Configure the distance measure from the job
 * @param job the JobConf for the job
 */
public static void configure(JobConf job){
  try {
    final ClassLoader ccl=Thread.currentThread().getContextClassLoader();
    Class<?> cl=ccl.loadClass(job.get(DISTANCE_MEASURE_KEY));
    measure=(DistanceMeasure)cl.newInstance();
    measure.configure(job);
    convergenceDelta=Double.parseDouble(job.get(CLUSTER_CONVERGENCE_KEY));
    nextClusterId=0;
  }
 catch (  ClassNotFoundException e) {
    throw new RuntimeException(e);
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(e);
  }
catch (  InstantiationException e) {
    throw new RuntimeException(e);
  }
}
Program: 61395
Project: 61395
Buggy source:
/** 
 * Add the point to the cluster
 * @param point a point to add
 */
public void addPoint(Vector point){
  centroid=null;
  numPoints++;
  if (pointTotal == null)   pointTotal=point.copy();
 else   pointTotal=point.plus(pointTotal);
}

Fixed version (ground truth):
/** 
 * Add the point to the cluster
 * @param point a point to add
 */
public void addPoint(Vector point){
  addPoints(1,point);
}
Program: 61396
Project: 61396
Buggy source:
/** 
 * Emit the point to the nearest cluster center
 * @param point a point
 * @param clusters a List<Cluster> to test
 * @param values a Writable containing the input point and possible other values of interest (payload)
 * @param output the OutputCollector to emit into
 * @throws IOException
 */
public static void emitPointToNearestCluster(Vector point,List<Cluster> clusters,Text values,OutputCollector<Text,Text> output) throws IOException {
  Cluster nearestCluster=null;
  double nearestDistance=Double.MAX_VALUE;
  for (  Cluster cluster : clusters) {
    double distance=measure.distance(point,cluster.getCenter());
    if (nearestCluster == null || distance < nearestDistance) {
      nearestCluster=cluster;
      nearestDistance=distance;
    }
  }
  output.collect(new Text(formatCluster(nearestCluster)),values);
}

Fixed version (ground truth):
/** 
 * Emit the point to the nearest cluster center
 * @param point a point
 * @param clusters a List<Cluster> to test
 * @param values a Writable containing the input point and possible othervalues of interest (payload)
 * @param output the OutputCollector to emit into
 * @throws IOException
 */
public static void emitPointToNearestCluster(Vector point,List<Cluster> clusters,Text values,OutputCollector<Text,Text> output) throws IOException {
  Cluster nearestCluster=null;
  double nearestDistance=Double.MAX_VALUE;
  for (  Cluster cluster : clusters) {
    double distance=measure.distance(point,cluster.getCenter());
    if (nearestCluster == null || distance < nearestDistance) {
      nearestCluster=cluster;
      nearestDistance=distance;
    }
  }
  String outKey=nearestCluster.getIdentifier();
  String value="String_Node_Str" + values.toString();
  output.collect(new Text(outKey),new Text(value));
}
Program: 61397
Project: 61397
Buggy source:
@Override public void reduce(Text key,Iterator<Text> values,OutputCollector<Text,Text> output,Reporter reporter) throws IOException {
  Cluster cluster=Cluster.decodeCluster(key.toString());
  while (values.hasNext()) {
    cluster.addPoint(AbstractVector.decodeVector(values.next().toString()));
  }
  output.collect(key,new Text(cluster.getNumPoints() + "String_Node_Str" + cluster.getPointTotal().asFormatString()));
}

Fixed version (ground truth):
@Override public void reduce(Text key,Iterator<Text> values,OutputCollector<Text,Text> output,Reporter reporter) throws IOException {
  Cluster cluster=new Cluster(key.toString());
  while (values.hasNext()) {
    String[] numPointnValue=values.next().toString().split("String_Node_Str");
    cluster.addPoints(Integer.parseInt(numPointnValue[0].trim()),AbstractVector.decodeVector(numPointnValue[1].trim()));
  }
  output.collect(key,new Text(cluster.getNumPoints() + "String_Node_Str" + cluster.getPointTotal().asFormatString()));
}
Program: 61398
Project: 61398
Buggy source:
/** 
 * @param dataFile file containing preferences data. If file is compressed (and name ends in .gzor .zip accordingly) it will be decompressed as it is read)
 * @throws FileNotFoundException if dataFile does not exist
 */
public FileDataModel(File dataFile) throws FileNotFoundException {
  if (dataFile == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!dataFile.exists() || dataFile.isDirectory()) {
    throw new FileNotFoundException(dataFile.toString());
  }
  this.delimiter=UNKNOWN_DELIMITER;
  log.info("String_Node_Str" + dataFile);
  this.dataFile=dataFile;
  this.lastModified=dataFile.lastModified();
  this.reloadLock=new ReentrantLock();
}

Fixed version (ground truth):
/** 
 * @param dataFile file containing preferences data. If file is compressed (and name ends in .gzor .zip accordingly) it will be decompressed as it is read)
 * @throws FileNotFoundException if dataFile does not exist
 */
public FileDataModel(File dataFile) throws FileNotFoundException {
  if (dataFile == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!dataFile.exists() || dataFile.isDirectory()) {
    throw new FileNotFoundException(dataFile.toString());
  }
  this.delimiter=UNKNOWN_DELIMITER;
  log.info("String_Node_Str" + dataFile);
  this.dataFile=dataFile.getAbsoluteFile();
  this.lastModified=dataFile.lastModified();
  this.reloadLock=new ReentrantLock();
}
Program: 61399
Project: 61399
Buggy source:
public void refresh(){
  recommender.refresh();
}

Fixed version (ground truth):
public void refresh(Collection<Refreshable> alreadyRefreshed){
  recommender.refresh(alreadyRefreshed);
}
Program: 61400
Project: 61400
Buggy source:
private void buildAverageDiffs() throws TasteException {
  log.info("String_Node_Str");
  try {
    buildAverageDiffsLock.writeLock().lock();
    long averageCount=0L;
    for (    User user : dataModel.getUsers()) {
      averageCount=processOneUser(averageCount,user);
    }
    double numItems=(double)dataModel.getNumItems();
    double threshold=1.0 / numItems / numItems/ numItems;
    for (Iterator<Map<Object,RunningAverage>> it1=averageDiffs.values().iterator(); it1.hasNext(); ) {
      Map<Object,RunningAverage> map=it1.next();
      for (Iterator<RunningAverage> it2=map.values().iterator(); it2.hasNext(); ) {
        RunningAverage average=it2.next();
        if (Math.abs(average.getAverage()) < threshold) {
          it2.remove();
        }
      }
      if (map.isEmpty()) {
        it1.remove();
      }
    }
  }
  finally {
    buildAverageDiffsLock.writeLock().unlock();
  }
}

Fixed version (ground truth):
private void buildAverageDiffs() throws TasteException {
  log.info("String_Node_Str");
  try {
    buildAverageDiffsLock.writeLock().lock();
    averageDiffs.clear();
    long averageCount=0L;
    for (    User user : dataModel.getUsers()) {
      averageCount=processOneUser(averageCount,user);
    }
    double numItems=(double)dataModel.getNumItems();
    double threshold=1.0 / numItems / numItems/ numItems;
    for (Iterator<Map<Object,RunningAverage>> it1=averageDiffs.values().iterator(); it1.hasNext(); ) {
      Map<Object,RunningAverage> map=it1.next();
      for (Iterator<RunningAverage> it2=map.values().iterator(); it2.hasNext(); ) {
        RunningAverage average=it2.next();
        if (Math.abs(average.getAverage()) < threshold) {
          it2.remove();
        }
      }
      if (map.isEmpty()) {
        it1.remove();
      }
    }
  }
  finally {
    buildAverageDiffsLock.writeLock().unlock();
  }
}
Program: 61401
Project: 61401
Buggy source:
public void testRecommender() throws Exception {
  Recommender recommender=buildRecommender();
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(1,recommended.size());
  RecommendedItem firstRecommended=recommended.get(0);
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.1,firstRecommended.getValue(),EPSILON);
}

Fixed version (ground truth):
public void testRecommender() throws Exception {
  Recommender recommender=buildRecommender();
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(1,recommended.size());
  RecommendedItem firstRecommended=recommended.get(0);
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.1,firstRecommended.getValue(),EPSILON);
  recommender.refresh();
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.1,firstRecommended.getValue(),EPSILON);
}
Program: 61402
Project: 61402
Buggy source:
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  Collection<GenericItemCorrelation.ItemItemCorrelation> correlations=new ArrayList<GenericItemCorrelation.ItemItemCorrelation>(6);
  for (int i=0; i < 6; i++) {
    for (int j=i + 1; j < 6; j++) {
      correlations.add(new GenericItemCorrelation.ItemItemCorrelation(new GenericItem<String>(String.valueOf(i)),new GenericItem<String>(String.valueOf(j)),1.0 / (1.0 + (double)i + (double)j)));
    }
  }
  ItemCorrelation correlation=new GenericItemCorrelation(correlations);
  Recommender recommender=new GenericItemBasedRecommender(dataModel,correlation);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}

Fixed version (ground truth):
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  Collection<GenericItemCorrelation.ItemItemCorrelation> correlations=new ArrayList<GenericItemCorrelation.ItemItemCorrelation>(6);
  for (int i=0; i < 6; i++) {
    for (int j=i + 1; j < 6; j++) {
      correlations.add(new GenericItemCorrelation.ItemItemCorrelation(new GenericItem<String>(String.valueOf(i)),new GenericItem<String>(String.valueOf(j)),1.0 / (1.0 + (double)i + (double)j)));
    }
  }
  ItemCorrelation correlation=new GenericItemCorrelation(correlations);
  Recommender recommender=new GenericItemBasedRecommender(dataModel,correlation);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
  recommender.refresh();
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}
Program: 61403
Project: 61403
Buggy source:
public void testRecommender() throws Exception {
  Recommender recommender=buildRecommender();
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(1,recommended.size());
  RecommendedItem firstRecommended=recommended.get(0);
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.3,firstRecommended.getValue());
}

Fixed version (ground truth):
public void testRecommender() throws Exception {
  Recommender recommender=buildRecommender();
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(1,recommended.size());
  RecommendedItem firstRecommended=recommended.get(0);
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.3,firstRecommended.getValue());
  recommender.refresh();
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.3,firstRecommended.getValue());
}
Program: 61404
Project: 61404
Buggy source:
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  UserCorrelation correlation=new PearsonCorrelation(dataModel);
  UserNeighborhood neighborhood=new NearestNUserNeighborhood(2,correlation,dataModel);
  Recommender recommender=new GenericUserBasedRecommender(dataModel,neighborhood,correlation);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}

Fixed version (ground truth):
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  UserCorrelation correlation=new PearsonCorrelation(dataModel);
  UserNeighborhood neighborhood=new NearestNUserNeighborhood(2,correlation,dataModel);
  Recommender recommender=new GenericUserBasedRecommender(dataModel,neighborhood,correlation);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
  recommender.refresh();
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}
Program: 61405
Project: 61405
Buggy source:
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  UserCorrelation correlation=new PearsonCorrelation(dataModel);
  ClusterSimilarity similarity=new FarthestNeighborClusterSimilarity(correlation);
  Recommender recommender=new TreeClusteringRecommender(dataModel,similarity,2);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}

Fixed version (ground truth):
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  UserCorrelation correlation=new PearsonCorrelation(dataModel);
  ClusterSimilarity similarity=new FarthestNeighborClusterSimilarity(correlation);
  Recommender recommender=new TreeClusteringRecommender(dataModel,similarity,2);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
  recommender.refresh();
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}
Program: 61406
Project: 61406
Buggy source:
public void testNoRecommendations() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1));
  users.add(getUser("String_Node_Str",0.2,0.6));
  users.add(getUser("String_Node_Str",0.4,0.9));
  DataModel dataModel=new GenericDataModel(users);
  UserCorrelation correlation=new PearsonCorrelation(dataModel);
  ClusterSimilarity similarity=new FarthestNeighborClusterSimilarity(correlation);
  Recommender recommender=new TreeClusteringRecommender(dataModel,similarity,2);
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(0,recommended.size());
}

Fixed version (ground truth):
public void testNoRecommendations() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1));
  users.add(getUser("String_Node_Str",0.2,0.6));
  users.add(getUser("String_Node_Str",0.4,0.9));
  DataModel dataModel=new GenericDataModel(users);
  UserCorrelation correlation=new PearsonCorrelation(dataModel);
  ClusterSimilarity similarity=new FarthestNeighborClusterSimilarity(correlation);
  Recommender recommender=new TreeClusteringRecommender(dataModel,similarity,2);
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(0,recommended.size());
  recommender.refresh();
  assertNotNull(recommended);
  assertEquals(0,recommended.size());
}
Program: 61407
Project: 61407
Buggy source:
public void testRecommender() throws Exception {
  Recommender recommender=buildRecommender();
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(1,recommended.size());
  RecommendedItem firstRecommended=recommended.get(0);
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.34803885284992736,firstRecommended.getValue(),EPSILON);
}

Fixed version (ground truth):
public void testRecommender() throws Exception {
  Recommender recommender=buildRecommender();
  List<RecommendedItem> recommended=recommender.recommend("String_Node_Str",1);
  assertNotNull(recommended);
  assertEquals(1,recommended.size());
  RecommendedItem firstRecommended=recommended.get(0);
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.34803885284992736,firstRecommended.getValue(),EPSILON);
  recommender.refresh();
  assertEquals(new GenericItem<String>("String_Node_Str"),firstRecommended.getItem());
  assertEquals(0.34803885284992736,firstRecommended.getValue(),EPSILON);
}
Program: 61408
Project: 61408
Buggy source:
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  Recommender recommender=new SlopeOneRecommender(dataModel);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}

Fixed version (ground truth):
public void testHowMany() throws Exception {
  List<User> users=new ArrayList<User>(3);
  users.add(getUser("String_Node_Str",0.1,0.2));
  users.add(getUser("String_Node_Str",0.2,0.3,0.3,0.6));
  users.add(getUser("String_Node_Str",0.4,0.4,0.5,0.9));
  users.add(getUser("String_Node_Str",0.1,0.4,0.5,0.8,0.9,1.0));
  users.add(getUser("String_Node_Str",0.2,0.3,0.6,0.7,0.1,0.2));
  DataModel dataModel=new GenericDataModel(users);
  Recommender recommender=new SlopeOneRecommender(dataModel);
  List<RecommendedItem> fewRecommended=recommender.recommend("String_Node_Str",2);
  List<RecommendedItem> moreRecommended=recommender.recommend("String_Node_Str",4);
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
  recommender.refresh();
  for (int i=0; i < fewRecommended.size(); i++) {
    assertEquals(fewRecommended.get(i).getItem(),moreRecommended.get(i).getItem());
  }
}
Program: 61409
Project: 61409
Buggy source:
/** 
 * Configure the Canopy and its distance measure
 * @param job the JobConf for this job
 */
public static void configure(JobConf job){
  try {
    Class cl=Class.forName(job.get(DISTANCE_MEASURE_KEY));
    measure=(DistanceMeasure)cl.newInstance();
    measure.configure(job);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  nextCanopyId=0;
  t1=new Float(job.get(T1_KEY));
  t2=new Float(job.get(T2_KEY));
}

Fixed version (ground truth):
/** 
 * Configure the Canopy and its distance measure
 * @param job the JobConf for this job
 */
public static void configure(JobConf job){
  try {
    final ClassLoader ccl=Thread.currentThread().getContextClassLoader();
    Class cl=ccl.loadClass(job.get(DISTANCE_MEASURE_KEY));
    measure=(DistanceMeasure)cl.newInstance();
    measure.configure(job);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
  nextCanopyId=0;
  t1=new Float(job.get(T1_KEY));
  t2=new Float(job.get(T2_KEY));
}
Program: 61410
Project: 61410
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  String input=args[0];
  String output=args[1];
  String measureClassName=args[2];
  float t1=new Float(args[3]);
  float t2=new Float(args[4]);
  String jarLocation="String_Node_Str";
  if (args.length > 5) {
    jarLocation=args[5];
  }
  runJob(input,output,measureClassName,t1,t2,jarLocation);
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  String input=args[0];
  String output=args[1];
  String measureClassName=args[2];
  float t1=new Float(args[3]);
  float t2=new Float(args[4]);
  runJob(input,output,measureClassName,t1,t2);
}
Program: 61411
Project: 61411
Buggy source:
/** 
 * Run the job
 * @param input            the input pathname String
 * @param output           the output pathname String
 * @param measureClassName the DistanceMeasure class name
 * @param t1               the T1 distance threshold
 * @param t2               the T2 distance threshold
 */
public static void runJob(String input,String output,String measureClassName,float t1,float t2,String jarLocation){
  CanopyDriver.runJob(input,output + "String_Node_Str",measureClassName,t1,t2,jarLocation);
  ClusterDriver.runJob(input,output + "String_Node_Str",output,measureClassName,t1,t2,jarLocation);
}

Fixed version (ground truth):
/** 
 * Run the job
 * @param input            the input pathname String
 * @param output           the output pathname String
 * @param measureClassName the DistanceMeasure class name
 * @param t1               the T1 distance threshold
 * @param t2               the T2 distance threshold
 */
public static void runJob(String input,String output,String measureClassName,float t1,float t2){
  CanopyDriver.runJob(input,output + "String_Node_Str",measureClassName,t1,t2);
  ClusterDriver.runJob(input,output + "String_Node_Str",output,measureClassName,t1,t2);
}
Program: 61412
Project: 61412
Buggy source:
public static void main(String[] args){
  String input=args[0];
  String output=args[1];
  String measureClassName=args[2];
  float t1=new Float(args[3]);
  float t2=new Float(args[4]);
  String jarLocation="String_Node_Str";
  if (args.length > 5) {
    jarLocation=args[5];
  }
  runJob(input,output,measureClassName,t1,t2,jarLocation);
}

Fixed version (ground truth):
public static void main(String[] args){
  String input=args[0];
  String output=args[1];
  String measureClassName=args[2];
  float t1=new Float(args[3]);
  float t2=new Float(args[4]);
  runJob(input,output,measureClassName,t1,t2);
}
Program: 61413
Project: 61413
Buggy source:
/** 
 * Run the job
 * @param input            the input pathname String
 * @param output           the output pathname String
 * @param measureClassName the DistanceMeasure class name
 * @param t1               the T1 distance threshold
 * @param t2               the T2 distance threshold
 */
public static void runJob(String input,String output,String measureClassName,float t1,float t2,String jarLocation){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(org.apache.mahout.clustering.canopy.CanopyDriver.class);
  conf.setJar(jarLocation);
  conf.set(Canopy.DISTANCE_MEASURE_KEY,measureClassName);
  conf.set(Canopy.T1_KEY,"String_Node_Str" + t1);
  conf.set(Canopy.T2_KEY,"String_Node_Str" + t2);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(input));
  Path outPath=new Path(output);
  conf.setOutputPath(outPath);
  conf.setMapperClass(CanopyMapper.class);
  conf.setCombinerClass(CanopyCombiner.class);
  conf.setReducerClass(CanopyReducer.class);
  conf.setNumReduceTasks(1);
  conf.setOutputFormat(SequenceFileOutputFormat.class);
  client.setConf(conf);
  try {
    FileSystem dfs=FileSystem.get(conf);
    if (dfs.exists(outPath))     dfs.delete(outPath);
    JobClient.runJob(conf);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Run the job
 * @param input            the input pathname String
 * @param output           the output pathname String
 * @param measureClassName the DistanceMeasure class name
 * @param t1               the T1 distance threshold
 * @param t2               the T2 distance threshold
 */
public static void runJob(String input,String output,String measureClassName,float t1,float t2){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(org.apache.mahout.clustering.canopy.CanopyDriver.class);
  conf.set(Canopy.DISTANCE_MEASURE_KEY,measureClassName);
  conf.set(Canopy.T1_KEY,"String_Node_Str" + t1);
  conf.set(Canopy.T2_KEY,"String_Node_Str" + t2);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(input));
  Path outPath=new Path(output);
  conf.setOutputPath(outPath);
  conf.setMapperClass(CanopyMapper.class);
  conf.setCombinerClass(CanopyCombiner.class);
  conf.setReducerClass(CanopyReducer.class);
  conf.setNumReduceTasks(1);
  conf.setOutputFormat(SequenceFileOutputFormat.class);
  client.setConf(conf);
  try {
    FileSystem dfs=FileSystem.get(conf);
    if (dfs.exists(outPath))     dfs.delete(outPath);
    JobClient.runJob(conf);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 61414
Project: 61414
Buggy source:
public static void main(String[] args){
  String points=args[0];
  String canopies=args[1];
  String output=args[2];
  String measureClassName=args[3];
  float t1=new Float(args[4]);
  float t2=new Float(args[5]);
  String jarLocation="String_Node_Str";
  if (args.length > 6) {
    jarLocation=args[6];
  }
  runJob(points,canopies,output,measureClassName,t1,t2,jarLocation);
}

Fixed version (ground truth):
public static void main(String[] args){
  String points=args[0];
  String canopies=args[1];
  String output=args[2];
  String measureClassName=args[3];
  float t1=new Float(args[4]);
  float t2=new Float(args[5]);
  runJob(points,canopies,output,measureClassName,t1,t2);
}
Program: 61415
Project: 61415
Buggy source:
/** 
 * Run the job
 * @param points           the input points directory pathname String
 * @param canopies         the input canopies directory pathname String
 * @param output           the output directory pathname String
 * @param measureClassName the DistanceMeasure class name
 * @param t1               the T1 distance threshold
 * @param t2               the T2 distance threshold
 * @param jarLocation
 */
public static void runJob(String points,String canopies,String output,String measureClassName,float t1,float t2,String jarLocation){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(org.apache.mahout.clustering.canopy.ClusterDriver.class);
  conf.setJar(jarLocation);
  conf.set(Canopy.DISTANCE_MEASURE_KEY,measureClassName);
  conf.set(Canopy.T1_KEY,"String_Node_Str" + t1);
  conf.set(Canopy.T2_KEY,"String_Node_Str" + t2);
  conf.set(Canopy.CANOPY_PATH_KEY,canopies);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(points));
  Path outPath=new Path(output + "String_Node_Str");
  conf.setOutputPath(outPath);
  conf.setMapperClass(ClusterMapper.class);
  conf.setReducerClass(IdentityReducer.class);
  client.setConf(conf);
  try {
    FileSystem dfs=FileSystem.get(conf);
    if (dfs.exists(outPath))     dfs.delete(outPath);
    JobClient.runJob(conf);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Run the job
 * @param points           the input points directory pathname String
 * @param canopies         the input canopies directory pathname String
 * @param output           the output directory pathname String
 * @param measureClassName the DistanceMeasure class name
 * @param t1               the T1 distance threshold
 * @param t2               the T2 distance threshold
 * @param jarLocation
 */
public static void runJob(String points,String canopies,String output,String measureClassName,float t1,float t2){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(org.apache.mahout.clustering.canopy.ClusterDriver.class);
  conf.set(Canopy.DISTANCE_MEASURE_KEY,measureClassName);
  conf.set(Canopy.T1_KEY,"String_Node_Str" + t1);
  conf.set(Canopy.T2_KEY,"String_Node_Str" + t2);
  conf.set(Canopy.CANOPY_PATH_KEY,canopies);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(points));
  Path outPath=new Path(output + "String_Node_Str");
  conf.setOutputPath(outPath);
  conf.setMapperClass(ClusterMapper.class);
  conf.setReducerClass(IdentityReducer.class);
  client.setConf(conf);
  try {
    FileSystem dfs=FileSystem.get(conf);
    if (dfs.exists(outPath))     dfs.delete(outPath);
    JobClient.runJob(conf);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 61416
Project: 61416
Buggy source:
/** 
 * Configure the distance measure from the job
 * @param job the JobConf for the job
 */
public static void configure(JobConf job){
  try {
    Class cl=Class.forName(job.get(DISTANCE_MEASURE_KEY));
    measure=(DistanceMeasure)cl.newInstance();
    measure.configure(job);
    convergenceDelta=new Float(job.get(CLUSTER_CONVERGENCE_KEY));
    nextClusterId=0;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Configure the distance measure from the job
 * @param job the JobConf for the job
 */
public static void configure(JobConf job){
  try {
    final ClassLoader ccl=Thread.currentThread().getContextClassLoader();
    Class cl=ccl.loadClass(job.get(DISTANCE_MEASURE_KEY));
    measure=(DistanceMeasure)cl.newInstance();
    measure.configure(job);
    convergenceDelta=new Float(job.get(CLUSTER_CONVERGENCE_KEY));
    nextClusterId=0;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 61417
Project: 61417
Buggy source:
/** 
 * Run the job using supplied arguments
 * @param input            the directory pathname for input points
 * @param clustersIn       the directory pathname for input clusters
 * @param output           the directory pathname for output points
 * @param measureClass     the classname of the DistanceMeasure
 * @param convergenceDelta the convergence delta value
 * @param jarLocation      The location of the mahout jar
 */
static void runClustering(String input,String clustersIn,String output,String measureClass,String convergenceDelta,String jarLocation){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(KMeansDriver.class);
  conf.setJar(jarLocation);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(input));
  Path outPath=new Path(output);
  conf.setOutputPath(outPath);
  conf.setMapperClass(KMeansMapper.class);
  conf.setNumReduceTasks(0);
  conf.set(Cluster.CLUSTER_PATH_KEY,clustersIn);
  conf.set(Cluster.DISTANCE_MEASURE_KEY,measureClass);
  conf.set(Cluster.CLUSTER_CONVERGENCE_KEY,convergenceDelta);
  client.setConf(conf);
  try {
    JobClient.runJob(conf);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Run the job using supplied arguments
 * @param input            the directory pathname for input points
 * @param clustersIn       the directory pathname for input clusters
 * @param output           the directory pathname for output points
 * @param measureClass     the classname of the DistanceMeasure
 * @param convergenceDelta the convergence delta value
 */
static void runClustering(String input,String clustersIn,String output,String measureClass,String convergenceDelta){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(KMeansDriver.class);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(input));
  Path outPath=new Path(output);
  conf.setOutputPath(outPath);
  conf.setMapperClass(KMeansMapper.class);
  conf.setNumReduceTasks(0);
  conf.set(Cluster.CLUSTER_PATH_KEY,clustersIn);
  conf.set(Cluster.DISTANCE_MEASURE_KEY,measureClass);
  conf.set(Cluster.CLUSTER_CONVERGENCE_KEY,convergenceDelta);
  client.setConf(conf);
  try {
    JobClient.runJob(conf);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 61418
Project: 61418
Buggy source:
/** 
 * Run the job using supplied arguments
 * @param input            the directory pathname for input points
 * @param clustersIn       the directory pathname for iniput clusters
 * @param clustersOut      the directory pathname for output clusters
 * @param measureClass     the classname of the DistanceMeasure
 * @param convergenceDelta the convergence delta value
 * @param jarLocation      The location of the mahout jar
 * @return true if the iteration successfully runs
 */
static boolean runIteration(String input,String clustersIn,String clustersOut,String measureClass,String convergenceDelta,String jarLocation){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(KMeansDriver.class);
  conf.setJar(jarLocation);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(input));
  Path outPath=new Path(clustersOut);
  conf.setOutputPath(outPath);
  conf.setMapperClass(KMeansMapper.class);
  conf.setCombinerClass(KMeansCombiner.class);
  conf.setReducerClass(KMeansReducer.class);
  conf.setNumReduceTasks(1);
  conf.setOutputFormat(SequenceFileOutputFormat.class);
  conf.set(Cluster.CLUSTER_PATH_KEY,clustersIn);
  conf.set(Cluster.DISTANCE_MEASURE_KEY,measureClass);
  conf.set(Cluster.CLUSTER_CONVERGENCE_KEY,convergenceDelta);
  client.setConf(conf);
  try {
    JobClient.runJob(conf);
    FileSystem fs=FileSystem.get(conf);
    return isConverged(clustersOut + "String_Node_Str",conf,fs);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return true;
  }
}

Fixed version (ground truth):
/** 
 * Run the job using supplied arguments
 * @param input            the directory pathname for input points
 * @param clustersIn       the directory pathname for iniput clusters
 * @param clustersOut      the directory pathname for output clusters
 * @param measureClass     the classname of the DistanceMeasure
 * @param convergenceDelta the convergence delta value
 * @return true if the iteration successfully runs
 */
static boolean runIteration(String input,String clustersIn,String clustersOut,String measureClass,String convergenceDelta){
  JobClient client=new JobClient();
  JobConf conf=new JobConf(KMeansDriver.class);
  conf.setOutputKeyClass(Text.class);
  conf.setOutputValueClass(Text.class);
  conf.setInputPath(new Path(input));
  Path outPath=new Path(clustersOut);
  conf.setOutputPath(outPath);
  conf.setMapperClass(KMeansMapper.class);
  conf.setCombinerClass(KMeansCombiner.class);
  conf.setReducerClass(KMeansReducer.class);
  conf.setNumReduceTasks(1);
  conf.setOutputFormat(SequenceFileOutputFormat.class);
  conf.set(Cluster.CLUSTER_PATH_KEY,clustersIn);
  conf.set(Cluster.DISTANCE_MEASURE_KEY,measureClass);
  conf.set(Cluster.CLUSTER_CONVERGENCE_KEY,convergenceDelta);
  client.setConf(conf);
  try {
    JobClient.runJob(conf);
    FileSystem fs=FileSystem.get(conf);
    return isConverged(clustersOut + "String_Node_Str",conf,fs);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return true;
  }
}
Program: 61419
Project: 61419
Buggy source:
public static void main(String[] args){
  String input=args[0];
  String clusters=args[1];
  String output=args[2];
  String measureClass=args[3];
  String convergenceDelta=args[4];
  String maxIterations=args[5];
  String jarLocation="String_Node_Str";
  if (args.length > 6) {
    jarLocation=args[6];
  }
  runJob(input,clusters,output,measureClass,convergenceDelta,maxIterations,jarLocation);
}

Fixed version (ground truth):
public static void main(String[] args){
  String input=args[0];
  String clusters=args[1];
  String output=args[2];
  String measureClass=args[3];
  String convergenceDelta=args[4];
  String maxIterations=args[5];
  runJob(input,clusters,output,measureClass,convergenceDelta,maxIterations);
}