Program: 119522
Project: 119522
Buggy source:
@Override public void doSave(IProgressMonitor progressMonitor){
  if (repositoryEditorInput != null) {
    BusinessProcessItem businessProcessItem=(BusinessProcessItem)repositoryEditorInput.getItem();
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
    try {
      repFactory.updateLockStatus();
      boolean locked=repFactory.getStatus(businessProcessItem) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        repFactory.lock(businessProcessItem);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
    ERepositoryStatus status=repFactory.getStatus(businessProcessItem);
    if (!status.equals(ERepositoryStatus.LOCK_BY_USER) && !repFactory.getRepositoryContext().isEditableAsReadOnly()) {
      MessageDialog.openWarning(getEditorSite().getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      return;
    }
    super.doSave(progressMonitor);
    DiagramResourceManager diagramResourceManager=new DiagramResourceManager();
    diagramResourceManager.updateFromResource(businessProcessItem,repositoryEditorInput.getFile());
    try {
      ProxyRepositoryFactory.getInstance().save(businessProcessItem);
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
    propertyIsDirty=false;
    firePropertyChange(IEditorPart.PROP_DIRTY);
  }
}

Fixed version (ground truth):
@Override public void doSave(IProgressMonitor progressMonitor){
  if (repositoryEditorInput != null) {
    final BusinessProcessItem businessProcessItem=(BusinessProcessItem)repositoryEditorInput.getItem();
    IRepositoryService service=CorePlugin.getDefault().getRepositoryService();
    IProxyRepositoryFactory repFactory=service.getProxyRepositoryFactory();
    try {
      repFactory.updateLockStatus();
      boolean locked=repFactory.getStatus(businessProcessItem) == ERepositoryStatus.LOCK_BY_USER;
      if (!locked) {
        repFactory.lock(businessProcessItem);
      }
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
    ERepositoryStatus status=repFactory.getStatus(businessProcessItem);
    if (!status.equals(ERepositoryStatus.LOCK_BY_USER) && !repFactory.getRepositoryContext().isEditableAsReadOnly()) {
      MessageDialog.openWarning(getEditorSite().getShell(),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"));
      return;
    }
    super.doSave(progressMonitor);
    DiagramResourceManager diagramResourceManager=new DiagramResourceManager();
    diagramResourceManager.updateFromResource(businessProcessItem,repositoryEditorInput.getFile());
    final IProxyRepositoryFactory factory=service.getProxyRepositoryFactory();
    RepositoryWorkUnit rwu=new RepositoryWorkUnit("String_Node_Str"){
      @Override protected void run() throws LoginException, PersistenceException {
        ProxyRepositoryFactory.getInstance().save(businessProcessItem);
      }
    }
;
    rwu.setAvoidUnloadResources(true);
    rwu.setAvoidSvnUpdate(true);
    factory.executeRepositoryWorkUnit(rwu);
    propertyIsDirty=false;
    firePropertyChange(IEditorPart.PROP_DIRTY);
  }
}