Program: 33027
Project: 33027
Buggy source:
static void verify(Config config) throws Exception {
  String output=config.getString("String_Node_Str");
  String modelName=config.getString("String_Node_Str");
  HMLGradientBoosting boosting=HMLGradientBoosting.deserialize(new File(output,modelName));
  MultiLabelClfDataSet dataSet=loadTrainData(config);
  LabelTranslator labelTranslator=dataSet.getLabelTranslator();
  System.out.println("String_Node_Str" + Accuracy.accuracy(boosting,dataSet));
  if (config.getBoolean("String_Node_Str")) {
    int limit=config.getInt("String_Node_Str");
    List<TopFeatures> topFeaturesList=IntStream.range(0,dataSet.getNumClasses()).mapToObj(k -> HMLGBInspector.topFeatures(boosting,k,limit)).collect(Collectors.toList());
    ObjectMapper mapper=new ObjectMapper();
    String file=config.getString("String_Node_Str");
    mapper.writeValue(new File(config.getString("String_Node_Str"),file),topFeaturesList);
  }
  if (config.getBoolean("String_Node_Str")) {
    int limit=config.getInt("String_Node_Str");
    List<MultiLabelPredictionAnalysis> analysisList=IntStream.range(0,dataSet.getNumDataPoints()).parallel().filter(i -> {
      MultiLabel multiLabel=dataSet.getMultiLabels()[i];
      MultiLabel prediction=boosting.predict(dataSet.getRow(i));
      boolean accept=false;
      if (config.getBoolean("String_Node_Str")) {
        accept=accept || multiLabel.equals(prediction);
      }
      if (config.getBoolean("String_Node_Str")) {
        accept=accept || !multiLabel.equals(prediction);
      }
      return accept;
    }
).mapToObj(i -> {
      MultiLabel multiLabel=dataSet.getMultiLabels()[i];
      MultiLabel prediction=boosting.predict(dataSet.getRow(i));
      List<Integer> classes=new ArrayList<Integer>();
      for (int k=0; k < dataSet.getNumClasses(); k++) {
        boolean condition1=multiLabel.matchClass(k) && prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean condition2=!multiLabel.matchClass(k) && !prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean condition3=!multiLabel.matchClass(k) && prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean condition4=multiLabel.matchClass(k) && !prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean accept=condition1 || condition2 || condition3|| condition4;
        if (accept) {
          classes.add(k);
        }
      }
      return HMLGBInspector.analyzePrediction(boosting,dataSet,i,classes,limit);
    }
).collect(Collectors.toList());
    int numDocsPerFile=config.getInt("String_Node_Str");
    int numFiles=(int)Math.ceil((double)analysisList.size() / numDocsPerFile);
    for (int i=0; i < numFiles; i++) {
      int start=i;
      int end=i + numDocsPerFile;
      List<MultiLabelPredictionAnalysis> partition=new ArrayList<>();
      for (int a=start; a < end; a++) {
        partition.add(analysisList.get(a));
      }
      ObjectMapper mapper=new ObjectMapper();
      String fileName=config.getString("String_Node_Str");
      int suffixIndex=fileName.lastIndexOf("String_Node_Str");
      if (suffixIndex == -1) {
        suffixIndex=fileName.length();
      }
      String file=fileName.substring(0,suffixIndex) + "String_Node_Str" + (i + 1)+ "String_Node_Str";
      mapper.writeValue(new File(config.getString("String_Node_Str"),file),partition);
    }
  }
}

Fixed version (ground truth):
static void verify(Config config) throws Exception {
  String output=config.getString("String_Node_Str");
  String modelName=config.getString("String_Node_Str");
  HMLGradientBoosting boosting=HMLGradientBoosting.deserialize(new File(output,modelName));
  MultiLabelClfDataSet dataSet=loadTrainData(config);
  LabelTranslator labelTranslator=dataSet.getLabelTranslator();
  System.out.println("String_Node_Str" + Accuracy.accuracy(boosting,dataSet));
  if (config.getBoolean("String_Node_Str")) {
    int limit=config.getInt("String_Node_Str");
    List<TopFeatures> topFeaturesList=IntStream.range(0,dataSet.getNumClasses()).mapToObj(k -> HMLGBInspector.topFeatures(boosting,k,limit)).collect(Collectors.toList());
    ObjectMapper mapper=new ObjectMapper();
    String file=config.getString("String_Node_Str");
    mapper.writeValue(new File(config.getString("String_Node_Str"),file),topFeaturesList);
  }
  if (config.getBoolean("String_Node_Str")) {
    int limit=config.getInt("String_Node_Str");
    List<MultiLabelPredictionAnalysis> analysisList=IntStream.range(0,dataSet.getNumDataPoints()).parallel().filter(i -> {
      MultiLabel multiLabel=dataSet.getMultiLabels()[i];
      MultiLabel prediction=boosting.predict(dataSet.getRow(i));
      boolean accept=false;
      if (config.getBoolean("String_Node_Str")) {
        accept=accept || multiLabel.equals(prediction);
      }
      if (config.getBoolean("String_Node_Str")) {
        accept=accept || !multiLabel.equals(prediction);
      }
      return accept;
    }
).mapToObj(i -> {
      MultiLabel multiLabel=dataSet.getMultiLabels()[i];
      MultiLabel prediction=boosting.predict(dataSet.getRow(i));
      List<Integer> classes=new ArrayList<Integer>();
      for (int k=0; k < dataSet.getNumClasses(); k++) {
        boolean condition1=multiLabel.matchClass(k) && prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean condition2=!multiLabel.matchClass(k) && !prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean condition3=!multiLabel.matchClass(k) && prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean condition4=multiLabel.matchClass(k) && !prediction.matchClass(k) && config.getBoolean("String_Node_Str");
        boolean accept=condition1 || condition2 || condition3|| condition4;
        if (accept) {
          classes.add(k);
        }
      }
      return HMLGBInspector.analyzePrediction(boosting,dataSet,i,classes,limit);
    }
).collect(Collectors.toList());
    int numDocsPerFile=config.getInt("String_Node_Str");
    int numFiles=(int)Math.ceil((double)analysisList.size() / numDocsPerFile);
    for (int i=0; i < numFiles; i++) {
      int start=i;
      int end=i + numDocsPerFile;
      List<MultiLabelPredictionAnalysis> partition=new ArrayList<>();
      for (int a=start; a < end && a < analysisList.size(); a++) {
        partition.add(analysisList.get(a));
      }
      ObjectMapper mapper=new ObjectMapper();
      String fileName=config.getString("String_Node_Str");
      int suffixIndex=fileName.lastIndexOf("String_Node_Str");
      if (suffixIndex == -1) {
        suffixIndex=fileName.length();
      }
      String file=fileName.substring(0,suffixIndex) + "String_Node_Str" + (i + 1)+ "String_Node_Str";
      mapper.writeValue(new File(config.getString("String_Node_Str"),file),partition);
    }
  }
}