Program: 75326
Project: 75326
Buggy source:
public Object getAdapter(Object adaptableObject,Class adapterType){
  if (adaptableObject instanceof NormalCrosstabCellAdapter && adapterType == IMenuListener.class) {
    return new ISchematicMenuListener(){
      private ActionRegistry actionRegistry;
      public void menuAboutToShow(      IMenuManager manager){
        MenuManager subMenu=new MenuManager(Messages.getString("String_Node_Str"));
        IAction action=getAction(GeneralInsertMenuAction.INSERT_TEXT_ID);
        action.setText(GeneralInsertMenuAction.INSERT_TEXT_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_LABEL_ID);
        action.setText(GeneralInsertMenuAction.INSERT_LABEL_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_DATA_ID);
        action.setText(GeneralInsertMenuAction.INSERT_DATA_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_IMAGE_ID);
        action.setText(GeneralInsertMenuAction.INSERT_IMAGE_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_GRID_ID);
        action.setText(GeneralInsertMenuAction.INSERT_GRID_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_LIST_ID);
        action.setText(GeneralInsertMenuAction.INSERT_LIST_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_TABLE_ID);
        action.setText(GeneralInsertMenuAction.INSERT_TABLE_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_DYNAMIC_TEXT_ID);
        action.setText(GeneralInsertMenuAction.INSERT_DYNAMIC_TEXT_DISPLAY_TEXT);
        subMenu.add(action);
        List points=ExtensionPointManager.getInstance().getExtendedElementPoints();
        for (Iterator iter=points.iterator(); iter.hasNext(); ) {
          ExtendedElementUIPoint point=(ExtendedElementUIPoint)iter.next();
          IElementDefn extension=DEUtil.getMetaDataDictionary().getExtension(point.getExtensionName());
          String displayName=new String();
          displayName=extension.getDisplayName();
          action=getAction(point.getExtensionName());
          if (action != null) {
            if (displayName.equalsIgnoreCase("String_Node_Str")) {
              action.setText("String_Node_Str" + displayName);
            }
 else {
              action.setText(displayName);
            }
            subMenu.add(action);
          }
        }
        PaletteEntryExtension[] entries=EditpartExtensionManager.getPaletteEntries();
        for (int i=0; i < entries.length; i++) {
          action=getAction(entries[i].getItemName());
          action.setText(entries[i].getMenuLabel());
          subMenu.add(action);
        }
        manager.add(subMenu);
      }
      public void setActionRegistry(      ActionRegistry actionRegistry){
        this.actionRegistry=actionRegistry;
      }
      protected IAction getAction(      String actionID){
        IAction action=getActionRegistry().getAction(actionID);
        if (action instanceof UpdateAction) {
          ((UpdateAction)action).update();
        }
        return action;
      }
      private ActionRegistry getActionRegistry(){
        if (actionRegistry == null)         actionRegistry=new ActionRegistry();
        return actionRegistry;
      }
    }
;
  }
  return null;
}

Fixed version (ground truth):
public Object getAdapter(Object adaptableObject,Class adapterType){
  if (adaptableObject instanceof CrosstabCellAdapter && ((CrosstabCellAdapter)adaptableObject).getCrosstabCellHandle() != null && adapterType == IMenuListener.class) {
    return new ISchematicMenuListener(){
      private ActionRegistry actionRegistry;
      public void menuAboutToShow(      IMenuManager manager){
        MenuManager subMenu=new MenuManager(Messages.getString("String_Node_Str"));
        IAction action=getAction(GeneralInsertMenuAction.INSERT_TEXT_ID);
        action.setText(GeneralInsertMenuAction.INSERT_TEXT_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_LABEL_ID);
        action.setText(GeneralInsertMenuAction.INSERT_LABEL_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_DATA_ID);
        action.setText(GeneralInsertMenuAction.INSERT_DATA_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_IMAGE_ID);
        action.setText(GeneralInsertMenuAction.INSERT_IMAGE_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_GRID_ID);
        action.setText(GeneralInsertMenuAction.INSERT_GRID_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_LIST_ID);
        action.setText(GeneralInsertMenuAction.INSERT_LIST_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_TABLE_ID);
        action.setText(GeneralInsertMenuAction.INSERT_TABLE_DISPLAY_TEXT);
        subMenu.add(action);
        action=getAction(GeneralInsertMenuAction.INSERT_DYNAMIC_TEXT_ID);
        action.setText(GeneralInsertMenuAction.INSERT_DYNAMIC_TEXT_DISPLAY_TEXT);
        subMenu.add(action);
        List points=ExtensionPointManager.getInstance().getExtendedElementPoints();
        for (Iterator iter=points.iterator(); iter.hasNext(); ) {
          ExtendedElementUIPoint point=(ExtendedElementUIPoint)iter.next();
          IElementDefn extension=DEUtil.getMetaDataDictionary().getExtension(point.getExtensionName());
          String displayName=new String();
          displayName=extension.getDisplayName();
          action=getAction(point.getExtensionName());
          if (action != null) {
            if (displayName.equalsIgnoreCase("String_Node_Str")) {
              action.setText("String_Node_Str" + displayName);
            }
 else {
              action.setText(displayName);
            }
            subMenu.add(action);
          }
        }
        PaletteEntryExtension[] entries=EditpartExtensionManager.getPaletteEntries();
        for (int i=0; i < entries.length; i++) {
          action=getAction(entries[i].getItemName());
          action.setText(entries[i].getMenuLabel());
          subMenu.add(action);
        }
        manager.add(subMenu);
      }
      public void setActionRegistry(      ActionRegistry actionRegistry){
        this.actionRegistry=actionRegistry;
      }
      protected IAction getAction(      String actionID){
        IAction action=getActionRegistry().getAction(actionID);
        if (action instanceof UpdateAction) {
          ((UpdateAction)action).update();
        }
        return action;
      }
      private ActionRegistry getActionRegistry(){
        if (actionRegistry == null)         actionRegistry=new ActionRegistry();
        return actionRegistry;
      }
    }
;
  }
  return null;
}