Program: 31981
Project: 31981
Buggy source:
public ScoreObject score(final MLDataPair pair,Map<String,String> rawDataMap){
  if (pair == null) {
    return null;
  }
  List<Callable<MLData>> tasks=new ArrayList<Callable<MLData>>();
  for (  final BasicML model : models) {
    if (model instanceof BasicNetwork) {
      final BasicNetwork network=(BasicNetwork)model;
      if (network.getInputCount() != pair.getInput().size()) {
        log.error("String_Node_Str" + network.getInputCount() + "String_Node_Str"+ pair.getInput().size());
        continue;
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          return network.compute(pair.getInput());
        }
      }
);
    }
 else     if (model instanceof SVM) {
      final SVM svm=(SVM)model;
      if (svm.getInputCount() != pair.getInput().size()) {
        log.error("String_Node_Str" + svm.getInputCount() + "String_Node_Str"+ pair.getInput().size());
        continue;
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          return svm.compute(pair.getInput());
        }
      }
);
    }
 else     if (model instanceof LR) {
      final LR lr=(LR)model;
      if (lr.getInputCount() != pair.getInput().size()) {
        log.error("String_Node_Str" + lr.getInputCount() + "String_Node_Str"+ pair.getInput().size());
        continue;
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          return lr.compute(pair.getInput());
        }
      }
);
    }
 else     if (model instanceof TreeModel) {
      final TreeModel tm=(TreeModel)model;
      if (tm.getInputCount() != pair.getInput().size()) {
        throw new RuntimeException("String_Node_Str" + tm.getInputCount() + "String_Node_Str"+ pair.getInput().size());
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          MLData result=tm.compute(pair.getInput());
          return result;
        }
      }
);
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
  List<Integer> scores=new ArrayList<Integer>();
  List<Integer> rfTreeSizeList=new ArrayList<Integer>();
  if (CollectionUtils.isNotEmpty(tasks)) {
    List<MLData> modelResults=this.executorManager.submitTasksAndWaitResults(tasks);
    for (int i=0; i < this.models.size(); i++) {
      BasicML model=this.models.get(i);
      MLData score=modelResults.get(i);
      if (model instanceof BasicNetwork) {
        if (modelConfig != null && modelConfig.isRegression()) {
          scores.add(toScore(score.getData(0)));
        }
 else         if (modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll()) {
          scores.add(toScore(score.getData(0)));
        }
 else {
          double[] outputs=score.getData();
          for (          double d : outputs) {
            scores.add(toScore(d));
          }
        }
      }
 else       if (model instanceof SVM) {
        scores.add(toScore(score.getData(0)));
      }
 else       if (model instanceof LR) {
        scores.add(toScore(score.getData(0)));
      }
 else       if (model instanceof TreeModel) {
        if (modelConfig.isClassification() && !modelConfig.getTrain().isOneVsAll()) {
          double[] scoreArray=score.getData();
          for (          double sc : scoreArray) {
            scores.add((int)sc);
          }
        }
 else {
          scores.add(toScore(score.getData(0)));
        }
        final TreeModel tm=(TreeModel)model;
        if (!tm.isClassfication() && !tm.isGBDT()) {
          rfTreeSizeList.add(tm.getTrees().size());
        }
      }
 else {
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
  Integer tag=(int)pair.getIdeal().getData(0);
  if (scores.size() == 0) {
    log.error("String_Node_Str");
    return null;
  }
  return new ScoreObject(scores,tag,rfTreeSizeList);
}

Fixed version (ground truth):
public ScoreObject score(final MLDataPair pair,Map<String,String> rawDataMap){
  if (pair == null) {
    return null;
  }
  List<Callable<MLData>> tasks=new ArrayList<Callable<MLData>>();
  for (  final BasicML model : models) {
    if (model instanceof BasicNetwork) {
      final BasicNetwork network=(BasicNetwork)model;
      if (network.getInputCount() != pair.getInput().size()) {
        log.error("String_Node_Str" + network.getInputCount() + "String_Node_Str"+ pair.getInput().size());
        continue;
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          return network.compute(pair.getInput());
        }
      }
);
    }
 else     if (model instanceof SVM) {
      final SVM svm=(SVM)model;
      if (svm.getInputCount() != pair.getInput().size()) {
        log.error("String_Node_Str" + svm.getInputCount() + "String_Node_Str"+ pair.getInput().size());
        continue;
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          return svm.compute(pair.getInput());
        }
      }
);
    }
 else     if (model instanceof LR) {
      final LR lr=(LR)model;
      if (lr.getInputCount() != pair.getInput().size()) {
        log.error("String_Node_Str" + lr.getInputCount() + "String_Node_Str"+ pair.getInput().size());
        continue;
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          return lr.compute(pair.getInput());
        }
      }
);
    }
 else     if (model instanceof TreeModel) {
      final TreeModel tm=(TreeModel)model;
      if (tm.getInputCount() != pair.getInput().size()) {
        throw new RuntimeException("String_Node_Str" + tm.getInputCount() + "String_Node_Str"+ pair.getInput().size());
      }
      tasks.add(new Callable<MLData>(){
        @Override public MLData call() throws Exception {
          MLData result=tm.compute(pair.getInput());
          return result;
        }
      }
);
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
  List<Integer> scores=new ArrayList<Integer>();
  List<Integer> rfTreeSizeList=new ArrayList<Integer>();
  if (CollectionUtils.isNotEmpty(tasks)) {
    List<MLData> modelResults=this.executorManager.submitTasksAndWaitResults(tasks);
    if (CollectionUtils.isEmpty(modelResults) || modelResults.size() != this.models.size()) {
      log.error("String_Node_Str");
      return null;
    }
    for (int i=0; i < this.models.size(); i++) {
      BasicML model=this.models.get(i);
      MLData score=modelResults.get(i);
      if (model instanceof BasicNetwork) {
        if (modelConfig != null && modelConfig.isRegression()) {
          scores.add(toScore(score.getData(0)));
        }
 else         if (modelConfig.isClassification() && modelConfig.getTrain().isOneVsAll()) {
          scores.add(toScore(score.getData(0)));
        }
 else {
          double[] outputs=score.getData();
          for (          double d : outputs) {
            scores.add(toScore(d));
          }
        }
      }
 else       if (model instanceof SVM) {
        scores.add(toScore(score.getData(0)));
      }
 else       if (model instanceof LR) {
        scores.add(toScore(score.getData(0)));
      }
 else       if (model instanceof TreeModel) {
        if (modelConfig.isClassification() && !modelConfig.getTrain().isOneVsAll()) {
          double[] scoreArray=score.getData();
          for (          double sc : scoreArray) {
            scores.add((int)sc);
          }
        }
 else {
          scores.add(toScore(score.getData(0)));
        }
        final TreeModel tm=(TreeModel)model;
        if (!tm.isClassfication() && !tm.isGBDT()) {
          rfTreeSizeList.add(tm.getTrees().size());
        }
      }
 else {
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
  Integer tag=(int)pair.getIdeal().getData(0);
  if (scores.size() == 0) {
    log.error("String_Node_Str");
    return null;
  }
  return new ScoreObject(scores,tag,rfTreeSizeList);
}