Program: 124005
Project: 124005
Buggy source:
@Override public boolean performFinish(){
  if (mainPage.isCreateNewVersionJob()) {
    if (!alreadyEditedByUser) {
      refreshNewJob();
      try {
        ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
    try {
      Item newCreated=null;
      if (processObject.getProperty() != null && processObject.getProperty().getItem() != null) {
        newCreated=processObject.getProperty().getItem();
      }
      if (!(newCreated instanceof BusinessProcessItem)) {
        ProxyRepositoryFactory.getInstance().lock(processObject);
      }
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    LoginException e) {
      ExceptionHandler.process(e);
    }
    boolean locked=processObject.getRepositoryStatus().equals(ERepositoryStatus.LOCK_BY_USER);
    openAnotherVersion((RepositoryNode)processObject.getRepositoryNode(),!locked);
    try {
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    StructuredSelection selection=(StructuredSelection)mainPage.getSelection();
    RepositoryNode node=(RepositoryNode)selection.getFirstElement();
    boolean lastVersion=node.getObject().getVersion().equals(processObject.getVersion());
    processObject.getProperty().setVersion(originalVersion);
    if (lastVersion) {
      lockObject(processObject);
    }
    ERepositoryStatus status=node.getObject().getRepositoryStatus();
    boolean isLocked=false;
    if (status == ERepositoryStatus.LOCK_BY_USER) {
      isLocked=true;
    }
    openAnotherVersion(node,!lastVersion || !isLocked);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  if (mainPage.isCreateNewVersionJob()) {
    if (!alreadyEditedByUser) {
      refreshNewJob();
      try {
        ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
      }
 catch (      Exception e) {
        ExceptionHandler.process(e);
      }
    }
    try {
      Item newCreated=null;
      if (processObject.getProperty() != null && processObject.getProperty().getItem() != null) {
        newCreated=processObject.getProperty().getItem();
      }
      if (!(newCreated instanceof BusinessProcessItem)) {
        ProxyRepositoryFactory.getInstance().lock(processObject);
      }
    }
 catch (    PersistenceException e) {
      ExceptionHandler.process(e);
    }
catch (    LoginException e) {
      ExceptionHandler.process(e);
    }
    boolean locked=processObject.getRepositoryStatus().equals(ERepositoryStatus.LOCK_BY_USER);
    openAnotherVersion((RepositoryNode)processObject.getRepositoryNode(),!locked);
    try {
      ProxyRepositoryFactory.getInstance().saveProject(ProjectManager.getInstance().getCurrentProject());
    }
 catch (    Exception e) {
      ExceptionHandler.process(e);
    }
  }
 else {
    StructuredSelection selection=(StructuredSelection)mainPage.getSelection();
    RepositoryNode node=(RepositoryNode)selection.getFirstElement();
    boolean lastVersion=node.getObject().getVersion().equals(processObject.getVersion());
    if (lastVersion) {
      lockObject(processObject);
    }
    ERepositoryStatus status=node.getObject().getRepositoryStatus();
    boolean isLocked=false;
    if (status == ERepositoryStatus.LOCK_BY_USER) {
      isLocked=true;
    }
    openAnotherVersion(node,!lastVersion || !isLocked);
  }
  return true;
}