Program: 85425
Project: 85425
Buggy source:
private JMenuBar createMenuBar(){
  JMenuBar menuBar=new JMenuBar();
  JMenu fileMenu=new JMenu("String_Node_Str");
  int menuShortcutMask=Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
  menuBar.add(fileMenu);
  JMenuItem openItem=new JMenuItem("String_Node_Str");
  openItem.addActionListener(this);
  openItem.setActionCommand(ACTION_CMD_OPEN_ETL_SPECS);
  openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,menuShortcutMask));
  fileMenu.add(openItem);
  JMenuItem openScanReportItem=new JMenuItem("String_Node_Str");
  openScanReportItem.addActionListener(this);
  openScanReportItem.setActionCommand(ACTION_CMD_OPEN_SCAN_REPORT);
  fileMenu.add(openScanReportItem);
  JMenuItem saveItem=new JMenuItem("String_Node_Str");
  saveItem.addActionListener(this);
  saveItem.setActionCommand(ACTION_CMD_SAVE);
  saveItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,menuShortcutMask));
  fileMenu.add(saveItem);
  JMenuItem saveAsItem=new JMenuItem("String_Node_Str");
  saveAsItem.addActionListener(this);
  saveAsItem.setActionCommand(ACTION_CMD_SAVE_AS);
  fileMenu.add(saveAsItem);
  JMenuItem generateDocItem=new JMenuItem("String_Node_Str");
  generateDocItem.addActionListener(this);
  generateDocItem.setActionCommand(ACTION_CMD_GENERATE_ETL_DOCUMENT);
  fileMenu.add(generateDocItem);
  JMenu editMenu=new JMenu("String_Node_Str");
  menuBar.add(editMenu);
  JMenuItem discardCounts=new JMenuItem(ACTION_CMD_DISCARD_COUNTS);
  discardCounts.addActionListener(this);
  discardCounts.setActionCommand(ACTION_CMD_DISCARD_COUNTS);
  editMenu.add(discardCounts);
  JMenuItem filter=new JMenuItem(ACTION_CMD_FILTER);
  filter.addActionListener(this);
  filter.setActionCommand(ACTION_CMD_FILTER);
  filter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F,menuShortcutMask));
  editMenu.add(filter);
  JMenuItem makeMappings=new JMenuItem(ACTION_CMD_MAKE_MAPPING);
  makeMappings.addActionListener(this);
  makeMappings.setActionCommand(ACTION_CMD_MAKE_MAPPING);
  makeMappings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,menuShortcutMask));
  editMenu.add(makeMappings);
  JMenuItem removeMappings=new JMenuItem(ACTION_CMD_REMOVE_MAPPING);
  removeMappings.addActionListener(this);
  removeMappings.setActionCommand(ACTION_CMD_REMOVE_MAPPING);
  removeMappings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R,menuShortcutMask));
  editMenu.add(removeMappings);
  JMenu setTarget=new JMenu("String_Node_Str");
  JMenuItem targetCDMV4=new JMenuItem(ACTION_CMD_SET_TARGET_V4);
  targetCDMV4.addActionListener(this);
  targetCDMV4.setActionCommand(ACTION_CMD_SET_TARGET_V4);
  setTarget.add(targetCDMV4);
  JMenuItem targetCDMV5=new JMenuItem(ACTION_CMD_SET_TARGET_V5);
  targetCDMV5.addActionListener(this);
  targetCDMV5.setActionCommand(ACTION_CMD_SET_TARGET_V5);
  setTarget.add(targetCDMV5);
  JMenuItem loadTarget=new JMenuItem(ACTION_CMD_SET_TARGET_CUSTOM);
  loadTarget.addActionListener(this);
  loadTarget.setActionCommand(ACTION_CMD_SET_TARGET_CUSTOM);
  setTarget.add(loadTarget);
  editMenu.add(setTarget);
  final JCheckBoxMenuItem hideCommented=new JCheckBoxMenuItem(ACTION_CMD_HIDE_COMMENTED);
  hideCommented.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent e){
      if (hideCommented.isSelected()) {
        doHideCommented();
      }
 else {
        doShowCommented();
      }
    }
  }
);
  editMenu.add(hideCommented);
  return menuBar;
}

Fixed version (ground truth):
private JMenuBar createMenuBar(){
  JMenuBar menuBar=new JMenuBar();
  JMenu fileMenu=new JMenu("String_Node_Str");
  int menuShortcutMask=Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
  menuBar.add(fileMenu);
  JMenuItem openItem=new JMenuItem("String_Node_Str");
  openItem.addActionListener(this);
  openItem.setActionCommand(ACTION_CMD_OPEN_ETL_SPECS);
  openItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,menuShortcutMask));
  fileMenu.add(openItem);
  JMenuItem openScanReportItem=new JMenuItem("String_Node_Str");
  openScanReportItem.addActionListener(this);
  openScanReportItem.setActionCommand(ACTION_CMD_OPEN_SCAN_REPORT);
  fileMenu.add(openScanReportItem);
  JMenuItem saveItem=new JMenuItem("String_Node_Str");
  saveItem.addActionListener(this);
  saveItem.setActionCommand(ACTION_CMD_SAVE);
  saveItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,menuShortcutMask));
  fileMenu.add(saveItem);
  JMenuItem saveAsItem=new JMenuItem("String_Node_Str");
  saveAsItem.addActionListener(this);
  saveAsItem.setActionCommand(ACTION_CMD_SAVE_AS);
  fileMenu.add(saveAsItem);
  JMenuItem generateDocItem=new JMenuItem("String_Node_Str");
  generateDocItem.addActionListener(this);
  generateDocItem.setActionCommand(ACTION_CMD_GENERATE_ETL_DOCUMENT);
  fileMenu.add(generateDocItem);
  JMenu editMenu=new JMenu("String_Node_Str");
  menuBar.add(editMenu);
  JMenuItem discardCounts=new JMenuItem(ACTION_CMD_DISCARD_COUNTS);
  discardCounts.addActionListener(this);
  discardCounts.setActionCommand(ACTION_CMD_DISCARD_COUNTS);
  editMenu.add(discardCounts);
  JMenuItem filter=new JMenuItem(ACTION_CMD_FILTER);
  filter.addActionListener(this);
  filter.setActionCommand(ACTION_CMD_FILTER);
  filter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F,menuShortcutMask));
  editMenu.add(filter);
  JMenuItem makeMappings=new JMenuItem(ACTION_CMD_MAKE_MAPPING);
  makeMappings.addActionListener(this);
  makeMappings.setActionCommand(ACTION_CMD_MAKE_MAPPING);
  makeMappings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,menuShortcutMask));
  editMenu.add(makeMappings);
  JMenuItem removeMappings=new JMenuItem(ACTION_CMD_REMOVE_MAPPING);
  removeMappings.addActionListener(this);
  removeMappings.setActionCommand(ACTION_CMD_REMOVE_MAPPING);
  removeMappings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R,menuShortcutMask));
  editMenu.add(removeMappings);
  JMenu setTarget=new JMenu("String_Node_Str");
  JMenuItem targetCDMV4=new JMenuItem(ACTION_CMD_SET_TARGET_V4);
  targetCDMV4.addActionListener(this);
  targetCDMV4.setActionCommand(ACTION_CMD_SET_TARGET_V4);
  setTarget.add(targetCDMV4);
  JMenuItem targetCDMV5=new JMenuItem(ACTION_CMD_SET_TARGET_V5);
  targetCDMV5.addActionListener(this);
  targetCDMV5.setActionCommand(ACTION_CMD_SET_TARGET_V5);
  setTarget.add(targetCDMV5);
  JMenuItem loadTarget=new JMenuItem(ACTION_CMD_SET_TARGET_CUSTOM);
  loadTarget.addActionListener(this);
  loadTarget.setActionCommand(ACTION_CMD_SET_TARGET_CUSTOM);
  setTarget.add(loadTarget);
  editMenu.add(setTarget);
  final JCheckBoxMenuItem hideCompleted=new JCheckBoxMenuItem(ACTION_CMD_HIDE_COMPLETED);
  hideCompleted.addItemListener(new ItemListener(){
    public void itemStateChanged(    ItemEvent e){
      if (hideCompleted.isSelected())       doHideCompleted();
 else       doShowCompleted();
    }
  }
);
  editMenu.add(hideCompleted);
  return menuBar;
}