Program: 78878
Project: 78878
Buggy source:
/** 
 * Creats sub menu in the specified action group of the specified menu manager.
 * @param menuManager The menu manager contains the action group.
 * @param group_name The action group contains the sub menu.
 */
private void createInsertElementMenu(IMenuManager menuManager,String group_name){
  MenuManager subMenu=new MenuManager(ELEMENT_MENU_ITEM_TEXT);
  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();
    action=getAction(point.getExtensionName());
    if (action != null) {
      if (point.getExtensionName().equalsIgnoreCase("String_Node_Str")) {
        action.setText("String_Node_Str" + point.getExtensionName());
      }
 else {
        action.setText(point.getExtensionName());
      }
      subMenu.add(action);
    }
  }
  menuManager.appendToGroup(group_name,subMenu);
}

Fixed version (ground truth):
/** 
 * Creats sub menu in the specified action group of the specified menu manager.
 * @param menuManager The menu manager contains the action group.
 * @param group_name The action group contains the sub menu.
 */
private void createInsertElementMenu(IMenuManager menuManager,String group_name){
  MenuManager subMenu=new MenuManager(ELEMENT_MENU_ITEM_TEXT);
  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=DesignEngine.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(point.getExtensionName());
      }
      subMenu.add(action);
    }
  }
  menuManager.appendToGroup(group_name,subMenu);
}