Program: 21231
Project: 21231
Buggy source:
public static void main(String[] args) throws Exception {
  String dataPath="String_Node_Str";
  String dataTest="String_Node_Str";
  int ntopics=5;
  int niter=100;
  double threshold=0.1;
  int docsPerBatch=10;
  int timeLimit=-1;
  int ncores=4;
  boolean amazon_cluster=true;
  if (args.length > 1) {
    dataPath=args[0];
    dataTest=args[1];
    ntopics=Integer.parseInt(args[2]);
    niter=Integer.parseInt(args[3]);
    threshold=Double.parseDouble(args[4]);
    docsPerBatch=Integer.parseInt(args[5]);
    timeLimit=Integer.parseInt(args[6]);
    ncores=Integer.parseInt(args[7]);
    amazon_cluster=Boolean.parseBoolean(args[8]);
  }
  final ExecutionEnvironment env;
  if (amazon_cluster) {
    env=ExecutionEnvironment.getExecutionEnvironment();
  }
 else {
    Configuration conf=new Configuration();
    conf.setInteger("String_Node_Str",12000);
    conf.setInteger("String_Node_Str",ncores);
    env=ExecutionEnvironment.createLocalEnvironment(conf);
    env.setParallelism(ncores);
  }
  DataFlink<DataInstance> dataInstances=DataFlinkLoader.loadDataFromFile(env,dataPath,false);
  dVMP svb=new dVMP();
  PlateauLDAFlink plateauLDA=new PlateauLDAFlink(dataInstances.getAttributes(),"String_Node_Str","String_Node_Str");
  plateauLDA.setNTopics(ntopics);
  svb.setPlateuStructure(plateauLDA);
  svb.setOutput(true);
  svb.setMaximumGlobalIterations(niter);
  svb.setMaximumLocalIterations(niter);
  svb.setLocalThreshold(threshold);
  svb.setGlobalThreshold(threshold);
  svb.setTimeLimit(timeLimit);
  svb.setSeed(5);
  svb.setBatchSize(docsPerBatch);
  svb.setDataFlink(dataInstances);
  svb.setBatchConverter(ConversionToBatches::toBatchesBySeqID);
  svb.setDAG(plateauLDA.getDagLDA());
  svb.runLearning();
  DataFlink<DataInstance> instancesTest=DataFlinkLoader.loadDataFromFile(env,dataTest,false);
  double test_log_likelihood=StochasticVI.computeELBO(instancesTest,svb.getSVB(),ConversionToBatches::toBatchesBySeqID);
  System.out.println("String_Node_Str" + test_log_likelihood);
  if (args.length > 0) {
    args[0]="String_Node_Str";
    args[1]="String_Node_Str";
  }
  String pathNetwork="String_Node_Str" + Arrays.toString(args) + "String_Node_Str";
  svb.getSVB().setDAG(((PlateauLDAFlink)svb.getSVB().getPlateuStructure()).getDagLDA());
  System.out.println(svb.getLearntBayesianNetwork().toString());
  BayesianNetworkWriter.saveToFile(svb.getLearntBayesianNetwork(),pathNetwork);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  String dataPath="String_Node_Str";
  String dataTest="String_Node_Str";
  int ntopics=5;
  int niter=100;
  double threshold=0.1;
  int docsPerBatch=10;
  int timeLimit=-1;
  int ncores=4;
  boolean amazon_cluster=true;
  if (args.length > 1) {
    dataPath=args[0];
    dataTest=args[1];
    ntopics=Integer.parseInt(args[2]);
    niter=Integer.parseInt(args[3]);
    threshold=Double.parseDouble(args[4]);
    docsPerBatch=Integer.parseInt(args[5]);
    timeLimit=Integer.parseInt(args[6]);
    ncores=Integer.parseInt(args[7]);
    amazon_cluster=Boolean.parseBoolean(args[8]);
  }
  final ExecutionEnvironment env;
  if (amazon_cluster) {
    env=ExecutionEnvironment.getExecutionEnvironment();
  }
 else {
    Configuration conf=new Configuration();
    conf.setInteger("String_Node_Str",12000);
    conf.setInteger("String_Node_Str",ncores);
    env=ExecutionEnvironment.createLocalEnvironment(conf);
    env.setParallelism(ncores);
  }
  DataFlink<DataInstance> dataInstances=DataFlinkLoader.loadDataFromFile(env,dataPath,false);
  dVMP svb=new dVMP();
  PlateauLDAFlink plateauLDA=new PlateauLDAFlink(dataInstances.getAttributes(),"String_Node_Str","String_Node_Str");
  plateauLDA.setNTopics(ntopics);
  svb.setPlateuStructure(plateauLDA);
  svb.setOutput(true);
  svb.setMaximumGlobalIterations(niter);
  svb.setMaximumLocalIterations(niter);
  svb.setLocalThreshold(threshold);
  svb.setGlobalThreshold(threshold);
  svb.setTimeLimit(timeLimit);
  svb.setSeed(5);
  svb.setBatchSize(docsPerBatch);
  svb.setDataFlink(dataInstances);
  svb.setBatchConverter(ConversionToBatches::toBatchesBySeqID);
  svb.setDAG(plateauLDA.getDagLDA());
  svb.runLearning();
  DataFlink<DataInstance> instancesTest=DataFlinkLoader.loadDataFromFile(env,dataTest,false);
  double test_log_likelihood=StochasticVI.computeELBO(instancesTest,svb.getSVB(),ConversionToBatches::toBatchesBySeqID);
  System.out.println("String_Node_Str" + test_log_likelihood);
  if (args.length > 0) {
    args[0]="String_Node_Str";
    args[1]="String_Node_Str";
  }
  String pathNetwork="String_Node_Str" + Arrays.toString(args) + "String_Node_Str";
  svb.getSVB().setDAG(((PlateauLDAFlink)svb.getSVB().getPlateuStructure()).getDagLDA());
  System.out.println(svb.getLearntBayesianNetwork().toString());
  BayesianNetworkWriter.save(svb.getLearntBayesianNetwork(),pathNetwork);
}