Program: 29058
Project: 29058
Buggy source:
@Test public void testQuery20() throws InterruptedException {
  log.info("String_Node_Str");
  String instanceName="String_Node_Str";
  SiddhiManager siddhiManager=new SiddhiManager();
  StreamDefinition streamDefinition=StreamDefinition.id("String_Node_Str").attribute("String_Node_Str",Attribute.Type.STRING).attribute("String_Node_Str",Attribute.Type.INT);
  TableDefinition tableDefinition=TableDefinition.id("String_Node_Str").annotation(Annotation.annotation("String_Node_Str").element("String_Node_Str","String_Node_Str").element("String_Node_Str",instanceName)).attribute("String_Node_Str",Attribute.Type.STRING).attribute("String_Node_Str",Attribute.Type.INT);
  Query query=Query.query();
  query.from(InputStream.stream("String_Node_Str"));
  query.insertInto("String_Node_Str");
  ExecutionPlan executionPlan=new ExecutionPlan("String_Node_Str");
  executionPlan.addQuery(query);
  executionPlan.defineStream(streamDefinition);
  executionPlan.defineTable(tableDefinition);
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(executionPlan);
  InputHandler stockStream=executionPlanRuntime.getInputHandler("String_Node_Str");
  executionPlanRuntime.start();
  stockStream.send(new Object[]{"String_Node_Str",55.6f});
  stockStream.send(new Object[]{"String_Node_Str",75.6f});
  Thread.sleep(RESULT_WAIT * 4);
  Config cfg=new Config(instanceName);
  cfg.setProperty("String_Node_Str","String_Node_Str");
  HazelcastInstance hci=Hazelcast.getOrCreateHazelcastInstance(cfg);
  List<StreamEvent> streamEvents=hci.getList(HazelcastEventTableConstants.HAZELCAST_LIST_INSTANCE_PREFIX + executionPlanRuntime.getName() + '_'+ tableDefinition.getId());
  Assert.assertEquals(2,streamEvents.size());
  executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testQuery20() throws InterruptedException {
  log.info("String_Node_Str");
  String instanceName="String_Node_Str";
  SiddhiManager siddhiManager=new SiddhiManager();
  StreamDefinition streamDefinition=StreamDefinition.id("String_Node_Str").attribute("String_Node_Str",Attribute.Type.STRING).attribute("String_Node_Str",Attribute.Type.INT);
  TableDefinition tableDefinition=TableDefinition.id("String_Node_Str").annotation(Annotation.annotation("String_Node_Str").element("String_Node_Str","String_Node_Str").element("String_Node_Str",instanceName)).attribute("String_Node_Str",Attribute.Type.STRING).attribute("String_Node_Str",Attribute.Type.INT);
  Query query=Query.query();
  query.from(InputStream.stream("String_Node_Str"));
  query.insertInto("String_Node_Str");
  ExecutionPlan executionPlan=new ExecutionPlan("String_Node_Str");
  executionPlan.addQuery(query);
  executionPlan.defineStream(streamDefinition);
  executionPlan.defineTable(tableDefinition);
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(executionPlan);
  try {
    InputHandler stockStream=executionPlanRuntime.getInputHandler("String_Node_Str");
    executionPlanRuntime.start();
    stockStream.send(new Object[]{"String_Node_Str",55.6f});
    stockStream.send(new Object[]{"String_Node_Str",75.6f});
    Config cfg=new Config(instanceName);
    cfg.setProperty("String_Node_Str","String_Node_Str");
    HazelcastInstance hci=Hazelcast.getOrCreateHazelcastInstance(cfg);
    List<StreamEvent> streamEvents=hci.getList(HazelcastEventTableConstants.HAZELCAST_LIST_INSTANCE_PREFIX + executionPlanRuntime.getName() + '_'+ tableDefinition.getId());
    SiddhiTestHelper.waitForEvents(100,2,streamEvents,60000);
    List<Object[]> expected=Arrays.asList(new Object[]{"String_Node_Str",55.6f},new Object[]{"String_Node_Str",75.6f});
    List<Object[]> actual=new ArrayList<Object[]>();
    for (    StreamEvent event : streamEvents) {
      actual.add(event.getOutputData());
    }
    Assert.assertEquals(2,streamEvents.size());
    Assert.assertEquals("String_Node_Str",true,SiddhiTestHelper.isEventsMatch(actual,expected));
  }
  finally {
    executionPlanRuntime.shutdown();
  }
}