code: @Override
    public JCas next() throws AnalysisEngineProcessException {
      JCas nextCas = getEmptyJCas();
      try {
        greedyCopy(cas, nextCas);
        AnalysisEngine ae = getAnalysisEngine();
        try {
          AnnotationIndex<Annotation> prevSteps = nextCas.getAnnotationIndex(ProcessingStep.type);
          String prevCasId = ProcessingStepUtils.getPreviousCasId(prevSteps);
          Trace prevTrace = ProcessingStepUtils.getTrace(prevSteps);
          String optionId = ae.getAnalysisEngineMetaData().getName();
          String sequenceId = ProcessingStepUtils.getSequenceId(nextCas);
          Trace trace = ProcessingStepUtils.getPartialTrace(prevTrace.getTrace(), getPhaseNo(),
                  optionId);
          if (!loadCasFromStorage(nextCas, trace, sequenceId)) {
            process(ae, nextCas, prevCasId, prevTrace, optionId, sequenceId, trace);
          }
          // TODO:Should this be in a final clause?
          // Otherwise how would we move on to the next annotator in case of exception?
          nextAnnotator++;
          return nextCas;
        } catch (Exception e) {
          throw new AnalysisEngineProcessException(e);
        } finally {
          if (options != null) {
            ae.destroy();
          }
        }
      } catch (Exception e) {
        // Release if greedyCopy fails
        nextCas.release();
        throw new AnalysisEngineProcessException(e);
      }
    }
docs: http://uima.apache.org/d/uimaj-2.4.0/apidocs/org/apache/uima/analysis_component/AnalysisComponent.html