Program: 28807
Project: 28807
Buggy source:
public IncrementalExecutor(TimePeriod.Duration duration,List<ExpressionExecutor> processExpressionExecutors,GroupByKeyGenerator groupByKeyGenerator,MetaStreamEvent metaStreamEvent,int bufferSize,String aggregatorName,IncrementalExecutor child,boolean isRoot,Table table,SiddhiAppContext siddhiAppContext,boolean isProcessingOnExternalTime){
  this.duration=duration;
  this.next=child;
  this.isRoot=isRoot;
  this.table=table;
  this.siddhiAppContext=siddhiAppContext;
  this.aggregatorName=aggregatorName;
  this.bufferSize=bufferSize;
  this.streamEventPool=new StreamEventPool(metaStreamEvent,10);
  this.isProcessingOnExternalTime=isProcessingOnExternalTime;
  this.timestampExpressionExecutor=processExpressionExecutors.remove(0);
  this.baseIncrementalValueStore=new BaseIncrementalValueStore(-1,processExpressionExecutors);
  if (groupByKeyGenerator != null) {
    this.groupByKeyGenerator=groupByKeyGenerator;
    isGroupBy=true;
    if (bufferSize > 0) {
      baseIncrementalValueGroupByStoreList=new ArrayList<>(bufferSize + 1);
      for (int i=0; i < bufferSize + 1; i++) {
        baseIncrementalValueGroupByStoreList.add(new HashMap<>());
      }
    }
 else {
      baseIncrementalValueStoreMap=new HashMap<>();
    }
  }
 else {
    isGroupBy=false;
    if (bufferSize > 0) {
      baseIncrementalValueStoreList=new ArrayList<BaseIncrementalValueStore>(bufferSize + 1);
      for (int i=0; i < bufferSize + 1; i++) {
        baseIncrementalValueStoreList.add(baseIncrementalValueStore.cloneStore(null,-1));
      }
    }
  }
  this.resetEvent=streamEventPool.borrowEvent();
  this.resetEvent.setType(ComplexEvent.Type.RESET);
  setNextExecutor(child);
}

Fixed version (ground truth):
public IncrementalExecutor(TimePeriod.Duration duration,List<ExpressionExecutor> processExpressionExecutors,GroupByKeyGenerator groupByKeyGenerator,MetaStreamEvent metaStreamEvent,int bufferSize,String aggregatorName,IncrementalExecutor child,boolean isRoot,Table table,SiddhiAppContext siddhiAppContext,boolean isProcessingOnExternalTime){
  this.duration=duration;
  this.next=child;
  this.isRoot=isRoot;
  this.table=table;
  this.bufferSize=bufferSize;
  this.streamEventPool=new StreamEventPool(metaStreamEvent,10);
  this.isProcessingOnExternalTime=isProcessingOnExternalTime;
  this.timestampExpressionExecutor=processExpressionExecutors.remove(0);
  this.baseIncrementalValueStore=new BaseIncrementalValueStore(-1,processExpressionExecutors);
  if (groupByKeyGenerator != null) {
    this.groupByKeyGenerator=groupByKeyGenerator;
    isGroupBy=true;
    if (bufferSize > 0) {
      baseIncrementalValueGroupByStoreList=new ArrayList<>(bufferSize + 1);
      for (int i=0; i < bufferSize + 1; i++) {
        baseIncrementalValueGroupByStoreList.add(new HashMap<>());
      }
    }
 else {
      baseIncrementalValueStoreMap=new HashMap<>();
    }
  }
 else {
    isGroupBy=false;
    if (bufferSize > 0) {
      baseIncrementalValueStoreList=new ArrayList<>(bufferSize + 1);
      for (int i=0; i < bufferSize + 1; i++) {
        baseIncrementalValueStoreList.add(baseIncrementalValueStore.cloneStore(null,-1));
      }
    }
  }
  this.resetEvent=streamEventPool.borrowEvent();
  this.resetEvent.setType(ComplexEvent.Type.RESET);
  setNextExecutor(child);
}