Source:
<code>public CAS getMergeCas(AnnotatorState aState, SourceDocument aDocument, Map<String, CAS> aCasses, AnnotationDocument aTemplate, boolean aUpgrade, boolean aMergeIncompleteAnnotations, boolean aForceRecreateCas) throws UIMAException, ClassNotFoundException, IOException, AnnotationException { if (aForceRecreateCas) { return initializeMergeCas(aState, aCasses, aTemplate, aMergeIncompleteAnnotations); } CAS mergeCas = null; try { if (AUTOMATION.equals(aState.getMode()) || CORRECTION.equals(aState.getMode())) { if (!correctionDocumentService.existsCorrectionCas(aDocument)) { return initializeMergeCas(aState, aCasses, aTemplate, aMergeIncompleteAnnotations); } mergeCas = correctionDocumentService.readCorrectionCas(aDocument); if (aUpgrade) { correctionDocumentService.upgradeCorrectionCas(mergeCas, aDocument); correctionDocumentService.writeCorrectionCas(mergeCas, aDocument); updateDocumentTimestampAfterWrite(aState, correctionDocumentService .getCorrectionCasTimestamp(aState.getDocument())); } return mergeCas; } else { if (!curationDocumentService.existsCurationCas(aDocument)) { return initializeMergeCas(aState, aCasses, aTemplate, aMergeIncompleteAnnotations); } mergeCas = curationDocumentService.readCurationCas(aDocument); if (aUpgrade) { curationDocumentService.upgradeCurationCas(mergeCas, aDocument); curationDocumentService.writeCurationCas(mergeCas, aDocument, true); updateDocumentTimestampAfterWrite(aState, curationDocumentService .getCurationCasTimestamp(aState.getDocument())); } return mergeCas; } } catch (Exception e) { <START> log.error(e.getMessage()); <END> } return mergeCas; }</code><technical_language>I catch exception exception bubble if is any</technical_language>

Target:
public CAS getMergeCas(AnnotatorState aState, SourceDocument aDocument, Map<String, CAS> aCasses, AnnotationDocument aTemplate, boolean aUpgrade, boolean aMergeIncompleteAnnotations, boolean aForceRecreateCas) throws UIMAException, ClassNotFoundException, IOException, AnnotationException { if (aForceRecreateCas) { return initializeMergeCas(aState, aCasses, aTemplate, aMergeIncompleteAnnotations); } CAS mergeCas = null; if (AUTOMATION.equals(aState.getMode()) || CORRECTION.equals(aState.getMode())) { if (!correctionDocumentService.existsCorrectionCas(aDocument)) { return initializeMergeCas(aState, aCasses, aTemplate, aMergeIncompleteAnnotations); } mergeCas = correctionDocumentService.readCorrectionCas(aDocument); if (aUpgrade) { correctionDocumentService.upgradeCorrectionCas(mergeCas, aDocument); correctionDocumentService.writeCorrectionCas(mergeCas, aDocument); updateDocumentTimestampAfterWrite(aState, correctionDocumentService.getCorrectionCasTimestamp(aState.getDocument())); } } else { if (!curationDocumentService.existsCurationCas(aDocument)) { return initializeMergeCas(aState, aCasses, aTemplate, aMergeIncompleteAnnotations); } mergeCas = curationDocumentService.readCurationCas(aDocument); if (aUpgrade) { curationDocumentService.upgradeCurationCas(mergeCas, aDocument); curationDocumentService.writeCurationCas(mergeCas, aDocument, true); updateDocumentTimestampAfterWrite(aState, curationDocumentService.getCurationCasTimestamp(aState.getDocument())); } } return mergeCas; }