Program: 29230
Project: 29230
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.LinearRegressionForecastTransformProcessor.class);
  siddhiConfiguration.setSiddhiExtensions(list);
  SiddhiManager siddhiManager=new SiddhiManager(siddhiConfiguration);
  InputHandler inputHandler=siddhiManager.defineStream("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(timeStamp,inEvents,removeEvents);
      if (inEvents[0].getData1() != null) {
        betaZero=(Double)inEvents[0].getData2();
      }
      count++;
    }
  }
);
  System.out.println(System.currentTimeMillis());
  inputHandler.send(new Object[]{3300,"String_Node_Str",31});
  inputHandler.send(new Object[]{2600,"String_Node_Str",18});
  inputHandler.send(new Object[]{2500,"String_Node_Str",17});
  inputHandler.send(new Object[]{2475,"String_Node_Str",12});
  inputHandler.send(new Object[]{2313,"String_Node_Str",8});
  inputHandler.send(new Object[]{2175,"String_Node_Str",26});
  inputHandler.send(new Object[]{600,"String_Node_Str",14});
  inputHandler.send(new Object[]{460,"String_Node_Str",3});
  inputHandler.send(new Object[]{240,"String_Node_Str",1});
  inputHandler.send(new Object[]{200,"String_Node_Str",10});
  inputHandler.send(new Object[]{177,"String_Node_Str",0});
  inputHandler.send(new Object[]{140,"String_Node_Str",6});
  inputHandler.send(new Object[]{117,"String_Node_Str",1});
  inputHandler.send(new Object[]{115,"String_Node_Str",0});
  inputHandler.send(new Object[]{2600,"String_Node_Str",19});
  inputHandler.send(new Object[]{1907,"String_Node_Str",13});
  inputHandler.send(new Object[]{1190,"String_Node_Str",3});
  inputHandler.send(new Object[]{990,"String_Node_Str",16});
  inputHandler.send(new Object[]{925,"String_Node_Str",6});
  inputHandler.send(new Object[]{365,"String_Node_Str",0});
  inputHandler.send(new Object[]{302,"String_Node_Str",10});
  inputHandler.send(new Object[]{300,"String_Node_Str",6});
  inputHandler.send(new Object[]{129,"String_Node_Str",2});
  inputHandler.send(new Object[]{111,"String_Node_Str",1});
  inputHandler.send(new Object[]{6100,"String_Node_Str",18});
  inputHandler.send(new Object[]{4125,"String_Node_Str",19});
  inputHandler.send(new Object[]{3213,"String_Node_Str",1});
  inputHandler.send(new Object[]{2319,"String_Node_Str",38});
  inputHandler.send(new Object[]{2000,"String_Node_Str",10});
  inputHandler.send(new Object[]{1600,"String_Node_Str",0});
  inputHandler.send(new Object[]{1394,"String_Node_Str",4});
  inputHandler.send(new Object[]{935,"String_Node_Str",4});
  inputHandler.send(new Object[]{850,"String_Node_Str",0});
  inputHandler.send(new Object[]{775,"String_Node_Str",5});
  inputHandler.send(new Object[]{760,"String_Node_Str",6});
  inputHandler.send(new Object[]{629,"String_Node_Str",1});
  inputHandler.send(new Object[]{275,"String_Node_Str",6});
  inputHandler.send(new Object[]{120,"String_Node_Str",0});
  inputHandler.send(new Object[]{2567,"String_Node_Str",12});
  inputHandler.send(new Object[]{2500,"String_Node_Str",28});
  inputHandler.send(new Object[]{2350,"String_Node_Str",21});
  inputHandler.send(new Object[]{2317,"String_Node_Str",3});
  inputHandler.send(new Object[]{2000,"String_Node_Str",12});
  inputHandler.send(new Object[]{715,"String_Node_Str",1});
  inputHandler.send(new Object[]{660,"String_Node_Str",9});
  inputHandler.send(new Object[]{650,"String_Node_Str",0});
  inputHandler.send(new Object[]{260,"String_Node_Str",0});
  inputHandler.send(new Object[]{250,"String_Node_Str",1});
  inputHandler.send(new Object[]{200,"String_Node_Str",13});
  inputHandler.send(new Object[]{180,"String_Node_Str",6});
  Thread.sleep(1000);
  siddhiManager.shutdown();
  Assert.assertEquals("String_Node_Str",50,count);
}

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");
  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(timeStamp,inEvents,removeEvents);
      if (inEvents[0].getData1() != null) {
        betaZero=(Double)inEvents[0].getData2();
        System.out.println("String_Node_Str" + betaZero);
      }
      count++;
    }
  }
);
  System.out.println(System.currentTimeMillis());
  inputHandler.send(new Object[]{3300,"String_Node_Str",31});
  inputHandler.send(new Object[]{2600,"String_Node_Str",18});
  inputHandler.send(new Object[]{2500,"String_Node_Str",17});
  inputHandler.send(new Object[]{2475,"String_Node_Str",12});
  inputHandler.send(new Object[]{2313,"String_Node_Str",8});
  inputHandler.send(new Object[]{2175,"String_Node_Str",26});
  inputHandler.send(new Object[]{600,"String_Node_Str",14});
  inputHandler.send(new Object[]{460,"String_Node_Str",3});
  inputHandler.send(new Object[]{240,"String_Node_Str",1});
  inputHandler.send(new Object[]{200,"String_Node_Str",10});
  inputHandler.send(new Object[]{177,"String_Node_Str",0});
  inputHandler.send(new Object[]{140,"String_Node_Str",6});
  inputHandler.send(new Object[]{117,"String_Node_Str",1});
  inputHandler.send(new Object[]{115,"String_Node_Str",0});
  inputHandler.send(new Object[]{2600,"String_Node_Str",19});
  inputHandler.send(new Object[]{1907,"String_Node_Str",13});
  inputHandler.send(new Object[]{1190,"String_Node_Str",3});
  inputHandler.send(new Object[]{990,"String_Node_Str",16});
  inputHandler.send(new Object[]{925,"String_Node_Str",6});
  inputHandler.send(new Object[]{365,"String_Node_Str",0});
  inputHandler.send(new Object[]{302,"String_Node_Str",10});
  inputHandler.send(new Object[]{300,"String_Node_Str",6});
  inputHandler.send(new Object[]{129,"String_Node_Str",2});
  inputHandler.send(new Object[]{111,"String_Node_Str",1});
  inputHandler.send(new Object[]{6100,"String_Node_Str",18});
  inputHandler.send(new Object[]{4125,"String_Node_Str",19});
  inputHandler.send(new Object[]{3213,"String_Node_Str",1});
  inputHandler.send(new Object[]{2319,"String_Node_Str",38});
  inputHandler.send(new Object[]{2000,"String_Node_Str",10});
  inputHandler.send(new Object[]{1600,"String_Node_Str",0});
  inputHandler.send(new Object[]{1394,"String_Node_Str",4});
  inputHandler.send(new Object[]{935,"String_Node_Str",4});
  inputHandler.send(new Object[]{850,"String_Node_Str",0});
  inputHandler.send(new Object[]{775,"String_Node_Str",5});
  inputHandler.send(new Object[]{760,"String_Node_Str",6});
  inputHandler.send(new Object[]{629,"String_Node_Str",1});
  inputHandler.send(new Object[]{275,"String_Node_Str",6});
  inputHandler.send(new Object[]{120,"String_Node_Str",0});
  inputHandler.send(new Object[]{2567,"String_Node_Str",12});
  inputHandler.send(new Object[]{2500,"String_Node_Str",28});
  inputHandler.send(new Object[]{2350,"String_Node_Str",21});
  inputHandler.send(new Object[]{2317,"String_Node_Str",3});
  inputHandler.send(new Object[]{2000,"String_Node_Str",12});
  inputHandler.send(new Object[]{715,"String_Node_Str",1});
  inputHandler.send(new Object[]{660,"String_Node_Str",9});
  inputHandler.send(new Object[]{650,"String_Node_Str",0});
  inputHandler.send(new Object[]{260,"String_Node_Str",0});
  inputHandler.send(new Object[]{250,"String_Node_Str",1});
  inputHandler.send(new Object[]{200,"String_Node_Str",13});
  inputHandler.send(new Object[]{180,"String_Node_Str",6});
  Thread.sleep(1000);
  siddhiManager.shutdown();
  double delta=0;
  Assert.assertEquals("String_Node_Str",50,count);
  Assert.assertEquals(573.1418421169493,betaZero,delta);
}