Program: 21240
Project: 21240
Buggy source:
public static void main(String[] args) throws Exception {
  includeClassVar=Boolean.parseBoolean(args[0]);
  linkHidden=Boolean.parseBoolean(args[1]);
  maxIterVI=Integer.parseInt(args[2]);
  thresholdVI=Double.parseDouble(args[3]);
  numIter=Integer.parseInt(args[4]);
  onlyFirstBatch=Boolean.parseBoolean(args[5]);
  monthsToEvaluate=Integer.parseInt(args[6]);
  addMixtures=Boolean.parseBoolean(args[7]);
  String path="String_Node_Str";
  String outputPath="String_Node_Str";
  for (int i=0; i < batchSize.length; i++) {
    for (int j=0; j < deltaValue.length; j++) {
      for (int k=0; k < memoryPopulationVI.length; k++) {
        for (int l=0; l < learningRate.length; l++) {
          DataStream<DataInstance> dataMonthi=DataStreamLoader.openFromFile(path + 0 + "String_Node_Str");
          dag=createDAG(dataMonthi.getAttributes(),5);
          maximumLikelihoodInit(createDAGforML(dataMonthi.getAttributes()));
          initSVBLearners(batchSize[i],deltaValue[j]);
          initVILearners(batchSize[i],memoryPopulationVI[k],learningRate[l]);
          writerPredLL=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str","String_Node_Str");
          writerLambda=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str","String_Node_Str");
          writerMean=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str","String_Node_Str");
          writerGamma=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str","String_Node_Str");
          for (int m=0; m < numIter; m++) {
            int currentMonth=m;
            dataMonthi=DataStreamLoader.openFromFile(path + currentMonth + "String_Node_Str");
            int batchCount=0;
            for (            DataOnMemory<DataInstance> batch : dataMonthi.iterableOverBatches(batchSize[i])) {
              System.out.println("String_Node_Str" + currentMonth + "String_Node_Str"+ batchCount+ "String_Node_Str");
              driftSVB.updateModelWithConceptDrift(batch);
              svb.updateModel(batch);
              populationVI.updateModel(batch);
              stochasticVI.updateModel(batch);
              if (monthsToEvaluate > 1) {
                double[] outputs=new double[4];
                double[] outputsAverage=new double[4];
                for (int n=m + 1; n < (m + 1 + monthsToEvaluate); n++) {
                  DataStream<DataInstance> dataMonthiEval=DataStreamLoader.openFromFile(path + n + "String_Node_Str");
                  for (                  DataOnMemory<DataInstance> batchEval : dataMonthiEval.iterableOverBatches(batchSize[i])) {
                    outputs=calculatePredLL(batchEval);
                    if (onlyFirstBatch)                     break;
                  }
                  for (int o=0; o < outputs.length; o++) {
                    outputsAverage[o]+=outputs[o];
                  }
                }
                for (int o=0; o < outputs.length; o++) {
                  outputsAverage[o]/=monthsToEvaluate;
                }
                printPredLL(outputsAverage,currentMonth);
                printCounts(currentMonth);
              }
 else               if (m > 0) {
                double[] outputs=calculatePredLL(batch);
                printPredLL(outputs,currentMonth);
                printCounts(currentMonth);
              }
              batchCount++;
              printOutput(currentMonth);
              if (onlyFirstBatch)               break;
            }
          }
          writerPredLL.close();
          writerLambda.close();
          writerMean.close();
          writerGamma.close();
        }
      }
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  includeClassVar=Boolean.parseBoolean(args[0]);
  linkHidden=Boolean.parseBoolean(args[1]);
  maxIterVI=Integer.parseInt(args[2]);
  thresholdVI=Double.parseDouble(args[3]);
  numIter=Integer.parseInt(args[4]);
  onlyFirstBatch=Boolean.parseBoolean(args[5]);
  monthsToEvaluate=Integer.parseInt(args[6]);
  addMixtures=Boolean.parseBoolean(args[7]);
  String path="String_Node_Str";
  String outputPath="String_Node_Str";
  for (int i=0; i < batchSize.length; i++) {
    for (int j=0; j < deltaValue.length; j++) {
      for (int k=0; k < memoryPopulationVI.length; k++) {
        for (int l=0; l < learningRate.length; l++) {
          DataStream<DataInstance> dataMonthi=DataStreamLoader.openFromFile(path + 0 + "String_Node_Str");
          dag=createDAGforML(dataMonthi.getAttributes());
          maximumLikelihoodInit(createDAGforML(dataMonthi.getAttributes()));
          initSVBLearners(batchSize[i],deltaValue[j]);
          initVILearners(batchSize[i],memoryPopulationVI[k],learningRate[l]);
          writerPredLL=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str"+ addMixtures+ "String_Node_Str","String_Node_Str");
          writerLambda=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str"+ addMixtures+ "String_Node_Str","String_Node_Str");
          writerMean=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str"+ addMixtures+ "String_Node_Str","String_Node_Str");
          writerGamma=new PrintWriter(outputPath + "String_Node_Str" + "String_Node_Str"+ batchSize[i]+ "String_Node_Str"+ deltaValue[j]+ "String_Node_Str"+ memoryPopulationVI[k]+ "String_Node_Str"+ learningRate[l]+ "String_Node_Str"+ includeClassVar+ "String_Node_Str"+ linkHidden+ "String_Node_Str"+ maxIterVI+ "String_Node_Str"+ thresholdVI+ "String_Node_Str"+ numIter+ "String_Node_Str"+ addMixtures+ "String_Node_Str","String_Node_Str");
          for (int m=0; m < numIter; m++) {
            int currentMonth=m;
            dataMonthi=DataStreamLoader.openFromFile(path + currentMonth + "String_Node_Str");
            int batchCount=0;
            for (            DataOnMemory<DataInstance> batch : dataMonthi.iterableOverBatches(batchSize[i])) {
              System.out.println("String_Node_Str" + currentMonth + "String_Node_Str"+ batchCount+ "String_Node_Str");
              driftSVB.updateModelWithConceptDrift(batch);
              svb.updateModel(batch);
              populationVI.updateModel(batch);
              stochasticVI.updateModel(batch);
              ml.updateModel(batch);
              mlPerBatch.initLearning();
              mlPerBatch.updateModel(batch);
              if (monthsToEvaluate > 1) {
                double[] outputs=new double[4];
                double[] outputsAverage=new double[4];
                for (int n=m + 1; n < (m + 1 + monthsToEvaluate); n++) {
                  DataStream<DataInstance> dataMonthiEval=DataStreamLoader.openFromFile(path + n + "String_Node_Str");
                  for (                  DataOnMemory<DataInstance> batchEval : dataMonthiEval.iterableOverBatches(batchSize[i])) {
                    outputs=calculatePredLL(batchEval);
                    if (onlyFirstBatch)                     break;
                  }
                  for (int o=0; o < outputs.length; o++) {
                    outputsAverage[o]+=outputs[o];
                  }
                }
                for (int o=0; o < outputs.length; o++) {
                  outputsAverage[o]/=monthsToEvaluate;
                }
                printPredLL(outputsAverage,currentMonth);
                printCounts(currentMonth);
              }
 else               if (m > 0) {
                double[] outputs=calculatePredLL(batch);
                printPredLL(outputs,currentMonth);
                printCounts(currentMonth);
              }
              batchCount++;
              if (onlyFirstBatch)               break;
            }
            printOutput(currentMonth);
          }
          writerPredLL.close();
          writerLambda.close();
          writerMean.close();
          writerGamma.close();
        }
      }
    }
  }
}