Program: 28943
Project: 28943
Buggy source:
@Test public void logicalTableTest5() 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_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);
  try {
    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) {
            inEventsList.add(event.getData());
            inEventCount.incrementAndGet();
          }
          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",55.6f,50l});
    stockStream.send(new Object[]{"String_Node_Str",55.6f,300l});
    checkStockStream.send(new Object[]{"String_Node_Str",150l});
    List<Object[]> expected=Arrays.asList(new Object[]{"String_Node_Str",50l},new Object[]{"String_Node_Str",100l});
    SiddhiTestHelper.waitForEvents(100,2,inEventCount,60000);
    Assert.assertEquals("String_Node_Str",true,SiddhiTestHelper.isEventsMatch(inEventsList,expected));
    Assert.assertEquals("String_Node_Str",2,inEventCount.get());
    Assert.assertEquals("String_Node_Str",0,removeEventCount);
    Assert.assertEquals("String_Node_Str",true,eventArrived);
  }
  finally {
    executionPlanRuntime.shutdown();
  }
}

Fixed version (ground truth):
@Test public void logicalTableTest5() 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_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);
  try {
    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) {
            inEventsList.add(event.getData());
            inEventCount.incrementAndGet();
          }
          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",55.6f,50l});
    stockStream.send(new Object[]{"String_Node_Str",55.6f,300l});
    checkStockStream.send(new Object[]{"String_Node_Str",150l});
    List<Object[]> expected=Arrays.asList(new Object[]{"String_Node_Str",100l},new Object[]{"String_Node_Str",50l});
    SiddhiTestHelper.waitForEvents(100,2,inEventCount,60000);
    Assert.assertEquals("String_Node_Str",true,SiddhiTestHelper.isUnsortedEventsMatch(inEventsList,expected));
    Assert.assertEquals("String_Node_Str",2,inEventCount.get());
    Assert.assertEquals("String_Node_Str",0,removeEventCount);
    Assert.assertEquals("String_Node_Str",true,eventArrived);
  }
  finally {
    executionPlanRuntime.shutdown();
  }
}