Program: 147667
Project: 147667
Buggy source:
private void openItem(IRepositoryViewObject viewObject){
  Item item=viewObject.getProperty().getItem();
  item=RepositoryResourceUtil.assertItem(item);
  IRepositoryNodeConfiguration configuration=RepositoryNodeConfigurationManager.getConfiguration(item);
  if (configuration != null) {
    IRepositoryNodeActionProvider actionProvider=configuration.getActionProvider();
    if (actionProvider != null) {
      IRepositoryViewEditorInput editorInput=actionProvider.getOpenEditorInput(viewObject);
      if (editorInput != null) {
        if (page == null) {
          this.page=getCommonViewer().getCommonNavigator().getSite().getWorkbenchWindow().getActivePage();
        }
        MDMServerObject serverObject=((MDMServerObjectItem)item).getMDMServerObject();
        if (!checkMissingJar(serverObject)) {
          return;
        }
        boolean selected=doSelectServer(item,editorInput);
        if (!selected) {
          return;
        }
        try {
          ERepositoryStatus status=factory.getStatus(item);
          if (factory.isEditableAndLockIfPossible(item)) {
            getCommonViewer().refresh(viewObject);
          }
          editorInput.setReadOnly(status == ERepositoryStatus.LOCK_BY_OTHER || status == ERepositoryStatus.READ_ONLY);
          if (!editorInput.isReadOnly()) {
            editorInput.setReadOnly(item.getState().isDeleted());
          }
          updateEditorInputVersionInfo(editorInput,viewObject);
          IEditorPart editor=this.page.openEditor(editorInput,editorInput.getEditorId());
          if (marker != null) {
            IDE.gotoMarker(editor,marker);
          }
        }
 catch (        PartInitException e) {
          log.error(e.getMessage(),e);
        }
      }
 else {
        AbstractRepositoryAction openAction=actionProvider.getOpenAction(viewObject);
        if (openAction != null) {
          openAction.selectionChanged(getStructuredSelection());
          openAction.run();
        }
      }
    }
  }
}

Fixed version (ground truth):
private void openItem(IRepositoryViewObject viewObject){
  Item item=viewObject.getProperty().getItem();
  item=RepositoryResourceUtil.assertItem(item);
  item=reloadIfResourceMissed(item);
  IRepositoryNodeConfiguration configuration=RepositoryNodeConfigurationManager.getConfiguration(item);
  if (configuration != null) {
    IRepositoryNodeActionProvider actionProvider=configuration.getActionProvider();
    if (actionProvider != null) {
      IRepositoryViewEditorInput editorInput=actionProvider.getOpenEditorInput(viewObject);
      if (editorInput != null) {
        if (page == null) {
          this.page=getCommonViewer().getCommonNavigator().getSite().getWorkbenchWindow().getActivePage();
        }
        MDMServerObject serverObject=((MDMServerObjectItem)item).getMDMServerObject();
        if (!checkMissingJar(serverObject)) {
          return;
        }
        boolean selected=doSelectServer(item,editorInput);
        if (!selected) {
          return;
        }
        try {
          ERepositoryStatus status=factory.getStatus(item);
          if (factory.isEditableAndLockIfPossible(item)) {
            getCommonViewer().refresh(viewObject);
          }
          editorInput.setReadOnly(status == ERepositoryStatus.LOCK_BY_OTHER || status == ERepositoryStatus.READ_ONLY);
          if (!editorInput.isReadOnly()) {
            editorInput.setReadOnly(item.getState().isDeleted());
          }
          updateEditorInputVersionInfo(editorInput,viewObject);
          IEditorPart editor=this.page.openEditor(editorInput,editorInput.getEditorId());
          if (marker != null) {
            IDE.gotoMarker(editor,marker);
          }
        }
 catch (        PartInitException e) {
          log.error(e.getMessage(),e);
        }
      }
 else {
        AbstractRepositoryAction openAction=actionProvider.getOpenAction(viewObject);
        if (openAction != null) {
          openAction.selectionChanged(getStructuredSelection());
          openAction.run();
        }
      }
    }
  }
}