Program: 162787
Project: 162787
Buggy source:
@Override public Tuple2<Path,Double> call() throws IOException {
  List<?> hyperParameters=hyperParameterCombos.get(i % hyperParameterCombos.size());
  Path candidatePath=new Path(candidatesPath,Integer.toString(i));
  log.info("String_Node_Str",i,hyperParameters);
  Pair<JavaRDD<M>,JavaRDD<M>> trainTestData=splitTrainTest(newData,pastData);
  JavaRDD<M> allTrainData=trainTestData.getFirst();
  JavaRDD<M> testData=trainTestData.getSecond();
  allTrainData.cache();
  long trainDataSize=allTrainData == null ? 0 : allTrainData.count();
  long testDataSize=testData == null ? 0 : testData.count();
  log.info("String_Node_Str",trainDataSize,testDataSize);
  Double eval=null;
  if (trainDataSize <= 0) {
    log.info("String_Node_Str");
  }
 else {
    PMML model=buildModel(sparkContext,allTrainData,hyperParameters,candidatePath);
    if (model == null) {
      log.info("String_Node_Str");
    }
 else {
      Path modelPath=new Path(candidatePath,MODEL_FILE_NAME);
      log.info("String_Node_Str",modelPath);
      FileSystem fs=FileSystem.get(sparkContext.hadoopConfiguration());
      fs.mkdirs(candidatePath);
      try (OutputStream out=new GZIPOutputStream(fs.create(modelPath),1 << 16)){
        PMMLUtils.write(model,out);
      }
       if (testDataSize == 0) {
        log.info("String_Node_Str");
      }
 else {
        log.info("String_Node_Str");
        double thisEval=evaluate(sparkContext,model,candidatePath,testData);
        eval=Double.isNaN(thisEval) ? null : thisEval;
      }
    }
  }
  if (!allTrainData.getStorageLevel().equals(StorageLevel.NONE())) {
    allTrainData.unpersist();
  }
  log.info("String_Node_Str",hyperParameters,eval,candidatePath);
  return new Tuple2<>(candidatePath,eval);
}

Fixed version (ground truth):
@Override public Tuple2<Path,Double> call() throws IOException {
  List<?> hyperParameters=hyperParameterCombos.get(i % hyperParameterCombos.size());
  Path candidatePath=new Path(candidatesPath,Integer.toString(i));
  log.info("String_Node_Str",i,hyperParameters);
  Pair<JavaRDD<M>,JavaRDD<M>> trainTestData=splitTrainTest(newData,pastData);
  JavaRDD<M> allTrainData=trainTestData.getFirst();
  JavaRDD<M> testData=trainTestData.getSecond();
  Double eval=null;
  if (empty(allTrainData)) {
    log.info("String_Node_Str");
  }
 else {
    PMML model=buildModel(sparkContext,allTrainData,hyperParameters,candidatePath);
    if (model == null) {
      log.info("String_Node_Str");
    }
 else {
      Path modelPath=new Path(candidatePath,MODEL_FILE_NAME);
      log.info("String_Node_Str",modelPath);
      FileSystem fs=FileSystem.get(sparkContext.hadoopConfiguration());
      fs.mkdirs(candidatePath);
      try (OutputStream out=new GZIPOutputStream(fs.create(modelPath),1 << 16)){
        PMMLUtils.write(model,out);
      }
       if (empty(testData)) {
        log.info("String_Node_Str");
      }
 else {
        log.info("String_Node_Str");
        double thisEval=evaluate(sparkContext,model,candidatePath,testData);
        eval=Double.isNaN(thisEval) ? null : thisEval;
      }
    }
  }
  log.info("String_Node_Str",hyperParameters,eval,candidatePath);
  return new Tuple2<>(candidatePath,eval);
}