Program: 28716
Project: 28716
Buggy source:
@Test public void testPartitionQuery38() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String siddhiApp="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";
  SiddhiAppRuntime siddhiAppRuntime=siddhiManager.createSiddhiAppRuntime(siddhiApp);
  StreamCallback streamCallback=new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      count.addAndGet(events.length);
      eventArrived=true;
    }
  }
;
  siddhiAppRuntime.addCallback("String_Node_Str",streamCallback);
  SiddhiAppRuntime siddhiAppRuntime2=siddhiManager.createSiddhiAppRuntime(siddhiApp);
  StreamCallback streamCallback2=new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      AssertJUnit.assertTrue("String_Node_Str".equals(events[0].getData(0)) || "String_Node_Str".equals(events[0].getData(0)));
      count.addAndGet(events.length);
      eventArrived=true;
    }
  }
;
  siddhiAppRuntime2.addCallback("String_Node_Str",streamCallback2);
  InputHandler inputHandlerA=siddhiAppRuntime.getInputHandler("String_Node_Str");
  InputHandler inputHandlerB=siddhiAppRuntime2.getInputHandler("String_Node_Str");
  siddhiAppRuntime.start();
  inputHandlerA.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",700}));
  inputHandlerA.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  inputHandlerA.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  byte[] snapshot=siddhiAppRuntime.snapshot();
  siddhiAppRuntime.shutdown();
  Thread.sleep(1000);
  try {
    siddhiAppRuntime2.restore(snapshot);
  }
 catch (  CannotRestoreSiddhiAppStateException e) {
    Assert.fail("String_Node_Str" + siddhiAppRuntime.getName() + "String_Node_Str");
  }
  siddhiAppRuntime2.start();
  inputHandlerB.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",700}));
  inputHandlerB.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  inputHandlerB.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  AssertJUnit.assertEquals(6,count.get());
  siddhiAppRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testPartitionQuery38() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String siddhiApp="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"+ "String_Node_Str";
  SiddhiAppRuntime siddhiAppRuntime=siddhiManager.createSiddhiAppRuntime(siddhiApp);
  StreamCallback streamCallback=new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      count.addAndGet(events.length);
      eventArrived=true;
    }
  }
;
  siddhiAppRuntime.addCallback("String_Node_Str",streamCallback);
  SiddhiAppRuntime siddhiAppRuntime2=siddhiManager.createSiddhiAppRuntime(siddhiApp);
  StreamCallback streamCallback2=new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      AssertJUnit.assertTrue("String_Node_Str".equals(events[0].getData(0)) || "String_Node_Str".equals(events[0].getData(0)));
      count.addAndGet(events.length);
      eventArrived=true;
    }
  }
;
  siddhiAppRuntime2.addCallback("String_Node_Str",streamCallback2);
  InputHandler inputHandlerA=siddhiAppRuntime.getInputHandler("String_Node_Str");
  InputHandler inputHandlerB=siddhiAppRuntime2.getInputHandler("String_Node_Str");
  siddhiAppRuntime.start();
  inputHandlerA.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",700}));
  inputHandlerA.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  inputHandlerA.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  byte[] snapshot=siddhiAppRuntime.snapshot();
  siddhiAppRuntime.shutdown();
  Thread.sleep(1000);
  try {
    siddhiAppRuntime2.restore(snapshot);
  }
 catch (  CannotRestoreSiddhiAppStateException e) {
    Assert.fail("String_Node_Str" + siddhiAppRuntime.getName() + "String_Node_Str");
  }
  siddhiAppRuntime2.start();
  inputHandlerB.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",700}));
  inputHandlerB.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  inputHandlerB.send(new Event(System.currentTimeMillis(),new Object[]{"String_Node_Str",60}));
  AssertJUnit.assertEquals(6,count.get());
  siddhiAppRuntime.shutdown();
}