Buggy code:
class GeotaggingAction extends AbstractAction implements LayerAction { static final boolean debug = false ; static final String KEEP_BACKUP = "plugins.photo_geotagging.keep_backup" ; static final String CHANGE_MTIME = "plugins.photo_geotagging.change-mtime" ; static final String MTIME_MODE = "plugins.photo_geotagging.mtime-mode" ; static final int MTIME_MODE_GPS = 1 ; static final int MTIME_MODE_PREVIOUS_VALUE = 2 ; public GeotaggingAction ( ) { } public void actionPerformed ( ActionEvent arg0 ) { } static class GeoTaggingRunnable extends PleaseWaitRunnable { private final List < ImageEntry > images ; private final boolean keep_backup ; private final int mTimeMode ; private boolean canceled = false ; private Boolean override_backup = null ; private File fileFrom ; private File fileTo ; private File fileDelete ; public GeoTaggingRunnable ( List < ImageEntry > images , boolean keep_backup , int mTimeMode ) { } @ Override protected void realRun ( ) { } private void chooseFiles ( File file ) throws IOException { } private void chooseFilesNoBackup ( File file ) throws IOException { } private void confirm_override ( ) { if ( ( override_backup ) != null ) return ; try { SwingUtilities . invokeAndWait ( new Runnable ( ) { public void run ( ) { JLabel l = new JLabel ( tr ( "<html><h3>There<seq2seq4repair_space>are<seq2seq4repair_space>old<seq2seq4repair_space>backup<seq2seq4repair_space>files<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>image<seq2seq4repair_space>directory!<//h3>" ) ) ; l . setIcon ( UIManager . getIcon ( "OptionPane.warningIcon" ) ) ; <START_BUG> int override = new org . openstreetmap . josm . gui . ExtendedDialog ( ( ( org . openstreetmap . josm . gui . progress . PleaseWaitProgressMonitor ) ( progressMonitor ) ) . getDialog ( ) , tr ( "Override<seq2seq4repair_space>old<seq2seq4repair_space>backup<seq2seq4repair_space>files?" ) , new String [ ] { tr ( "Cancel" ) , tr ( "Keep<seq2seq4repair_space>old<seq2seq4repair_space>backups<seq2seq4repair_space>and<seq2seq4repair_space>continue" ) , tr ( "Override" ) } ) . setButtonIcons ( new String [ ] { "cancel.png" , "ok.png" , "dialogs//delete.png" } ) . setContent ( l ) . setCancelButton ( 1 ) . setDefaultButton ( 2 ) . showDialog ( ) . getValue ( ) ; <END_BUG> if ( override == 2 ) { override_backup = false ; } else if ( override == 3 ) { override_backup = true ; } else { canceled = true ; } } } ) ; } catch ( Exception e ) { System . err . println ( e ) ; canceled = true ; } } private void cleanupFiles ( ) throws IOException { } boolean testMTimeReadAndWriteDone = false ; private void testMTimeReadAndWrite ( File file ) throws IOException { } @ Override protected void finish ( ) { } @ Override protected void cancel ( ) { } } private GeoImageLayer getLayer ( ) { } private boolean enabled ( GeoImageLayer layer ) { } public Component createMenuComponent ( ) { } public boolean supportLayers ( List < Layer > layers ) { } }

Fix:
int override = new org . openstreetmap . josm . gui . ExtendedDialog ( org . openstreetmap . josm . Main . parent , tr ( "Override<seq2seq4repair_space>old<seq2seq4repair_space>backup<seq2seq4repair_space>files?" ) , new String [ ] { tr ( "Cancel" ) , tr ( "Keep<seq2seq4repair_space>old<seq2seq4repair_space>backups<seq2seq4repair_space>and<seq2seq4repair_space>continue" ) , tr ( "Override" ) } ) . setButtonIcons ( new String [ ] { "cancel.png" , "ok.png" , "dialogs//delete.png" } ) . setContent ( l ) . setCancelButton ( 1 ) . setDefaultButton ( 2 ) . showDialog ( ) . getValue ( ) ;