Program: 29227
Project: 29227
Buggy source:
@Test public void testRegression() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiConfiguration siddhiConfiguration=new SiddhiConfiguration();
  List<Class> list=new ArrayList<Class>();
  list.add(org.wso2.siddhi.extension.timeseries.LinearRegressionTransformProcessor.class);
  siddhiConfiguration.setSiddhiExtensions(list);
  SiddhiManager siddhiManager=new SiddhiManager(siddhiConfiguration);
  InputHandler inputHandler=siddhiManager.defineStream("String_Node_Str");
  siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  String queryReference=siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  siddhiManager.addCallback(queryReference,new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(inEvents);
      count++;
      if (inEvents[0].getData1() != null) {
        betaZero=(Double)inEvents[0].getData1();
      }
    }
  }
);
  double ci=0.95;
  inputHandler.send(new Object[]{5.49,0.00});
  inputHandler.send(new Object[]{6.79,1.00});
  inputHandler.send(new Object[]{6.46,2.00});
  inputHandler.send(new Object[]{6.24,3.00});
  inputHandler.send(new Object[]{5.05,4.00});
  inputHandler.send(new Object[]{4.92,5.00});
  inputHandler.send(new Object[]{5.64,6.00});
  inputHandler.send(new Object[]{7.33,7.00});
  inputHandler.send(new Object[]{7.55,8.00});
  inputHandler.send(new Object[]{6.87,9.00});
  inputHandler.send(new Object[]{6.20,10.00});
  inputHandler.send(new Object[]{5.79,11.00});
  inputHandler.send(new Object[]{6.56,12.00});
  inputHandler.send(new Object[]{6.71,13.00});
  inputHandler.send(new Object[]{7.41,14.00});
  inputHandler.send(new Object[]{7.97,15.00});
  inputHandler.send(new Object[]{6.51,16.00});
  inputHandler.send(new Object[]{5.95,17.00});
  inputHandler.send(new Object[]{6.40,18.00});
  inputHandler.send(new Object[]{7.88,19.00});
  inputHandler.send(new Object[]{7.92,20.00});
  Thread.sleep(1000);
  siddhiManager.shutdown();
  Assert.assertEquals("String_Node_Str",21,count);
  Assert.assertEquals("String_Node_Str",5.661764084669217,betaZero);
}

Fixed version (ground truth):
@Test public void testRegression() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiConfiguration siddhiConfiguration=new SiddhiConfiguration();
  List<Class> list=new ArrayList<Class>();
  list.add(org.wso2.siddhi.extension.timeseries.LinearRegressionTransformProcessor.class);
  list.add(org.wso2.siddhi.extension.timeseries.LinearRegressionForecastTransformProcessor.class);
  list.add(org.wso2.siddhi.extension.timeseries.LinearRegressionOutlierTransformProcessor.class);
  siddhiConfiguration.setSiddhiExtensions(list);
  SiddhiManager siddhiManager=new SiddhiManager(siddhiConfiguration);
  InputHandler inputHandler=siddhiManager.defineStream("String_Node_Str");
  siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  String queryReference=siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  siddhiManager.addCallback(queryReference,new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(inEvents);
      count++;
      if (inEvents[0].getData1() != null) {
        betaZero=(Double)inEvents[0].getData1();
      }
    }
  }
);
  double ci=0.95;
  inputHandler.send(new Object[]{5.49,0.00});
  inputHandler.send(new Object[]{6.79,1.00});
  inputHandler.send(new Object[]{6.46,2.00});
  inputHandler.send(new Object[]{6.24,3.00});
  inputHandler.send(new Object[]{5.05,4.00});
  inputHandler.send(new Object[]{4.92,5.00});
  inputHandler.send(new Object[]{5.64,6.00});
  inputHandler.send(new Object[]{7.33,7.00});
  inputHandler.send(new Object[]{7.55,8.00});
  inputHandler.send(new Object[]{6.87,9.00});
  inputHandler.send(new Object[]{6.20,10.00});
  inputHandler.send(new Object[]{5.79,11.00});
  inputHandler.send(new Object[]{6.56,12.00});
  inputHandler.send(new Object[]{6.71,13.00});
  inputHandler.send(new Object[]{7.41,14.00});
  inputHandler.send(new Object[]{7.97,15.00});
  inputHandler.send(new Object[]{6.51,16.00});
  inputHandler.send(new Object[]{5.95,17.00});
  inputHandler.send(new Object[]{6.40,18.00});
  inputHandler.send(new Object[]{7.88,19.00});
  inputHandler.send(new Object[]{7.92,20.00});
  Thread.sleep(1000);
  siddhiManager.shutdown();
  Assert.assertEquals("String_Node_Str",21,count);
  Assert.assertEquals("String_Node_Str",5.661764084669217,betaZero);
}