Program: 28938
Project: 28938
Buggy source:
@Test public void testTcpSource1() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String inStreamDefinition="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");
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
  executionPlanRuntime.addCallback("String_Node_Str",new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(timeStamp,inEvents,removeEvents);
      eventArrived=true;
      for (      Event event : inEvents) {
        count++;
switch (count) {
case 1:
          Assert.assertEquals("String_Node_Str",event.getData(0));
        break;
case 2:
      Assert.assertEquals("String_Node_Str",event.getData(0));
    break;
case 3:
  Assert.assertEquals("String_Node_Str",event.getData(0));
break;
default :
org.junit.Assert.fail();
}
}
}
}
);
executionPlanRuntime.start();
TCPNettyClient TCPNettyClient=new TCPNettyClient();
TCPNettyClient.connect("String_Node_Str",8080);
ArrayList<Event> arrayList=new ArrayList<Event>(3);
arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",36,3.0f,380l,23.0,true}));
arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",361,31.0f,3801l,231.0,false}));
arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",362,32.0f,3802l,232.0,true}));
TCPNettyClient.send("String_Node_Str",arrayList.toArray(new Event[3]));
TCPNettyClient.disconnect();
TCPNettyClient.shutdown();
Thread.sleep(300);
Assert.assertEquals(3,count);
Assert.assertTrue(eventArrived);
executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testTcpSource1() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String inStreamDefinition="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");
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
  executionPlanRuntime.addCallback("String_Node_Str",new QueryCallback(){
    @Override public void receive(    long timeStamp,    Event[] inEvents,    Event[] removeEvents){
      EventPrinter.print(timeStamp,inEvents,removeEvents);
      eventArrived=true;
      for (      Event event : inEvents) {
        count++;
switch (count) {
case 1:
          Assert.assertEquals("String_Node_Str",event.getData(0));
        break;
case 2:
      Assert.assertEquals("String_Node_Str",event.getData(0));
    break;
case 3:
  Assert.assertEquals("String_Node_Str",event.getData(0));
break;
default :
org.junit.Assert.fail();
}
}
}
}
);
executionPlanRuntime.start();
TCPNettyClient TCPNettyClient=new TCPNettyClient();
TCPNettyClient.connect("String_Node_Str",9892);
ArrayList<Event> arrayList=new ArrayList<Event>(3);
arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",36,3.0f,380l,23.0,true}));
arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",361,31.0f,3801l,231.0,false}));
arrayList.add(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",362,32.0f,3802l,232.0,true}));
TCPNettyClient.send("String_Node_Str",arrayList.toArray(new Event[3]));
TCPNettyClient.disconnect();
TCPNettyClient.shutdown();
Thread.sleep(300);
Assert.assertEquals(3,count);
Assert.assertTrue(eventArrived);
executionPlanRuntime.shutdown();
}