Program: 124255
Project: 124255
Buggy source:
/** 
 * Saves the multi-page editor's document.
 */
@Override public void doSave(final IProgressMonitor monitor){
  if (!isDirty()) {
    return;
  }
  updateRunJobContext();
  designerEditor.getProcess().getProperty().eAdapters().remove(dirtyListener);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  display=getSite().getShell().getDisplay();
  repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
  if (getActivePage() == 0) {
    getEditor(0).doSave(monitor);
  }
 else   if (getActivePage() == 2) {
    getEditor(2).doSave(monitor);
    try {
      IProcess2 oldProcess=getProcess();
      ICreateXtextProcessService n=CorePlugin.getDefault().getCreateXtextProcessService();
      ProcessType processType=n.convertDesignerEditorInput(((IFile)getEditor(2).getEditorInput().getAdapter(IResource.class)).getLocation().toOSString(),oldProcess.getProperty());
      IProcess2 newProcess=null;
      Item item=getProcess().getProperty().getItem();
      if (item instanceof ProcessItem) {
        ((Process)designerEditor.getProcess()).updateProcess(processType);
      }
 else       if (item instanceof JobletProcessItem) {
        AbstractProcessProvider processProvider=AbstractProcessProvider.findProcessProviderFromPID(IComponent.JOBLET_PID);
        if (processProvider != null) {
          newProcess=processProvider.buildNewGraphicProcess(item);
        }
        designerEditor.setProcess(newProcess);
        Boolean lastVersion=null;
        if (oldProcess instanceof ILastVersionChecker) {
          lastVersion=((ILastVersionChecker)oldProcess).isLastVersion(item);
        }
        if (designerEditor.getEditorInput() instanceof JobEditorInput) {
          ((JobEditorInput)designerEditor.getEditorInput()).checkInit(lastVersion,null,true);
        }
      }
      getEditor(0).doSave(monitor);
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  if (processEditorInput != null) {
    propertyInformation=new ArrayList(processEditorInput.getItem().getProperty().getInformations());
    propertyIsDirty=false;
    firePropertyChange(IEditorPart.PROP_DIRTY);
    if (processEditorInput.getItem() instanceof ProcessItem) {
      RepositoryManager.refresh(ERepositoryObjectType.PROCESS);
    }
 else {
      RepositoryManager.refresh(ERepositoryObjectType.JOBLET);
    }
  }
  if (designerEditor != null && dirtyListener != null)   designerEditor.getProcess().getProperty().eAdapters().add(dirtyListener);
}

Fixed version (ground truth):
/** 
 * Saves the multi-page editor's document.
 */
@Override public void doSave(final IProgressMonitor monitor){
  if (!isDirty()) {
    return;
  }
  updateRunJobContext();
  designerEditor.getProcess().getProperty().eAdapters().remove(dirtyListener);
  IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
  IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
  display=getSite().getShell().getDisplay();
  repFactory.addRepositoryWorkUnitListener(repositoryWorkListener);
  if (getActivePage() == 0 || getActivePage() == 1) {
    getEditor(0).doSave(monitor);
  }
 else   if (getActivePage() == 2) {
    getEditor(2).doSave(monitor);
    try {
      IProcess2 oldProcess=getProcess();
      ICreateXtextProcessService n=CorePlugin.getDefault().getCreateXtextProcessService();
      ProcessType processType=n.convertDesignerEditorInput(((IFile)getEditor(2).getEditorInput().getAdapter(IResource.class)).getLocation().toOSString(),oldProcess.getProperty());
      IProcess2 newProcess=null;
      Item item=getProcess().getProperty().getItem();
      if (item instanceof ProcessItem) {
        ((Process)designerEditor.getProcess()).updateProcess(processType);
      }
 else       if (item instanceof JobletProcessItem) {
        AbstractProcessProvider processProvider=AbstractProcessProvider.findProcessProviderFromPID(IComponent.JOBLET_PID);
        if (processProvider != null) {
          newProcess=processProvider.buildNewGraphicProcess(item);
        }
        designerEditor.setProcess(newProcess);
        Boolean lastVersion=null;
        if (oldProcess instanceof ILastVersionChecker) {
          lastVersion=((ILastVersionChecker)oldProcess).isLastVersion(item);
        }
        if (designerEditor.getEditorInput() instanceof JobEditorInput) {
          ((JobEditorInput)designerEditor.getEditorInput()).checkInit(lastVersion,null,true);
        }
      }
      getEditor(0).doSave(monitor);
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
  }
  if (processEditorInput != null) {
    propertyInformation=new ArrayList(processEditorInput.getItem().getProperty().getInformations());
    propertyIsDirty=false;
    firePropertyChange(IEditorPart.PROP_DIRTY);
    if (processEditorInput.getItem() instanceof ProcessItem) {
      RepositoryManager.refresh(ERepositoryObjectType.PROCESS);
    }
 else {
      RepositoryManager.refresh(ERepositoryObjectType.JOBLET);
    }
  }
  if (designerEditor != null && dirtyListener != null)   designerEditor.getProcess().getProperty().eAdapters().add(dirtyListener);
}