FilterStreamSpecCompiled result = (FilterStreamSpecCompiled) raw.compile(statementContext, eventTypesReferenced, false, Collections.<Integer>emptyList());
hashItem.setFilterSpecCompiled(result.getFilterSpec());
// validate parameters
StreamTypeServiceImpl streamTypes = new StreamTypeServiceImpl(result.getFilterSpec().getFilterForEventType(), null, true, statementContext.getEngineURI());
ExprValidationContext validationContext = new ExprValidationContext(streamTypes, statementContext.getMethodResolutionService(), null, statementContext.getSchedulingService(), statementContext.getVariableService(), getDefaultAgentInstanceContext(), statementContext.getEventAdapterService(), statementContext.getStatementName(), statementContext.getStatementId(), statementContext.getAnnotations(), statementContext.getContextDescriptor());
ExprNodeUtility.validate(Collections.singletonList(hashItem.getFunction()), validationContext);
}
}
else if (contextDetail instanceof ContextDetailInitiatedTerminated) {
ContextDetailInitiatedTerminated fixed = (ContextDetailInitiatedTerminated) contextDetail;