Program: 29228
Project: 29228
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");
  siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "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);
      if (inEvents[0].getData1() != null) {
        betaZero=(Double)inEvents[0].getData1();
      }
      count++;
    }
  }
);
  double ci=0.95;
  inputHandler.send(new Object[]{3439,694224000});
  inputHandler.send(new Object[]{3264,696902400});
  inputHandler.send(new Object[]{3437,699408000});
  inputHandler.send(new Object[]{3523,702086400});
  inputHandler.send(new Object[]{3545,704678400});
  inputHandler.send(new Object[]{3611,707356800});
  inputHandler.send(new Object[]{3637,709948800});
  inputHandler.send(new Object[]{3986,712627200});
  inputHandler.send(new Object[]{3797,715305600});
  inputHandler.send(new Object[]{3758,717897600});
  inputHandler.send(new Object[]{4428,720576000});
  inputHandler.send(new Object[]{8566,723168000});
  inputHandler.send(new Object[]{3801,725846400});
  inputHandler.send(new Object[]{3204,728524800});
  inputHandler.send(new Object[]{3686,730944000});
  inputHandler.send(new Object[]{3827,733622400});
  inputHandler.send(new Object[]{3770,736214400});
  inputHandler.send(new Object[]{3923,738892800});
  inputHandler.send(new Object[]{3839,741484800});
  inputHandler.send(new Object[]{4270,744163200});
  inputHandler.send(new Object[]{3988,746841600});
  inputHandler.send(new Object[]{3920,749433600});
  inputHandler.send(new Object[]{4853,752112000});
  inputHandler.send(new Object[]{9010,754704000});
  Thread.sleep(1000);
  siddhiManager.shutdown();
  Assert.assertEquals("String_Node_Str",24,count);
  Assert.assertEquals("String_Node_Str",3795.7272727272725,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");
  siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  siddhiManager.addQuery("String_Node_Str" + "String_Node_Str" + "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);
      if (inEvents[0].getData1() != null) {
        betaZero=(Double)inEvents[0].getData1();
      }
      count++;
    }
  }
);
  double ci=0.95;
  inputHandler.send(new Object[]{3439,694224000});
  inputHandler.send(new Object[]{3264,696902400});
  inputHandler.send(new Object[]{3437,699408000});
  inputHandler.send(new Object[]{3523,702086400});
  inputHandler.send(new Object[]{3545,704678400});
  inputHandler.send(new Object[]{3611,707356800});
  inputHandler.send(new Object[]{3637,709948800});
  inputHandler.send(new Object[]{3986,712627200});
  inputHandler.send(new Object[]{3797,715305600});
  inputHandler.send(new Object[]{3758,717897600});
  inputHandler.send(new Object[]{4428,720576000});
  inputHandler.send(new Object[]{8566,723168000});
  inputHandler.send(new Object[]{3801,725846400});
  inputHandler.send(new Object[]{3204,728524800});
  inputHandler.send(new Object[]{3686,730944000});
  inputHandler.send(new Object[]{3827,733622400});
  inputHandler.send(new Object[]{3770,736214400});
  inputHandler.send(new Object[]{3923,738892800});
  inputHandler.send(new Object[]{3839,741484800});
  inputHandler.send(new Object[]{4270,744163200});
  inputHandler.send(new Object[]{3988,746841600});
  inputHandler.send(new Object[]{3920,749433600});
  inputHandler.send(new Object[]{4853,752112000});
  inputHandler.send(new Object[]{9010,754704000});
  Thread.sleep(1000);
  siddhiManager.shutdown();
  Assert.assertEquals("String_Node_Str",24,count);
  Assert.assertEquals("String_Node_Str",3795.7272727272725,betaZero);
}