Program: 101971
Project: 101971
Buggy source:
private void internalCreatePartControl(){
  Composite parent=(Composite)this.ctrl;
  GridDataFactory.fillDefaults().grab(true,true).applyTo(parent);
  GridLayoutFactory.fillDefaults().applyTo(parent);
  toolkit=new FormToolkit(parent.getDisplay());
  contentsPanel=toolkit.createComposite(parent);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(contentsPanel);
  GridLayoutFactory.fillDefaults().applyTo(contentsPanel);
  super.createPartControl(contentsPanel);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(getTreeViewer().getTree());
  createServerStatusPanel(contentsPanel);
  new ModelExplorerSelectionHelper(getTreeViewer());
  if (UiPlugin.getDefault().isProductContextSupported(IModelerProductContexts.Views.ID_MODEL_PROJECT_FILTER)) {
    ModelWorkspaceViewerFilter filter=new ModelWorkspaceViewerFilter(true,true,true);
    filter.setResourceFilter(getPatternFilter());
    getTreeViewer().addFilter(filter);
  }
  final IWorkbenchWindow wdw=UiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
  final ModelerActionService svc=(ModelerActionService)UiPlugin.getDefault().getActionService(getSite().getPage());
  final IActionBars bars=getViewSite().getActionBars();
  this.copyAction=new ModelExplorerCopyAction(bars,svc);
  wdw.getSelectionService().addSelectionListener(this.copyAction);
  this.removeProjectAction=new RemoveProjectAction();
  wdw.getSelectionService().addSelectionListener(this.removeProjectAction);
  svc.registerDefaultGlobalActions(bars);
  actionsMap=new ModelerGlobalActionsMap();
  try {
    bars.setGlobalActionHandler(EclipseGlobalActions.COPY,copyAction);
    renameAction=new ModelExplorerRenameAction(wdw.getShell(),getTreeViewer());
    renameAction.selectionChanged((IStructuredSelection)getTreeViewer().getSelection());
    actionsMap.put(EclipseGlobalActions.RENAME,renameAction);
    bars.setGlobalActionHandler(EclipseGlobalActions.RENAME,renameAction);
    final IAction deleteAction=svc.getAction(DeleteAction.class);
    bars.setGlobalActionHandler(ActionFactory.DELETE.getId(),deleteAction);
    final IAction pasteAction=svc.getAction(PasteInResourceAction.class);
    bars.setGlobalActionHandler(ActionFactory.PASTE.getId(),pasteAction);
    moveAction=new ModelExplorerMoveAction(wdw.getShell(),getTreeViewer());
    bars.setGlobalActionHandler(ActionFactory.MOVE.getId(),moveAction);
    bars.updateActionBars();
  }
 catch (  final CoreException err) {
    Util.log(err);
    WidgetUtil.showError(CREATE_RENAME_ACTION_ERROR_MESSAGE);
  }
  propertyAction=new PropertyDialogAction(getTreeViewer().getControl(),getTreeViewer());
  bars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(),propertyAction);
  notificationHandler=getNotifyChangedListener();
  if (notificationHandler != null) {
    ModelUtilities.addNotifyChangedListener(notificationHandler);
  }
  this.partListener=new IPartListener(){
    @Override public void partActivated(    IWorkbenchPart part){
    }
    @Override public void partBroughtToTop(    IWorkbenchPart part){
    }
    @Override public void partClosed(    IWorkbenchPart part){
    }
    @Override public void partDeactivated(    IWorkbenchPart part){
    }
    @Override public void partOpened(    IWorkbenchPart part){
      checkResource(part);
    }
    private void checkResource(    final IWorkbenchPart part){
      if (part instanceof ModelEditor) {
        Display.getCurrent().asyncExec(new Runnable(){
          @Override public void run(){
            if (!getViewer().getTree().isDisposed()) {
              getViewer().refresh(((ModelEditor)part).getModelFile());
            }
          }
        }
);
      }
    }
  }
;
  getSite().getPage().addPartListener(this.partListener);
  markerListener=new IResourceChangeListener(){
    @Override public void resourceChanged(    IResourceChangeEvent event){
      final IMarkerDelta[] deltas=event.findMarkerDeltas(null,true);
      if (deltas != null && deltas.length > 0) {
        Set<IProject> projects=new HashSet<IProject>();
        for (int i=0; i < deltas.length; ++i) {
          projects.add(deltas[i].getResource().getProject());
        }
        final Iterator<IProject> itr=projects.iterator();
        Display.getDefault().asyncExec(new Runnable(){
          @Override public void run(){
            if (!getTreeViewer().getTree().isDisposed()) {
              TreeViewer viewer=getTreeViewer();
              while (itr.hasNext()) {
                IProject project=itr.next();
                viewer.refresh(project,true);
              }
            }
          }
        }
);
      }
    }
  }
;
  ModelerCore.getWorkspace().addResourceChangeListener(markerListener);
  addCustomListeners();
  IUndoContext undoContext=(IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
  UndoActionHandler undoAction=new UndoActionHandler(getSite(),undoContext);
  undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
  getViewSite().getActionBars().setGlobalActionHandler(ActionFactory.UNDO.getId(),undoAction);
  IContributionItem[] items=bars.getToolBarManager().getItems();
  Collection<IContributionItem> itemsToRemove=new ArrayList<IContributionItem>();
  for (  IContributionItem item : items) {
    if (item instanceof ActionContributionItem) {
      if (((ActionContributionItem)item).getAction() instanceof BackAction) {
        itemsToRemove.add(item);
      }
      if (((ActionContributionItem)item).getAction() instanceof ForwardAction) {
        itemsToRemove.add(item);
      }
      if (((ActionContributionItem)item).getAction() instanceof GoIntoAction) {
        itemsToRemove.add(item);
      }
    }
  }
  for (  IContributionItem item : itemsToRemove) {
    bars.getToolBarManager().remove(item);
  }
}

Fixed version (ground truth):
private void internalCreatePartControl(Composite parent){
  GridDataFactory.fillDefaults().grab(true,true).applyTo(parent);
  GridLayoutFactory.fillDefaults().applyTo(parent);
  toolkit=new FormToolkit(parent.getDisplay());
  contentsPanel=toolkit.createComposite(parent);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(contentsPanel);
  GridLayoutFactory.fillDefaults().applyTo(contentsPanel);
  super.createPartControl(contentsPanel);
  GridDataFactory.fillDefaults().grab(true,true).applyTo(getTreeViewer().getTree());
  createServerStatusPanel(contentsPanel);
  new ModelExplorerSelectionHelper(getTreeViewer());
}