Program: 29163
Project: 29163
Buggy source:
@Test public void testWindowPartitionQuery3() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String executionPlan="String_Node_Str" + "String_Node_Str";
  ExecutionPlanRuntime executionRuntime=siddhiManager.createExecutionPlanRuntime(executionPlan);
  executionRuntime.addCallback("String_Node_Str",new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      for (      Event event : events) {
        if (event.isExpired()) {
          removeEventCount++;
          if (removeEventCount == 1) {
            Assert.assertEquals(100.0,event.getData()[1]);
          }
 else           if (removeEventCount == 2 || removeEventCount == 3) {
            Assert.assertEquals(0.0,event.getData()[1]);
          }
        }
 else {
          inEventCount++;
          if (inEventCount == 1) {
            Assert.assertEquals(70.0,event.getData()[1]);
          }
 else           if (inEventCount == 2) {
            Assert.assertEquals(700.0,event.getData()[1]);
          }
 else           if (inEventCount == 3) {
            Assert.assertEquals(170.0,event.getData()[1]);
          }
 else           if (inEventCount == 4) {
            Assert.assertEquals(200.0,event.getData()[1]);
          }
 else           if (inEventCount == 5) {
            Assert.assertEquals(1000.0,event.getData()[1]);
          }
        }
        eventArrived=true;
      }
    }
  }
);
  InputHandler inputHandler=executionRuntime.getInputHandler("String_Node_Str");
  executionRuntime.start();
  inputHandler.send(new Object[]{"String_Node_Str",70f,100});
  inputHandler.send(new Object[]{"String_Node_Str",700f,100});
  inputHandler.send(new Object[]{"String_Node_Str",100f,200});
  Thread.sleep(5000);
  inputHandler.send(new Object[]{"String_Node_Str",200f,300});
  inputHandler.send(new Object[]{"String_Node_Str",1000f,100});
  Thread.sleep(2000);
  Assert.assertEquals(5,inEventCount);
  Assert.assertEquals(3,removeEventCount);
  executionRuntime.shutdown();
}

Fixed version (ground truth):
@Test public void testWindowPartitionQuery3() throws InterruptedException {
  log.info("String_Node_Str");
  SiddhiManager siddhiManager=new SiddhiManager();
  String executionPlan="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"+ "String_Node_Str";
  ExecutionPlanRuntime executionRuntime=siddhiManager.createExecutionPlanRuntime(executionPlan);
  executionRuntime.addCallback("String_Node_Str",new StreamCallback(){
    @Override public void receive(    Event[] events){
      EventPrinter.print(events);
      for (      Event event : events) {
        if (event.isExpired()) {
          removeEventCount++;
          if ("String_Node_Str".equals(event.getData()[0]) && firstEvent) {
            firstEvent=false;
            Assert.assertEquals(100.0,event.getData()[1]);
          }
 else {
            Assert.assertEquals(0.0,event.getData()[1]);
          }
        }
 else {
          inEventCount++;
          if (inEventCount == 1) {
            Assert.assertEquals(70.0,event.getData()[1]);
          }
 else           if (inEventCount == 2) {
            Assert.assertEquals(700.0,event.getData()[1]);
          }
 else           if (inEventCount == 3) {
            Assert.assertEquals(170.0,event.getData()[1]);
          }
 else           if (inEventCount == 4) {
            Assert.assertEquals(200.0,event.getData()[1]);
          }
 else           if (inEventCount == 5) {
            Assert.assertEquals(1000.0,event.getData()[1]);
          }
        }
        eventArrived=true;
      }
    }
  }
);
  InputHandler inputHandler=executionRuntime.getInputHandler("String_Node_Str");
  executionRuntime.start();
  inputHandler.send(new Object[]{"String_Node_Str",70f,100});
  inputHandler.send(new Object[]{"String_Node_Str",700f,100});
  inputHandler.send(new Object[]{"String_Node_Str",100f,200});
  Thread.sleep(5000);
  inputHandler.send(new Object[]{"String_Node_Str",200f,300});
  inputHandler.send(new Object[]{"String_Node_Str",1000f,100});
  Thread.sleep(2000);
  Assert.assertEquals(5,inEventCount);
  Assert.assertEquals(5,removeEventCount);
  executionRuntime.shutdown();
}