Buggy code:
public void setAppFrame ( JFrame f ) { } public void createFrame ( ) { } public void disposeFrame ( ) { } public void setMainComponent ( JComponent c ) { } public JComponent getMainComponent ( ) { } public WorkspaceModel getWorkspaceModel ( ) { } public void setMenu ( ImageView mainImageView ) { MenuBarFileActionPerformed mbFileAction = new MenuBarFileActionPerformed ( this ) ; JMenu fileMenu = new JMenu ( "File" ) ; JMenu newMenu = new JMenu ( "New<seq2seq4repair_space>Study" ) ; JMenuItem newFromSingle = new JMenuItem ( "From<seq2seq4repair_space>Single<seq2seq4repair_space>DICOM" ) ; newFromSingle . setActionCommand ( "From<seq2seq4repair_space>Single<seq2seq4repair_space>DICOM" ) ; newFromSingle . addActionListener ( mbFileAction ) ; newMenu . add ( newFromSingle ) ; JMenuItem newFromFileStruct = new JMenuItem ( "From<seq2seq4repair_space>File<seq2seq4repair_space>Structure" ) ; newFromFileStruct . setActionCommand ( "From<seq2seq4repair_space>File<seq2seq4repair_space>Structure" ) ; newFromFileStruct . addActionListener ( mbFileAction ) ; newMenu . add ( newFromFileStruct ) ; fileMenu . add ( newMenu ) ; JMenuItem openExisting = new JMenuItem ( "Open<seq2seq4repair_space>Existing<seq2seq4repair_space>(Ctrl+O)" ) ; openExisting . setActionCommand ( "Open<seq2seq4repair_space>Existing" ) ; openExisting . addActionListener ( mbFileAction ) ; fileMenu . add ( openExisting ) ; JMenuItem saveStudy = new JMenuItem ( "Save<seq2seq4repair_space>(Ctrl+S)" ) ; saveStudy . setActionCommand ( "Save<seq2seq4repair_space>Study" ) ; saveStudy . addActionListener ( mbFileAction ) ; fileMenu . add ( saveStudy ) ; JMenuItem saveAsStudy = new JMenuItem ( "Save<seq2seq4repair_space>as<seq2seq4repair_space>(Ctrl+Shift+S)" ) ; saveAsStudy . setActionCommand ( "Save<seq2seq4repair_space>As<seq2seq4repair_space>Study" ) ; saveAsStudy . addActionListener ( mbFileAction ) ; fileMenu . add ( saveAsStudy ) ; JMenu add = new JMenu ( "Add" ) ; ContourTypeActionPerformed contourTypeAction = new ContourTypeActionPerformed ( this ) ; JMenu addContour = new JMenu ( "Add<seq2seq4repair_space>Contour" ) ; JMenu leftVentricle = new JMenu ( "LV" ) ; JMenu leftAtrium = new JMenu ( "LA" ) ; JMenu rightVentricle = new JMenu ( "RV" ) ; JMenu rightAtrium = new JMenu ( "RA" ) ; for ( Contour . Type t : Type . values ( ) ) { String group = t . getGroup ( ) ; if ( group . equals ( "LV" ) ) { leftVentricle . add ( addMenuItem ( t . getName ( ) , t . getAbbv ( ) , contourTypeAction ) ) ; } else if ( group . equals ( "LA" ) ) { leftAtrium . add ( addMenuItem ( t . getName ( ) , t . getAbbv ( ) , contourTypeAction ) ) ; } else if ( group . equals ( "RV" ) ) { rightVentricle . add ( addMenuItem ( t . getName ( ) , t . getAbbv ( ) , contourTypeAction ) ) ; } else { rightAtrium . add ( addMenuItem ( t . getName ( ) , t . getAbbv ( ) , contourTypeAction ) ) ; } } JMenu landmarks = new JMenu ( "Add<seq2seq4repair_space>Landmark" ) ; for ( Landmark . LandmarkType t : LandmarkType . values ( ) ) { JMenuItem tmp = new JMenuItem ( t . abbv ( ) ) ; tmp . setActionCommand ( t . abbv ( ) ) ; tmp . addActionListener ( mainImageView ) ; tmp . setToolTipText ( t . toString ( ) ) ; landmarks . add ( tmp ) ; } add . add ( addContour ) ; add . add ( landmarks ) ; addContour . add ( leftVentricle ) ; addContour . add ( leftAtrium ) ; addContour . add ( rightVentricle ) ; addContour . add ( rightAtrium ) ; MenuBarContourActionPerformed menuBarContour = new MenuBarContourActionPerformed ( this ) ; JMenu contours = new JMenu ( "Contours" ) ; contours . add ( addMenuItem ( "Save<seq2seq4repair_space>Contours<seq2seq4repair_space>(.txt<seq2seq4repair_space>File)" , "Save<seq2seq4repair_space>Contours" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Load<seq2seq4repair_space>Contours" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Select<seq2seq4repair_space>Contour" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Delete<seq2seq4repair_space>Contour<seq2seq4repair_space>Axis" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Delete<seq2seq4repair_space>Contour" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Delete<seq2seq4repair_space>All<seq2seq4repair_space>Contours" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Hide<seq2seq4repair_space>Contour" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Show<seq2seq4repair_space>Contours" , menuBarContour ) ) ; contours . add ( addMenuItem ( "Hide<seq2seq4repair_space>Contours" , menuBarContour ) ) ; JMenu rotate = new JMenu ( "Rotate" ) ; JMenuItem rotateImage = new JMenuItem ( "Rotate<seq2seq4repair_space>Image" ) ; rotateImage . setActionCommand ( "Rotate<seq2seq4repair_space>Image" ) ; <START_BUG> rotateImage . addActionListener ( this ) ; <END_BUG> rotate . add ( rotateImage ) ; JMenuBar menuBar = new JMenuBar ( ) ; menuBar . add ( fileMenu ) ; menuBar . add ( add ) ; menuBar . add ( contours ) ; menuBar . add ( rotate ) ; appFrame . setJMenuBar ( menuBar ) ; appFrame . revalidate ( ) ; appFrame . repaint ( ) ; } private JMenuItem addMenuItem ( String str , ActionListener actionListener ) { } private JMenuItem addMenuItem ( String str , String actionCommand , ActionListener actionListener ) { } private void closeWindow ( ) { } private void saveAsStudy ( Study study ) { } public void saveContour ( ) { } public void setUpLoad ( ) throws IOException { } private void addKeyBindings ( GridView gridView ) { } public void loadExistingStudy ( ) { } public void saveStudy ( ) { } public void saveAsStudy ( ) { } private class CtrlSAction extends AbstractAction { private static final long serialVersionUID = 8688937617331716060L ; public void actionPerformed ( ActionEvent e ) { } } private class CtrlShiftSAction extends AbstractAction { private static final long serialVersionUID = - 2543127413774012188L ; public void actionPerformed ( ActionEvent e ) { } } private class CtrlOAction extends AbstractAction { private static final long serialVersionUID = 764073195702399357L ; public void actionPerformed ( ActionEvent e ) { } } private class CtrlWAction extends AbstractAction { private static final long serialVersionUID = 8234348834457453793L ; public void actionPerformed ( ActionEvent e ) { } } public void setMainImageView ( ImageView imageViewIN ) { } public ImageView getMainImageView ( ) { } }

Fix:
rotateImage . addActionListener ( mbFileAction ) ;