Program: 21305
Project: 21305
Buggy source:
public void testingMLParallelWaste() throws Exception {
  final ExecutionEnvironment env=ExecutionEnvironment.getExecutionEnvironment();
  BayesianNetwork asianet=BayesianNetworkLoader.loadFromFile("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println(asianet.toString());
  eu.amidst.flinklink.core.utils.BayesianNetworkSampler sampler=new eu.amidst.flinklink.core.utils.BayesianNetworkSampler(asianet);
  sampler.setSeed(0);
  DataFlink<DataInstance> data=sampler.sampleToDataFlink(10000);
  DataFlinkWriter.writeDataToARFFFolder(data,"String_Node_Str");
  DataFlink<DataInstance> dataFlink=DataFlinkLoader.loadDataFromFolder(env,"String_Node_Str",false);
  ParallelVB parallelVB=new ParallelVB();
  parallelVB.setMaximumGlobalIterations(10);
  parallelVB.setSeed(5);
  parallelVB.setBatchSize(100);
  VMP vmp=parallelVB.getSVB().getPlateuStructure().getVMP();
  vmp.setOutput(true);
  vmp.setTestELBO(true);
  vmp.setMaxIter(100);
  vmp.setThreshold(0.0001);
  parallelVB.setDAG(asianet.getDAG());
  parallelVB.setDataFlink(dataFlink);
  parallelVB.runLearning();
  BayesianNetwork bnet=parallelVB.getLearntBayesianNetwork();
  for (  Variable var : asianet.getVariables()) {
    System.out.println("String_Node_Str" + var.getName() + "String_Node_Str");
    System.out.println("String_Node_Str" + asianet.getConditionalDistribution(var));
    System.out.println("String_Node_Str" + bnet.getConditionalDistribution(var));
    Assert.assertTrue(bnet.getConditionalDistribution(var).equalDist(asianet.getConditionalDistribution(var),0.4));
  }
  Assert.assertTrue(bnet.equalBNs(asianet,0.4));
}

Fixed version (ground truth):
public void testingMLParallelWaste() throws Exception {
  final ExecutionEnvironment env=ExecutionEnvironment.getExecutionEnvironment();
  BayesianNetwork asianet=BayesianNetworkLoader.loadFromFile("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println(asianet.toString());
  eu.amidst.flinklink.core.utils.BayesianNetworkSampler sampler=new eu.amidst.flinklink.core.utils.BayesianNetworkSampler(asianet);
  sampler.setSeed(0);
  DataFlink<DataInstance> data=sampler.sampleToDataFlink(10000);
  DataFlinkWriter.writeDataToARFFFolder(data,"String_Node_Str");
  DataFlink<DataInstance> dataFlink=DataFlinkLoader.loadDataFromFolder(env,"String_Node_Str",false);
  ParallelVB parallelVB=new ParallelVB();
  parallelVB.setMaximumGlobalIterations(10);
  parallelVB.setSeed(5);
  parallelVB.setBatchSize(1000);
  VMP vmp=parallelVB.getSVB().getPlateuStructure().getVMP();
  vmp.setOutput(true);
  vmp.setTestELBO(true);
  vmp.setMaxIter(100);
  vmp.setThreshold(0.0001);
  parallelVB.setDAG(asianet.getDAG());
  parallelVB.setDataFlink(dataFlink);
  parallelVB.runLearning();
  BayesianNetwork bnet=parallelVB.getLearntBayesianNetwork();
  for (  Variable var : asianet.getVariables()) {
    System.out.println("String_Node_Str" + var.getName() + "String_Node_Str");
    System.out.println("String_Node_Str" + asianet.getConditionalDistribution(var));
    System.out.println("String_Node_Str" + bnet.getConditionalDistribution(var));
    Assert.assertTrue(bnet.getConditionalDistribution(var).equalDist(asianet.getConditionalDistribution(var),0.4));
  }
  Assert.assertTrue(bnet.equalBNs(asianet,0.4));
}