Program: 81453
Project: 81453
Buggy source:
@Override public void buildContextMenu(IMenuManager menu){
  GEFActionConstants.addStandardActionGroups(menu);
  IAction action;
  action=getActionRegistry().getAction(OPPToggledProceduralLinkSubkindAction.CONDITIONAL_SUBKIND_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPToggledProceduralLinkSubkindAction.EVENT_SUBKIND_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPToggledProceduralLinkSubkindAction.OPTIONAL_SUBKIND_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateObjectAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateProcessAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateStateAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateAgentLinkAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateInstrumentLinkAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateConsResLinkAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPResizeToContentsAction.RESIZE_TO_CONTENTS_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPToggleGlobalObjectAction.TOGGLE_GLOBALOBJECT_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPThingInZoomAction.THING_IN_ZOOM_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPThingUnfoldAction.THING_UNFOLD_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
}

Fixed version (ground truth):
@Override public void buildContextMenu(IMenuManager menu){
  GEFActionConstants.addStandardActionGroups(menu);
  IAction action;
  action=getActionRegistry().getAction(OPPToggledProceduralLinkSubkindAction.CONDITIONAL_SUBKIND_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPToggledProceduralLinkSubkindAction.EVENT_SUBKIND_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateObjectAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateProcessAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateStateAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateAgentLinkAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateInstrumentLinkAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPCreateConsResLinkAction.ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPResizeToContentsAction.RESIZE_TO_CONTENTS_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPToggleGlobalObjectAction.TOGGLE_GLOBALOBJECT_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPThingInZoomAction.THING_IN_ZOOM_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
  action=getActionRegistry().getAction(OPPThingUnfoldAction.THING_UNFOLD_ID);
  if (action.isEnabled())   menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action);
}