Program: 102387
Project: 102387
Buggy source:
@Override public void setActivePage(IEditorPart thePart){
  if (Util.isTraceEnabled(this)) {
    Util.printEntered(this,new StringBuffer().append("String_Node_Str").append(thePart).append("String_Node_Str").append(activeEditor).toString());
  }
  AbstractModelEditorPageActionBarContributor contributor=null;
  IEditorPart part=thePart;
  if (thePart instanceof ModelEditor) {
    part=((ModelEditor)thePart).getCurrentPage();
  }
  if (this.partContributorMap != null) {
    Iterator itrContributor=this.partContributorMap.values().iterator();
    while (itrContributor.hasNext()) {
      IEditorActionBarContributor pageContributor=(IEditorActionBarContributor)itrContributor.next();
      if (pageContributor != null) {
        pageContributor.setActiveEditor(part);
      }
    }
  }
  contributor=getActionContributor(part);
  if (contributor != null) {
    contributor.setActiveEditor(part);
  }
  ModelerGlobalActionsMap globalActions=(contributor == null) ? (ModelerGlobalActionsMap)defaultActionsMap : (ModelerGlobalActionsMap)contributor.getGlobalActions();
  if (globalActions == null) {
    globalActions=new ModelerGlobalActionsMap();
  }
  IWorkbenchWindow window=getPage().getWorkbenchWindow();
  ActionService actionService=(contributor == null) ? UiPlugin.getDefault().getActionService(window.getActivePage()) : contributor.getActionService();
  Iterator itr=globalActions.entrySet().iterator();
  while (itr.hasNext()) {
    Map.Entry entry=(Map.Entry)itr.next();
    String actionId=(String)entry.getKey();
    IAction action=(globalActions.isDefaultAction(actionId)) ? actionService.getDefaultAction(actionId) : (IAction)entry.getValue();
    if (action == null) {
      action=GlobalActionsMap.UNSUPPORTED_ACTION;
    }
    getActionBars().setGlobalActionHandler(actionId,action);
    IHandlerService svc=(IHandlerService)part.getSite().getService(IHandlerService.class);
    svc.activateHandler(actionId,new ActionHandler(action));
  }
  getActionBars().updateActionBars();
  activeEditor=part;
  if (Util.isTraceEnabled(this)) {
    Util.printExited(this,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void setActivePage(IEditorPart thePart){
  if (Util.isTraceEnabled(this)) {
    Util.printEntered(this,new StringBuffer().append("String_Node_Str").append(thePart).append("String_Node_Str").append(activeEditor).toString());
  }
  AbstractModelEditorPageActionBarContributor contributor=null;
  IEditorPart part=thePart;
  if (thePart instanceof ModelEditor) {
    part=((ModelEditor)thePart).getCurrentPage();
  }
  if (this.partContributorMap != null) {
    Iterator itrContributor=this.partContributorMap.values().iterator();
    while (itrContributor.hasNext()) {
      IEditorActionBarContributor pageContributor=(IEditorActionBarContributor)itrContributor.next();
      if (pageContributor != null) {
        pageContributor.setActiveEditor(part);
      }
    }
  }
  contributor=getActionContributor(part);
  if (contributor != null) {
    contributor.setActiveEditor(part);
  }
  ModelerGlobalActionsMap globalActions=(contributor == null) ? (ModelerGlobalActionsMap)defaultActionsMap : (ModelerGlobalActionsMap)contributor.getGlobalActions();
  if (globalActions == null) {
    globalActions=new ModelerGlobalActionsMap();
  }
  IWorkbenchWindow window=getPage().getWorkbenchWindow();
  ActionService actionService=(contributor == null) ? UiPlugin.getDefault().getActionService(window.getActivePage()) : contributor.getActionService();
  IHandlerService svc=(IHandlerService)part.getSite().getService(IHandlerService.class);
  Iterator itr=globalActions.entrySet().iterator();
  while (itr.hasNext()) {
    Map.Entry entry=(Map.Entry)itr.next();
    String actionId=(String)entry.getKey();
    IAction action=(globalActions.isDefaultAction(actionId)) ? actionService.getDefaultAction(actionId) : (IAction)entry.getValue();
    if (action == null) {
      action=GlobalActionsMap.UNSUPPORTED_ACTION;
    }
    getActionBars().setGlobalActionHandler(actionId,action);
    if (this.actionHandlerMap.containsKey(actionId)) {
      svc.deactivateHandler(this.actionHandlerMap.get(actionId));
    }
    this.actionHandlerMap.put(actionId,svc.activateHandler(actionId,new ActionHandler(action)));
  }
  getActionBars().updateActionBars();
  activeEditor=part;
  if (Util.isTraceEnabled(this)) {
    Util.printExited(this,"String_Node_Str");
  }
}