Program: 33061
Project: 33061
Buggy source:
static void build(Config config,MultiLabelIndex index) throws Exception {
  int numDocsInIndex=index.getNumDocs();
  String[] trainIndexIds=sampleTrain(config,index);
  System.out.println("String_Node_Str" + trainIndexIds.length);
  IdTranslator trainIdTranslator=loadIdTranslator(trainIndexIds);
  FeatureMappers featureMappers=new FeatureMappers();
  LabelTranslator labelTranslator=loadLabelTranslator(index);
  if (config.getBoolean("String_Node_Str")) {
    addInitialFeatures(config,index,featureMappers,trainIndexIds);
  }
  List<String> unigrams=gatherUnigrams(config,index,trainIndexIds);
  addUnigramFeatures(featureMappers,unigrams);
  MultiLabelClfDataSet trainDataSet=loadTrainData(config,index,featureMappers,trainIdTranslator,labelTranslator);
  System.out.println("String_Node_Str");
  DataSetUtil.setFeatureMappers(trainDataSet,featureMappers);
  saveDataSet(config,trainDataSet,config.getString("String_Node_Str"));
  if (config.getBoolean("String_Node_Str")) {
    dumpTrainFields(config,index,trainIdTranslator);
  }
  String[] testIndexIds=sampleTest(numDocsInIndex,trainIndexIds);
  IdTranslator testIdTranslator=loadIdTranslator(testIndexIds);
  MultiLabelClfDataSet testDataSet=loadTestData(config,index,featureMappers,testIdTranslator,labelTranslator);
  DataSetUtil.setFeatureMappers(testDataSet,featureMappers);
  saveDataSet(config,testDataSet,config.getString("String_Node_Str"));
  if (config.getBoolean("String_Node_Str")) {
    dumpTestFields(config,index,testIdTranslator);
  }
}

Fixed version (ground truth):
static void build(Config config,MultiLabelIndex index) throws Exception {
  int numDocsInIndex=index.getNumDocs();
  String[] trainIndexIds=sampleTrain(config,index);
  System.out.println("String_Node_Str" + trainIndexIds.length);
  IdTranslator trainIdTranslator=loadIdTranslator(trainIndexIds);
  FeatureMappers featureMappers=new FeatureMappers();
  LabelTranslator trainLabelTranslator=loadTrainLabelTranslator(index,trainIndexIds);
  if (config.getBoolean("String_Node_Str")) {
    addInitialFeatures(config,index,featureMappers,trainIndexIds);
  }
  List<String> unigrams=gatherUnigrams(config,index,trainIndexIds);
  addUnigramFeatures(featureMappers,unigrams);
  MultiLabelClfDataSet trainDataSet=loadTrainData(config,index,featureMappers,trainIdTranslator,trainLabelTranslator);
  System.out.println("String_Node_Str");
  DataSetUtil.setFeatureMappers(trainDataSet,featureMappers);
  saveDataSet(config,trainDataSet,config.getString("String_Node_Str"));
  if (config.getBoolean("String_Node_Str")) {
    dumpTrainFields(config,index,trainIdTranslator);
  }
  String[] testIndexIds=sampleTest(numDocsInIndex,trainIndexIds);
  IdTranslator testIdTranslator=loadIdTranslator(testIndexIds);
  LabelTranslator testLabelTranslator=loadTestLabelTranslator(index,testIndexIds,trainLabelTranslator);
  MultiLabelClfDataSet testDataSet=loadTestData(config,index,featureMappers,testIdTranslator,testLabelTranslator);
  DataSetUtil.setFeatureMappers(testDataSet,featureMappers);
  saveDataSet(config,testDataSet,config.getString("String_Node_Str"));
  if (config.getBoolean("String_Node_Str")) {
    dumpTestFields(config,index,testIdTranslator);
  }
}