Program: 140833
Project: 140833
Buggy source:
public static void main(String[] args){
  String outputDir="String_Node_Str";
  try {
    SeedableRandomPool pool=null;
    try {
      FAnovaOptions fanovaOpts=new FAnovaOptions();
      JCommander jcom;
      ;
      args=StateFactoryOptions.processScenarioStateRestore(args);
      ScenarioOptions scenarioOptions=fanovaOpts.scenOpts;
      try {
        jcom=JCommanderHelper.parseCheckingForHelpAndVersion(args,fanovaOpts);
        String runGroupName=fanovaOpts.getRunGroupName();
        scenarioOptions.makeOutputDirectory(runGroupName);
        outputDir=scenarioOptions.outputDirectory + File.separator + runGroupName;
        fanovaOpts.loggingOptions.initializeLogging(outputDir,fanovaOpts.seedOptions.numRun);
      }
  finally {
        log=LoggerFactory.getLogger(FAnovaExecutor.class);
      }
      VersionTracker.logVersions();
      for (      String name : jcom.getParameterFilesToRead()) {
        log.info("String_Node_Str",name);
      }
      if (fanovaOpts.rfOptions.logModel == null) {
switch (fanovaOpts.scenOpts.runObj) {
case RUNTIME:
          fanovaOpts.rfOptions.logModel=true;
        break;
case QUALITY:
      fanovaOpts.rfOptions.logModel=false;
  }
}
StateFactory sf=new LegacyStateFactory(null,fanovaOpts.stateFactoryOptions.restoreStateFrom);
AlgorithmExecutionConfig execConfig=scenarioOptions.algoExecOptions.getAlgorithmExecutionConfigSkipDirCheck();
ParamConfigurationSpace configSpace=execConfig.getParamFile();
List<ProblemInstance> instances=scenarioOptions.getTrainingAndTestProblemInstances(new File("String_Node_Str").getAbsolutePath(),0,0,true,false,false,false).getTrainingInstances().getInstances();
RunHistory rh=new ThreadSafeRunHistoryWrapper(new NewRunHistory(scenarioOptions.intraInstanceObj,scenarioOptions.interInstanceObj,scenarioOptions.runObj));
if (fanovaOpts.stateFactoryOptions.restoreIteration == null) {
  throw new ParameterException("String_Node_Str");
}
StateDeserializer sd=sf.getStateDeserializer("String_Node_Str",fanovaOpts.stateFactoryOptions.restoreIteration,configSpace,instances,execConfig,rh);
pool=fanovaOpts.seedOptions.getSeedableRandomPool();
if (fanovaOpts.numTrainingSamples > 0) {
  List<AlgorithmRun> algorithmRuns=rh.getAlgorithmRuns();
  Integer[] indices=new Integer[algorithmRuns.size()];
  for (int i=0; i < algorithmRuns.size(); i++) {
    indices[i]=i;
  }
  List<Integer> shuffledIndices=Arrays.asList(indices);
  Collections.shuffle(shuffledIndices,pool.getRandom("String_Node_Str"));
  RunHistory subsampledRH=new ThreadSafeRunHistoryWrapper(new NewRunHistory(scenarioOptions.intraInstanceObj,scenarioOptions.interInstanceObj,scenarioOptions.runObj));
  for (int i=0; i < fanovaOpts.numTrainingSamples; i++) {
    subsampledRH.append(algorithmRuns.get(shuffledIndices.get(i)));
  }
  rh=subsampledRH;
}
FunctionalANOVAModelBuilder famb=new FunctionalANOVAModelBuilder();
famb.learnModel(instances,rh,configSpace,fanovaOpts.rfOptions,fanovaOpts.mbOptions,scenarioOptions,true,pool);
boolean compareToDef=fanovaOpts.compare.equals(Improvements.DEFAULT) ? true : false;
double quantile=fanovaOpts.compare.equals(Improvements.QUANTILE) ? fanovaOpts.quantileToCompare : -1;
if (fanovaOpts.mode.equals("String_Node_Str")) {
  FunctionalANOVAVarianceDecompose favd=new FunctionalANOVAVarianceDecompose(famb.getRandomForest(),rh.getAlgorithmRuns(),configSpace,pool.getRandom("String_Node_Str"),compareToDef,quantile,fanovaOpts.rfOptions.logModel);
  FanovaRemote remote=new FanovaRemote(favd,new IPCMechanism("String_Node_Str",fanovaOpts.port),configSpace);
  remote.run();
}
 else {
  FunctionalANOVARunner.decomposeVariance(famb.getRandomForest(),rh.getAlgorithmRuns(),configSpace,pool.getRandom("String_Node_Str"),compareToDef,quantile,fanovaOpts.computePairwiseInteration,outputDir,fanovaOpts.rfOptions.logModel,fanovaOpts.plotMarginals);
}
}
  finally {
if (pool != null) {
  pool.logUsage();
}
}
}
 catch (ParameterException e) {
System.out.println(e);
log.error(e.getMessage());
if (log.isDebugEnabled()) {
log.error("String_Node_Str",e);
}
}
catch (Exception e) {
e.printStackTrace();
}
}

Fixed version (ground truth):
public static void main(String[] args){
  String outputDir="String_Node_Str";
  try {
    SeedableRandomPool pool=null;
    try {
      FAnovaOptions fanovaOpts=new FAnovaOptions();
      JCommander jcom;
      ;
      args=StateFactoryOptions.processScenarioStateRestore(args);
      ScenarioOptions scenarioOptions=fanovaOpts.scenOpts;
      try {
        jcom=JCommanderHelper.parseCheckingForHelpAndVersion(args,fanovaOpts);
        String runGroupName=fanovaOpts.getRunGroupName();
        scenarioOptions.makeOutputDirectory(runGroupName);
        outputDir=scenarioOptions.outputDirectory + File.separator + runGroupName;
        fanovaOpts.loggingOptions.initializeLogging(outputDir,fanovaOpts.seedOptions.numRun);
      }
  finally {
        log=LoggerFactory.getLogger(FAnovaExecutor.class);
      }
      VersionTracker.logVersions();
      for (      String name : jcom.getParameterFilesToRead()) {
        log.info("String_Node_Str",name);
      }
      if (fanovaOpts.rfOptions.logModel == null) {
switch (fanovaOpts.scenOpts.runObj) {
case RUNTIME:
          fanovaOpts.rfOptions.logModel=true;
        break;
case QUALITY:
      fanovaOpts.rfOptions.logModel=false;
  }
}
StateFactory sf=new LegacyStateFactory(null,fanovaOpts.stateFactoryOptions.restoreStateFrom);
AlgorithmExecutionConfig execConfig=scenarioOptions.algoExecOptions.getAlgorithmExecutionConfigSkipDirCheck();
ParamConfigurationSpace configSpace=execConfig.getParamFile();
List<ProblemInstance> instances=scenarioOptions.getTrainingAndTestProblemInstances(new File("String_Node_Str").getAbsolutePath(),0,0,true,false,false,false).getTrainingInstances().getInstances();
RunHistory rh=new ThreadSafeRunHistoryWrapper(new NewRunHistory(scenarioOptions.intraInstanceObj,scenarioOptions.interInstanceObj,scenarioOptions.runObj));
if (fanovaOpts.stateFactoryOptions.restoreIteration == null) {
  throw new ParameterException("String_Node_Str");
}
StateDeserializer sd=sf.getStateDeserializer("String_Node_Str",fanovaOpts.stateFactoryOptions.restoreIteration,configSpace,instances,execConfig,rh);
pool=fanovaOpts.seedOptions.getSeedableRandomPool();
if (fanovaOpts.numTrainingSamples > 0) {
  List<AlgorithmRun> algorithmRuns=rh.getAlgorithmRuns();
  Integer[] indices=new Integer[algorithmRuns.size()];
  for (int i=0; i < algorithmRuns.size(); i++) {
    indices[i]=i;
  }
  List<Integer> shuffledIndices=Arrays.asList(indices);
  Collections.shuffle(shuffledIndices,pool.getRandom("String_Node_Str"));
  RunHistory subsampledRH=new ThreadSafeRunHistoryWrapper(new NewRunHistory(scenarioOptions.intraInstanceObj,scenarioOptions.interInstanceObj,scenarioOptions.runObj));
  for (int i=0; i < fanovaOpts.numTrainingSamples; i++) {
    subsampledRH.append(algorithmRuns.get(shuffledIndices.get(i)));
  }
  rh=subsampledRH;
}
System.out.println("String_Node_Str");
System.out.println(fanovaOpts.rfOptions.splitMin);
FunctionalANOVAModelBuilder famb=new FunctionalANOVAModelBuilder();
famb.learnModel(instances,rh,configSpace,fanovaOpts.rfOptions,fanovaOpts.mbOptions,scenarioOptions,true,pool);
boolean compareToDef=fanovaOpts.compare.equals(Improvements.DEFAULT) ? true : false;
double quantile=fanovaOpts.compare.equals(Improvements.QUANTILE) ? fanovaOpts.quantileToCompare : -1;
if (fanovaOpts.mode.equals("String_Node_Str")) {
  FunctionalANOVAVarianceDecompose favd=new FunctionalANOVAVarianceDecompose(famb.getRandomForest(),rh.getAlgorithmRuns(),configSpace,pool.getRandom("String_Node_Str"),compareToDef,quantile,fanovaOpts.rfOptions.logModel);
  FanovaRemote remote=new FanovaRemote(favd,new IPCMechanism("String_Node_Str",fanovaOpts.port),configSpace);
  remote.run();
}
 else {
  FunctionalANOVARunner.decomposeVariance(famb.getRandomForest(),rh.getAlgorithmRuns(),configSpace,pool.getRandom("String_Node_Str"),compareToDef,quantile,fanovaOpts.computePairwiseInteration,outputDir,fanovaOpts.rfOptions.logModel,fanovaOpts.plotMarginals);
}
}
  finally {
if (pool != null) {
  pool.logUsage();
}
}
}
 catch (ParameterException e) {
System.out.println(e);
log.error(e.getMessage());
if (log.isDebugEnabled()) {
log.error("String_Node_Str",e);
}
}
catch (Exception e) {
e.printStackTrace();
}
}