Program: 28872
Project: 28872
Buggy source:
@Test public void jsonSourceMapperTest12() 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(100L,event.getData(2));
break;
case 4:
junit.framework.Assert.assertEquals(200L,event.getData(2));
break;
case 5:
junit.framework.Assert.assertEquals("String_Node_Str",event.getData(0));
break;
case 6:
junit.framework.Assert.assertEquals(null,event.getData(0));
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",6,count.get());
executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void jsonSourceMapperTest12() 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(100L,event.getData(2));
break;
case 4:
Assert.assertEquals(200L,event.getData(2));
break;
case 5:
Assert.assertEquals("String_Node_Str",event.getData(0));
break;
case 6:
Assert.assertEquals(null,event.getData(0));
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",6,count.get());
executionPlanRuntime.shutdown();
}