Program: 28873
Project: 28873
Buggy source:
@Test public void jsonSourceMapperTest9() throws InterruptedException {
  log.info("String_Node_Str");
  String streams="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  SiddhiManager siddhiManager=new SiddhiManager();
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(streams + query);
  executionPlanRuntime.addCallback("String_Node_Str",new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      for (      Event event : events) {
switch (count.incrementAndGet()) {
case 1:
          junit.framework.Assert.assertEquals(52.6f,event.getData(1));
        break;
case 2:
      junit.framework.Assert.assertEquals(53.6f,event.getData(1));
    break;
case 3:
  junit.framework.Assert.assertEquals(54.6f,event.getData(1));
break;
case 4:
junit.framework.Assert.assertEquals(55.6f,event.getData(1));
break;
case 5:
junit.framework.Assert.assertEquals(57.6f,event.getData(1));
break;
case 6:
junit.framework.Assert.assertEquals(58.6f,event.getData(1));
break;
case 7:
junit.framework.Assert.assertEquals(60.6f,event.getData(1));
break;
default :
Assert.fail();
}
}
}
}
);
executionPlanRuntime.start();
InMemoryBroker.publish("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
InMemoryBroker.publish("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
InMemoryBroker.publish("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
Thread.sleep(100);
Assert.assertEquals("String_Node_Str",7,count.get());
executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void jsonSourceMapperTest9() throws InterruptedException {
  log.info("String_Node_Str");
  String streams="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  SiddhiManager siddhiManager=new SiddhiManager();
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(streams + query);
  executionPlanRuntime.addCallback("String_Node_Str",new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      for (      Event event : events) {
switch (count.incrementAndGet()) {
case 1:
          Assert.assertEquals(52.6f,event.getData(1));
        break;
case 2:
      Assert.assertEquals(53.6f,event.getData(1));
    break;
case 3:
  Assert.assertEquals(54.6f,event.getData(1));
break;
case 4:
Assert.assertEquals(55.6f,event.getData(1));
break;
case 5:
Assert.assertEquals(57.6f,event.getData(1));
break;
case 6:
Assert.assertEquals(58.6f,event.getData(1));
break;
case 7:
Assert.assertEquals(60.6f,event.getData(1));
break;
default :
Assert.fail();
}
}
}
}
);
executionPlanRuntime.start();
InMemoryBroker.publish("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
InMemoryBroker.publish("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
InMemoryBroker.publish("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
Thread.sleep(100);
Assert.assertEquals("String_Node_Str",7,count.get());
executionPlanRuntime.shutdown();
}