Program: 28942
Project: 28942
Buggy source:
@Test public void testDebugger9() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String cseEventStream="String_Node_Str" + "String_Node_Str";
  final String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
  executionPlanRuntime.addCallback("String_Node_Str",new StreamCallback(){
    @Override public void receive(    Event[] events){
      inEventCount.addAndGet(events.length);
    }
  }
);
  InputHandler inputHandler=executionPlanRuntime.getInputHandler("String_Node_Str");
  SiddhiDebugger siddhiDebugger=executionPlanRuntime.debug();
  siddhiDebugger.acquireBreakPoint("String_Node_Str",SiddhiDebugger.QueryTerminal.IN);
  siddhiDebugger.setDebuggerCallback(new SiddhiDebuggerCallback(){
    @Override public void debugEvent(    ComplexEvent event,    String queryName,    SiddhiDebugger.QueryTerminal queryTerminal,    SiddhiDebugger debugger){
      System.out.println("String_Node_Str" + queryName + "String_Node_Str"+ queryTerminal);
      System.out.println(event);
      int count=debugEventCount.addAndGet(getCount(event));
      if (count == 2) {
        Map<String,Object> queryState=debugger.getQueryState(queryName);
        System.out.println(queryState);
        StreamEvent streamEvent=(StreamEvent)((Map<String,Object>)queryState.values().toArray()[0]).get("String_Node_Str");
        Assert.assertArrayEquals(streamEvent.getOutputData(),new Object[]{"String_Node_Str",50.0f,null});
      }
      debugger.next();
    }
  }
);
  inputHandler.send(new Object[]{"String_Node_Str",50f,60});
  inputHandler.send(new Object[]{"String_Node_Str",70f,40});
  Thread.sleep(100);
  Assert.assertEquals("String_Node_Str",2,inEventCount.get());
  Assert.assertEquals("String_Node_Str",4,debugEventCount.get());
  executionPlanRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testDebugger9() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String cseEventStream="String_Node_Str" + "String_Node_Str";
  final String query="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  ExecutionPlanRuntime executionPlanRuntime=siddhiManager.createExecutionPlanRuntime(cseEventStream + query);
  executionPlanRuntime.addCallback("String_Node_Str",new StreamCallback(){
    @Override public void receive(    Event[] events){
      inEventCount.addAndGet(events.length);
    }
  }
);
  InputHandler inputHandler=executionPlanRuntime.getInputHandler("String_Node_Str");
  SiddhiDebugger siddhiDebugger=executionPlanRuntime.debug();
  siddhiDebugger.acquireBreakPoint("String_Node_Str",SiddhiDebugger.QueryTerminal.IN);
  siddhiDebugger.setDebuggerCallback(new SiddhiDebuggerCallback(){
    @Override public void debugEvent(    ComplexEvent event,    String queryName,    SiddhiDebugger.QueryTerminal queryTerminal,    SiddhiDebugger debugger){
      System.out.println("String_Node_Str" + queryName + "String_Node_Str"+ queryTerminal);
      System.out.println(event);
      int count=debugEventCount.addAndGet(getCount(event));
      if (count == 2) {
        Map<String,Object> queryState=debugger.getQueryState(queryName);
        System.out.println(queryState);
        System.out.println(queryState.values().toArray()[0]);
        StreamEvent streamEvent=null;
        for (        Map.Entry<String,Object> entry : queryState.entrySet()) {
          if (entry.getKey().startsWith("String_Node_Str")) {
            streamEvent=(StreamEvent)((Map<String,Object>)entry.getValue()).get("String_Node_Str");
            break;
          }
        }
        Assert.assertArrayEquals(streamEvent.getOutputData(),new Object[]{"String_Node_Str",50.0f,null});
      }
      debugger.next();
    }
  }
);
  inputHandler.send(new Object[]{"String_Node_Str",50f,60});
  inputHandler.send(new Object[]{"String_Node_Str",70f,40});
  Thread.sleep(100);
  Assert.assertEquals("String_Node_Str",2,inEventCount.get());
  Assert.assertEquals("String_Node_Str",4,debugEventCount.get());
  executionPlanRuntime.shutdown();
}