Program: 32975
Project: 32975
Buggy source:
private static void test1() throws Exception {
  MultiLabelClfDataSet dataSet=TRECFormat.loadMultiLabelClfDataSet(new File(DATASETS,"String_Node_Str"),DataSetType.ML_CLF_SPARSE,true);
  MultiLabelClfDataSet testSet=TRECFormat.loadMultiLabelClfDataSet(new File(DATASETS,"String_Node_Str"),DataSetType.ML_CLF_SPARSE,true);
  int numClusters=4;
  BMMClassifier bmmClassifier=BMMClassifier.getBuilder().setNumClasses(dataSet.getNumClasses()).setNumFeatures(dataSet.getNumFeatures()).setNumClusters(numClusters).setBinaryClassifierType("String_Node_Str").setMultiClassClassifierType("String_Node_Str").build();
  bmmClassifier.setPredictMode("String_Node_Str");
  BMMOptimizer optimizer=new BMMOptimizer(bmmClassifier,dataSet);
  optimizer.setPriorVarianceBinary(10);
  optimizer.setPriorVarianceMultiClass(10);
  BMMInitializer.initialize(bmmClassifier,dataSet,optimizer);
  bmmClassifier.setNumSample(100);
  System.out.println("String_Node_Str" + bmmClassifier.numClusters);
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + Accuracy.accuracy(bmmClassifier,dataSet));
  System.out.println("String_Node_Str" + Accuracy.accuracy(bmmClassifier,testSet));
  for (int i=1; i <= 30; i++) {
    optimizer.iterate();
    System.out.print("String_Node_Str" + i + "String_Node_Str");
    System.out.print("String_Node_Str" + optimizer.getTerminator().getLastValue() + "String_Node_Str");
    System.out.print("String_Node_Str" + Accuracy.accuracy(bmmClassifier,dataSet) + "String_Node_Str");
    System.out.print("String_Node_Str" + Overlap.overlap(bmmClassifier,dataSet) + "String_Node_Str");
    System.out.print("String_Node_Str" + Accuracy.accuracy(bmmClassifier,testSet) + "String_Node_Str");
    System.out.println("String_Node_Str" + Overlap.overlap(bmmClassifier,testSet) + "String_Node_Str");
  }
  System.out.println("String_Node_Str" + optimizer.getTerminator().getHistory());
  System.out.println(bmmClassifier);
}

Fixed version (ground truth):
private static void test1() throws Exception {
  MultiLabelClfDataSet dataSet=TRECFormat.loadMultiLabelClfDataSet(new File(DATASETS,"String_Node_Str"),DataSetType.ML_CLF_SPARSE,true);
  MultiLabelClfDataSet testSet=TRECFormat.loadMultiLabelClfDataSet(new File(DATASETS,"String_Node_Str"),DataSetType.ML_CLF_SPARSE,true);
  int numClusters=4;
  BMMClassifier bmmClassifier=BMMClassifier.getBuilder().setNumClasses(dataSet.getNumClasses()).setNumFeatures(dataSet.getNumFeatures()).setNumClusters(numClusters).setMultiClassClassifierType("String_Node_Str").setBinaryClassifierType("String_Node_Str").build();
  bmmClassifier.setPredictMode("String_Node_Str");
  BMMOptimizer optimizer=new BMMOptimizer(bmmClassifier,dataSet);
  optimizer.setPriorVarianceBinary(10);
  optimizer.setPriorVarianceMultiClass(10);
  BMMInitializer.initialize(bmmClassifier,dataSet,optimizer);
  bmmClassifier.setNumSample(100);
  System.out.println("String_Node_Str" + bmmClassifier.numClusters);
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + Accuracy.accuracy(bmmClassifier,dataSet));
  System.out.println("String_Node_Str" + Accuracy.accuracy(bmmClassifier,testSet));
  for (int i=1; i <= 5; i++) {
    optimizer.iterate();
    System.out.print("String_Node_Str" + i + "String_Node_Str");
    System.out.print("String_Node_Str" + optimizer.getTerminator().getLastValue() + "String_Node_Str");
    System.out.print("String_Node_Str" + Accuracy.accuracy(bmmClassifier,dataSet) + "String_Node_Str");
    System.out.print("String_Node_Str" + Overlap.overlap(bmmClassifier,dataSet) + "String_Node_Str");
    System.out.print("String_Node_Str" + Accuracy.accuracy(bmmClassifier,testSet) + "String_Node_Str");
    System.out.println("String_Node_Str" + Overlap.overlap(bmmClassifier,testSet) + "String_Node_Str");
  }
  System.out.println("String_Node_Str" + optimizer.getTerminator().getHistory());
  System.out.println(bmmClassifier);
}