Buggy code:
class ChainsawToolBarAndMenus implements ChangeListener , SettingsListener { private static final String SETTING_RESPONSIVENESS = "Responsiveness" ; private static final String SETTING_TAB_PLACEMENT = "tab.placement" ; private final SmallToggleButton showReceiversButton ; final JTextField findTextField ; private final Action clearAction ; private final Action closeAction ; private final Action findNextAction ; private final Action lockToolbarAction ; private final Action pauseAction ; private final Action showPreferencesAction ; private final Action showReceiversAction ; private final Action toggleLogTreeAction ; private final Action toggleDetailPaneAction ; private final Action toggleToolbarAction ; private final Action undockAction ; private final Collection lookAndFeelMenus = new ArrayList ( ) ; private final JCheckBoxMenuItem toggleShowReceiversCheck = new JCheckBoxMenuItem ( ) ; private final FileMenu fileMenu ; private final JCheckBoxMenuItem toggleStatusBarCheck = new JCheckBoxMenuItem ( ) ; private final JMenu viewMenu = new JMenu ( "View" ) ; private final JMenuBar menuBar ; private final JRadioButtonMenuItem levelDisplayIcon = new JRadioButtonMenuItem ( "Icon" ) ; private final JRadioButtonMenuItem levelDisplayText = new JRadioButtonMenuItem ( "Text" ) ; private final JRadioButtonMenuItem tabsBottom = new JRadioButtonMenuItem ( "Bottom" ) ; private final JRadioButtonMenuItem tabsTop = new JRadioButtonMenuItem ( "Top" ) ; private final JSlider responsiveSlider ; private final JToolBar toolbar ; private LogUI logui ; private final SmallButton clearButton = new SmallButton ( ) ; private final SmallToggleButton detailPaneButton = new SmallToggleButton ( ) ; private final SmallToggleButton logTreePaneButton = new SmallToggleButton ( ) ; private final SmallToggleButton pauseButton = new SmallToggleButton ( ) ; private String lastFind = "" ; private String levelDisplay = ChainsawConstants . LEVEL_DISPLAY_ICONS ; private final Action [ ] logPanelSpecificActions ; private final ChangeListener panelListener ; private Map panelMenuMap = new HashMap ( ) ; private Map panelEnabledMap = new HashMap ( ) ; private JMenuItem showTabs ; ChainsawToolBarAndMenus ( final LogUI logui ) { } private Action createToggleLogTreeAction ( ) { } public void loadSettings ( LoadSettingsEvent event ) { } public void saveSettings ( SaveSettingsEvent event ) { } public void stateChange ( ) { } public void stateChanged ( ChangeEvent e ) { } JMenuBar getMenubar ( ) { } JToolBar getToolbar ( ) { } JToolBar createDockwindowToolbar ( final JFrame dockablePanel , final LogUI . LogPanel logPanel ) { } private Action createClearAction ( ) { final Action action = new AbstractAction ( "Clear" ) { public void actionPerformed ( ActionEvent e ) { LogUI . LogPanel logPanel = logui . getCurrentLogPanel ( ) ; if ( logPanel == null ) { return ; } logPanel . clearModel ( ) ; } } ; <START_BUG> action . putValue ( Action . MNEMONIC_KEY , new Integer ( KeyEvent . VK_P ) ) ; <END_BUG> action . putValue ( Action . ACCELERATOR_KEY , KeyStroke . getKeyStroke ( KeyEvent . VK_BACK_SPACE , InputEvent . CTRL_MASK ) ) ; action . putValue ( Action . SHORT_DESCRIPTION , "Removes<seq2seq4repair_space>all<seq2seq4repair_space>the<seq2seq4repair_space>events<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>current<seq2seq4repair_space>view" ) ; action . putValue ( Action . SMALL_ICON , new ImageIcon ( ChainsawIcons . DELETE ) ) ; return action ; } private Action createCloseHelpAction ( ) { } private void createFindDocListener ( final JTextField field ) { } private JTextField createFindField ( ) { } private Action createLockableToolbarAction ( ) { } private void createMenuBar ( ) { } private Action createPauseAction ( ) { } private JComponent createResponsivenessSlider ( ) { } private Action createShowPreferencesAction ( ) { } private Action createShowReceiversAction ( ) { } private Action createToggleDetailPaneAction ( ) { } private Action createToggleToolbarAction ( ) { } private void createToolbar ( ) { } private Action createUndockAction ( ) { } private void find ( boolean next ) { } private void localFind ( boolean next , final LogUI . LogPanel logPanel , final JTextField theFindTextField ) { } private void scanState ( ) { } ChangeListener getPanelListener ( ) { } private JCheckBoxMenuItem getDisplayPanelMenuItem ( final String panelName ) { } private Action setupFindFieldsAndActions ( ) { } }

Fix:
action . putValue ( Action . MNEMONIC_KEY , new Integer ( KeyEvent . VK_C ) ) ;