Source:
<code>protected void actionLoadDocument(AjaxRequestTarget aTarget, int aFocus) { LOG.trace("BEGIN LOAD_DOCUMENT_ACTION at focus " + aFocus); AnnotatorState state = getModelObject(); <START> if (state.getUser() == null) <END> state.setUser(userRepository.getCurrentUser()); try { AnnotationDocument annotationDocument = documentService .createOrGetAnnotationDocument(state.getDocument(), state.getUser()); CAS editorCas = documentService.readAnnotationCas(annotationDocument, FORCE_CAS_UPGRADE); documentService.writeAnnotationCas(editorCas, annotationDocument, false); state.reset(); if (!isUserViewingOthersWork()) { updateDocumentTimestampAfterWrite(state, documentService.getAnnotationCasTimestamp( state.getDocument(), state.getUser().getUsername())); } state.setConstraints(constraintsService.loadConstraints(state.getProject())); loadPreferences(); if (currentprojectId != state.getProject().getId()) { state.clearRememberedFeatures(); currentprojectId = state.getProject().getId(); } createAnnotationEditor(aTarget); state.moveToUnit(editorCas, aFocus + 1, TOP); if (!isUserViewingOthersWork() && SourceDocumentState.NEW.equals(state.getDocument().getState())) { documentService.transitionSourceDocumentState(state.getDocument(), NEW_TO_ANNOTATION_IN_PROGRESS); } detailEditor.reset(null); detailEditor.loadFeatureEditorModels(editorCas, null); if (aTarget != null) { updateUrlFragment(aTarget); WicketUtil.refreshPage(aTarget, getPage()); } applicationEventPublisherHolder.get().publishEvent( new DocumentOpenedEvent(this, editorCas, getModelObject().getDocument(), userRepository.getCurrentUser().getUsername())); } catch (Exception e) { handleException(aTarget, e); } LOG.trace("END LOAD_DOCUMENT_ACTION"); }</code><technical_language>Missing { ... }</technical_language>

Target:
protected void actionLoadDocument(AjaxRequestTarget aTarget, int aFocus) { LOG.trace("BEGIN LOAD_DOCUMENT_ACTION at focus " + aFocus); AnnotatorState state = getModelObject(); if (state.getUser() == null) { state.setUser(userRepository.getCurrentUser()); } try { AnnotationDocument annotationDocument = documentService .createOrGetAnnotationDocument(state.getDocument(), state.getUser()); CAS editorCas = documentService.readAnnotationCas(annotationDocument, FORCE_CAS_UPGRADE); documentService.writeAnnotationCas(editorCas, annotationDocument, false); state.reset(); if (!isUserViewingOthersWork()) { updateDocumentTimestampAfterWrite(state, documentService.getAnnotationCasTimestamp( state.getDocument(), state.getUser().getUsername())); } state.setConstraints(constraintsService.loadConstraints(state.getProject())); loadPreferences(); if (currentprojectId != state.getProject().getId()) { state.clearRememberedFeatures(); currentprojectId = state.getProject().getId(); } createAnnotationEditor(aTarget); state.moveToUnit(editorCas, aFocus + 1, TOP); if (!isUserViewingOthersWork() && SourceDocumentState.NEW.equals(state.getDocument().getState())) { documentService.transitionSourceDocumentState(state.getDocument(), NEW_TO_ANNOTATION_IN_PROGRESS); } detailEditor.reset(null); detailEditor.loadFeatureEditorModels(editorCas, null); if (aTarget != null) { updateUrlFragment(aTarget); WicketUtil.refreshPage(aTarget, getPage()); } applicationEventPublisherHolder.get().publishEvent( new DocumentOpenedEvent(this, editorCas, getModelObject().getDocument(), getModelObject().getUser().getUsername(), userRepository.getCurrentUser().getUsername())); } catch (Exception e) { handleException(aTarget, e); } LOG.trace("END LOAD_DOCUMENT_ACTION"); }