Program: 66994
Project: 66994
Buggy source:
public void setActivePage(IFormPage page){
  if (page == null) {
    return;
  }
  if (subBarMap == null) {
    subBarMap=new HashMap();
  }
  if (currentActionBarDef != null) {
    currentActionBarDef.deactivate();
    currentActionBarDef.dispose();
    currentActionBarDef=null;
  }
  IActionBars rootBar=getActionBars();
  if (page != null) {
    if (currentActionBarDef == null) {
      FormEditor editor=page.getEditor();
      if (editor != null) {
        EditorContributor contributor=EditorContributorManager.getInstance().getEditorContributor(editor.getSite().getId());
        if (contributor != null) {
          FormPageDef pageDef=contributor.getPage(page.getId());
          if (pageDef != null && pageDef.actionBarContributor != null) {
            currentActionBarDef=new SubActionBarDef(rootBar,pageDef.actionBarContributor);
            currentActionBarDef.init(getPage());
          }
        }
      }
    }
  }
  rootBar.clearGlobalActionHandlers();
  if (currentActionBarDef != null) {
    currentActionBarDef.setActiveEditor(page);
    Map handlers=currentActionBarDef.getSubActionBar().getGlobalActionHandlers();
    if (handlers != null) {
      for (Iterator iter=handlers.entrySet().iterator(); iter.hasNext(); ) {
        Map.Entry entry=(Map.Entry)iter.next();
        rootBar.setGlobalActionHandler(entry.getKey().toString(),(IAction)entry.getValue());
      }
    }
    currentActionBarDef.activate();
    currentActionBarDef.updateActionBars();
  }
  rootBar.getToolBarManager().update(true);
  rootBar.updateActionBars();
}

Fixed version (ground truth):
public void setActivePage(IFormPage page){
  if (page == null) {
    return;
  }
  if (subBarMap == null) {
    subBarMap=new HashMap();
  }
  if (currentActionBarDef != null) {
    currentActionBarDef.deactivate();
    currentActionBarDef.dispose();
    currentActionBarDef=null;
  }
  IActionBars rootBar=getActionBars();
  if (page != null) {
    if (currentActionBarDef == null) {
      FormEditor editor=page.getEditor();
      if (editor != null) {
        EditorContributor contributor=EditorContributorManager.getInstance().getEditorContributor(editor.getSite().getId());
        if (contributor != null) {
          FormPageDef pageDef=contributor.getPage(page.getId());
          if (pageDef != null) {
            IEditorActionBarContributor actionBarContributor=pageDef.createActionBarContributor();
            if (actionBarContributor != null) {
              currentActionBarDef=new SubActionBarDef(rootBar,actionBarContributor);
              currentActionBarDef.init(getPage());
            }
          }
        }
      }
    }
  }
  rootBar.clearGlobalActionHandlers();
  if (currentActionBarDef != null) {
    currentActionBarDef.setActiveEditor(page);
    Map handlers=currentActionBarDef.getSubActionBar().getGlobalActionHandlers();
    if (handlers != null) {
      for (Iterator iter=handlers.entrySet().iterator(); iter.hasNext(); ) {
        Map.Entry entry=(Map.Entry)iter.next();
        rootBar.setGlobalActionHandler(entry.getKey().toString(),(IAction)entry.getValue());
      }
    }
    currentActionBarDef.activate();
    currentActionBarDef.updateActionBars();
  }
  rootBar.getToolBarManager().update(true);
  rootBar.updateActionBars();
}