Program: 28987
Project: 28987
Buggy source:
/** 
 * Parse an InputStream returning corresponding StreamRuntime
 * @param inputStream          input stream to be parsed
 * @param executionPlanContext associated siddhi executionPlanContext
 * @param streamDefinitionMap  map containing user given stream definitions
 * @param tableDefinitionMap   table definition map
 * @param eventTableMap        EventTable Map
 * @param executors            List to hold VariableExpressionExecutors to update after query parsing
 * @param latencyTracker       latency tracker
 * @param outputExpectsExpiredEvents
 * @return StreamRuntime Stream Runtime
 */
public static StreamRuntime parse(InputStream inputStream,ExecutionPlanContext executionPlanContext,Map<String,AbstractDefinition> streamDefinitionMap,Map<String,AbstractDefinition> tableDefinitionMap,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executors,LatencyTracker latencyTracker,boolean outputExpectsExpiredEvents){
  if (inputStream instanceof BasicSingleInputStream || inputStream instanceof SingleInputStream) {
    SingleInputStream singleInputStream=(SingleInputStream)inputStream;
    ProcessStreamReceiver processStreamReceiver=new ProcessStreamReceiver(singleInputStream.getStreamId(),latencyTracker);
    return SingleInputStreamParser.parseInputStream((SingleInputStream)inputStream,executionPlanContext,executors,streamDefinitionMap,null,eventTableMap,new MetaStreamEvent(),processStreamReceiver,true,outputExpectsExpiredEvents);
  }
 else   if (inputStream instanceof JoinInputStream) {
    return JoinInputStreamParser.parseInputStream(((JoinInputStream)inputStream),executionPlanContext,streamDefinitionMap,tableDefinitionMap,eventTableMap,executors,latencyTracker,outputExpectsExpiredEvents);
  }
 else   if (inputStream instanceof StateInputStream) {
    MetaStateEvent metaStateEvent=new MetaStateEvent(inputStream.getAllStreamIds().size());
    return StateInputStreamParser.parseInputStream(((StateInputStream)inputStream),executionPlanContext,metaStateEvent,streamDefinitionMap,null,eventTableMap,executors,latencyTracker);
  }
 else {
    throw new OperationNotSupportedException();
  }
}

Fixed version (ground truth):
/** 
 * Parse an InputStream returning corresponding StreamRuntime
 * @param inputStream          input stream to be parsed
 * @param executionPlanContext associated siddhi executionPlanContext
 * @param streamDefinitionMap  map containing user given stream definitions
 * @param tableDefinitionMap   table definition map
 * @param eventTableMap        EventTable Map
 * @param executors            List to hold VariableExpressionExecutors to update after query parsing
 * @param latencyTracker       latency tracker
 * @param outputExpectsExpiredEvents  is output expects ExpiredEvents
 * @return StreamRuntime Stream Runtime
 */
public static StreamRuntime parse(InputStream inputStream,ExecutionPlanContext executionPlanContext,Map<String,AbstractDefinition> streamDefinitionMap,Map<String,AbstractDefinition> tableDefinitionMap,Map<String,EventTable> eventTableMap,List<VariableExpressionExecutor> executors,LatencyTracker latencyTracker,boolean outputExpectsExpiredEvents){
  if (inputStream instanceof BasicSingleInputStream || inputStream instanceof SingleInputStream) {
    SingleInputStream singleInputStream=(SingleInputStream)inputStream;
    ProcessStreamReceiver processStreamReceiver=new ProcessStreamReceiver(singleInputStream.getStreamId(),latencyTracker);
    return SingleInputStreamParser.parseInputStream((SingleInputStream)inputStream,executionPlanContext,executors,streamDefinitionMap,null,eventTableMap,new MetaStreamEvent(),processStreamReceiver,true,outputExpectsExpiredEvents);
  }
 else   if (inputStream instanceof JoinInputStream) {
    return JoinInputStreamParser.parseInputStream(((JoinInputStream)inputStream),executionPlanContext,streamDefinitionMap,tableDefinitionMap,eventTableMap,executors,latencyTracker,outputExpectsExpiredEvents);
  }
 else   if (inputStream instanceof StateInputStream) {
    MetaStateEvent metaStateEvent=new MetaStateEvent(inputStream.getAllStreamIds().size());
    return StateInputStreamParser.parseInputStream(((StateInputStream)inputStream),executionPlanContext,metaStateEvent,streamDefinitionMap,null,eventTableMap,executors,latencyTracker);
  }
 else {
    throw new OperationNotSupportedException();
  }
}