Program: 28874
Project: 28874
Buggy source:
@Test public void jsonSourceMapperTest11() 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_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(55.6f,event.getData(1));
        break;
case 2:
      junit.framework.Assert.assertEquals(56.6f,event.getData(1));
    break;
case 3:
  junit.framework.Assert.assertEquals(null,event.getData(1));
break;
case 4:
junit.framework.Assert.assertEquals(76.6f,event.getData(1));
break;
case 5:
junit.framework.Assert.assertEquals(77.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"+ "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"+ "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"+ "String_Node_Str");
Thread.sleep(100);
Assert.assertEquals("String_Node_Str",5,count.get());
executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void jsonSourceMapperTest11() 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_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(55.6f,event.getData(1));
        break;
case 2:
      Assert.assertEquals(56.6f,event.getData(1));
    break;
case 3:
  Assert.assertEquals(null,event.getData(1));
break;
case 4:
Assert.assertEquals(76.6f,event.getData(1));
break;
case 5:
Assert.assertEquals(77.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"+ "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"+ "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"+ "String_Node_Str");
Thread.sleep(100);
Assert.assertEquals("String_Node_Str",5,count.get());
executionPlanRuntime.shutdown();
}