Program: 147727
Project: 147727
Buggy source:
@Override protected void doRun(){
  List<IRepositoryViewObject> viewObjs=getSelectedViewObject();
  DeployOnMDMExportWizard publishWizard=new DeployOnMDMExportWizard();
  publishWizard.setWindowTitle(EXPORTJOBSCRIPTS);
  publishWizard.init(getWorkbench(),(IStructuredSelection)this.getSelection());
  Shell activeShell=Display.getCurrent().getActiveShell();
  WizardDialog dialog=new WizardDialog(activeShell,publishWizard);
  dialog.open();
  boolean deploySucceed=publishWizard.isDeploySucceed();
  if (deploySucceed) {
    IRemoveCommandService service=(IRemoveCommandService)GlobalServiceRegister.getDefault().getService(IRemoveCommandService.class);
    SpagoBiServer spagoBiServer=publishWizard.getMdmServer();
    MDMServerDef mdmServer=getMdmServer(spagoBiServer);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      for (      IRepositoryViewObject viewObj : viewObjs) {
        Item item=viewObj.getProperty().getItem();
        Property property=item.getProperty();
        if (property != null) {
          property.getAdditionalProperties().put(PROP_LAST_SERVER_DEF,mdmServer.getName());
          factory.save(item);
        }
        service.removeDeployPhaseCommandOf(ERepositoryObjectType.PROCESS,item);
      }
      Collection<IEditorPart> editors=WorkbenchUtil.getSelectDirtyEditor((IStructuredSelection)getSelection(),ERepositoryObjectType.PROCESS);
      for (      IEditorPart part : editors) {
        if (part instanceof MultiPageTalendEditor) {
          MultiPageTalendEditor mptEditor=(MultiPageTalendEditor)part;
          mptEditor.doSave(new NullProgressMonitor());
          mptEditor.refreshName();
        }
      }
      refreshMdmRepositoryViewTree();
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
}

Fixed version (ground truth):
@Override protected void doRun(){
  List<IRepositoryViewObject> viewObjs=getSelectedViewObject();
  DeployOnMDMExportWizard publishWizard=new DeployOnMDMExportWizard();
  publishWizard.setWindowTitle(EXPORTJOBSCRIPTS);
  publishWizard.init(getWorkbench(),(IStructuredSelection)this.getSelection());
  Shell activeShell=Display.getCurrent().getActiveShell();
  WizardDialog dialog=new WizardDialog(activeShell,publishWizard);
  dialog.open();
  boolean deploySucceed=publishWizard.isDeploySucceed();
  if (deploySucceed) {
    IRemoveCommandService service=(IRemoveCommandService)GlobalServiceRegister.getDefault().getService(IRemoveCommandService.class);
    SpagoBiServer spagoBiServer=publishWizard.getMdmServer();
    MDMServerDef mdmServer=getMdmServer(spagoBiServer);
    IProxyRepositoryFactory factory=CoreRuntimePlugin.getInstance().getProxyRepositoryFactory();
    try {
      for (      IRepositoryViewObject viewObj : viewObjs) {
        Item item=viewObj.getProperty().getItem();
        Property property=item.getProperty();
        if (property != null) {
          property.getAdditionalProperties().put(PROP_LAST_SERVER_DEF,mdmServer.getName());
          factory.save(item);
        }
        Collection<IEditorPart> editors=WorkbenchUtil.getSelectDirtyEditor((IStructuredSelection)getSelection(),ERepositoryObjectType.PROCESS);
        for (        IEditorPart part : editors) {
          if (part instanceof MultiPageTalendEditor) {
            MultiPageTalendEditor mptEditor=(MultiPageTalendEditor)part;
            mptEditor.doSave(new NullProgressMonitor());
            mptEditor.refreshName();
          }
        }
        refreshMdmRepositoryViewTree();
        service.removeDeployPhaseCommandOf(ERepositoryObjectType.PROCESS,item);
      }
    }
 catch (    PersistenceException e) {
      log.error(e.getMessage(),e);
    }
  }
}