Source:
<code>protected IStatus doSave(final Map<?, ?> options, final IProgressMonitor monitor, boolean runExclusive) { IStatus status = Status.OK_STATUS; try { monitor.beginTask("Session saving", 3); final Collection<Resource> allResources = Lists.newArrayList(); allResources.addAll(getAllSessionResources()); Collection<Resource> semanticResourcesCollection = getSemanticResources(); allResources.addAll(semanticResourcesCollection); allResources.addAll(getControlledResources()); monitor.worked(1); RunnableWithResult<Collection<Resource>> save = new RunnableWithResult.Impl<Collection<Resource>>() { @Override public void run() { try { Collection<Resource> savedResources = getSavingPolicy().save(allResources, options, new SubProgressMonitor(monitor, 7)); setResult(savedResources); setStatus(Status.OK_STATUS); } catch (Throwable e) { SiriusPlugin.getDefault().error("Save failed", new CoreException(new Status(IStatus.ERROR, SiriusPlugin.ID, "Error while saving the session", e))); } } }; if (runExclusive && !saver.domainDisposed.get()) { getTransactionalEditingDomain().runExclusive(save); } else { save.run(); } Collection<Resource> savedResources = save.getResult(); if (savedResources == null) { status = new Status(IStatus.ERROR, SiriusPlugin.ID, <START> "There is an error while <END> saving the session. Please check the error log for more details."); } else { boolean semanticSave = false; for (final Resource resource : savedResources) { if (semanticResourcesCollection.contains(resource) || getControlledResources().contains(resource)) { semanticSave = true; } } if (semanticSave) { notifyListeners(SessionListener.SEMANTIC_CHANGE); } monitor.worked(1); CommandStack commandStack = transactionalEditingDomain.getCommandStack(); if (commandStack instanceof BasicCommandStack) { ((BasicCommandStack) commandStack).saveIsDone(); } if (allResourcesAreInSync()) { notifyListeners(SessionListener.SYNC); } else { notifyListeners(SessionListener.DIRTY); } monitor.worked(1); } } catch (InterruptedException e) { SiriusPlugin.getDefault().warning("save interrupted", e); } finally { monitor.done(); } return status; }</code><technical_language>"There error", "An error occured"</technical_language>

Target:
protected IStatus doSave(final Map<?, ?> options, final IProgressMonitor monitor, boolean runExclusive) { IStatus status = Status.OK_STATUS; try { monitor.beginTask("Session saving", 3); final Collection<Resource> allResources = Lists.newArrayList(); allResources.addAll(getAllSessionResources()); Collection<Resource> semanticResourcesCollection = getSemanticResources(); allResources.addAll(semanticResourcesCollection); allResources.addAll(getControlledResources()); monitor.worked(1); RunnableWithResult<Collection<Resource>> save = new RunnableWithResult.Impl<Collection<Resource>>() { @Override public void run() { try { Collection<Resource> savedResources = getSavingPolicy().save(allResources, options, new SubProgressMonitor(monitor, 7)); setResult(savedResources); setStatus(Status.OK_STATUS); } catch (Throwable e) { SiriusPlugin.getDefault().error("Save failed", new CoreException(new Status(IStatus.ERROR, SiriusPlugin.ID, "Error while saving the session", e))); } } }; if (runExclusive && !saver.domainDisposed.get()) { getTransactionalEditingDomain().runExclusive(save); } else { save.run(); } Collection<Resource> savedResources = save.getResult(); if (savedResources == null) { status = new Status(IStatus.ERROR, SiriusPlugin.ID, "An error occurred while saving the session. Please check the error log for more details."); } else { boolean semanticSave = false; for (final Resource resource : savedResources) { if (semanticResourcesCollection.contains(resource) || getControlledResources().contains(resource)) { semanticSave = true; } } if (semanticSave) { notifyListeners(SessionListener.SEMANTIC_CHANGE); } monitor.worked(1); CommandStack commandStack = transactionalEditingDomain.getCommandStack(); if (commandStack instanceof BasicCommandStack) { ((BasicCommandStack) commandStack).saveIsDone(); } if (allResourcesAreInSync()) { notifyListeners(SessionListener.SYNC); } else { notifyListeners(SessionListener.DIRTY); } monitor.worked(1); } } catch (InterruptedException e) { SiriusPlugin.getDefault().warning("save interrupted", e); } finally { monitor.done(); } return status; }