Program: 29165
Project: 29165
Buggy source:
@Test public void testTableJoinQuery4() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String streams="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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(streams + query);
  executionPlanRuntime.addCallback("String_Node_Str",new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(timeStamp,inEvents,removeEvents);
      if (inEvents != null) {
        for (        Event event : inEvents) {
          inEventCount++;
switch (inEventCount) {
case 1:
            Assert.assertArrayEquals(new Object[]{"String_Node_Str","String_Node_Str",75.6f},event.getData());
          break;
default :
        Assert.assertSame(1,inEventCount);
    }
  }
  eventArrived=true;
}
if (removeEvents != null) {
  removeEventCount=removeEventCount + removeEvents.length;
}
eventArrived=true;
}
}
);
InputHandler stockStream=executionPlanRuntime.getInputHandler("String_Node_Str");
InputHandler checkStockStream=executionPlanRuntime.getInputHandler("String_Node_Str");
executionPlanRuntime.start();
stockStream.send(new Object[]{"String_Node_Str",55.6f,100l});
stockStream.send(new Object[]{"String_Node_Str",75.6f,100l});
checkStockStream.send(new Object[]{"String_Node_Str"});
Thread.sleep(500);
Assert.assertEquals("String_Node_Str",1,inEventCount);
Assert.assertEquals("String_Node_Str",0,removeEventCount);
Assert.assertEquals("String_Node_Str",true,eventArrived);
executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testTableJoinQuery4() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String streams="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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(streams + query);
  executionPlanRuntime.addCallback("String_Node_Str",new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(timeStamp,inEvents,removeEvents);
      if (inEvents != null) {
        for (        Event event : inEvents) {
          inEventCount++;
switch (inEventCount) {
case 1:
            Assert.assertArrayEquals(new Object[]{"String_Node_Str","String_Node_Str",75.6f},event.getData());
          break;
default :
        Assert.assertSame(1,inEventCount);
    }
  }
}
if (removeEvents != null) {
  for (  Event event : removeEvents) {
    removeEventCount++;
switch (removeEventCount) {
case 1:
      Assert.assertArrayEquals(new Object[]{"String_Node_Str","String_Node_Str",75.6f},event.getData());
    break;
default :
  Assert.assertSame(1,removeEventCount);
}
}
}
eventArrived=true;
}
}
);
InputHandler stockStream=executionPlanRuntime.getInputHandler("String_Node_Str");
InputHandler checkStockStream=executionPlanRuntime.getInputHandler("String_Node_Str");
executionPlanRuntime.start();
stockStream.send(new Object[]{"String_Node_Str",55.6f,100l});
stockStream.send(new Object[]{"String_Node_Str",75.6f,100l});
checkStockStream.send(new Object[]{"String_Node_Str"});
Thread.sleep(1500);
Assert.assertEquals("String_Node_Str",1,inEventCount);
Assert.assertEquals("String_Node_Str",1,removeEventCount);
Assert.assertEquals("String_Node_Str",true,eventArrived);
executionPlanRuntime.shutdown();
}