Buggy code:
public class MainController extends AbstractController implements GenericAboutEventListener , GenericOpenURIEventListener , GenericPreferencesEventListener , GenericQuitEventListener { private static final Logger log = LoggerFactory . getLogger ( MainController . class ) ; private Optional < ExchangeTickerService > exchangeTickerService = Optional . absent ( ) ; private Optional < HardwareWalletService > hardwareWalletService = Optional . absent ( ) ; private final BitcoinURIListeningService bitcoinURIListeningService ; private final ListeningExecutorService handoverExecutorService = SafeExecutors . newSingleThreadExecutor ( "wizard-handover" ) ; private static final ListeningExecutorService transactionCheckingExecutorService = SafeExecutors . newFixedThreadPool ( 10 , "transaction-checking" ) ; private static final ListeningExecutorService walletExecutorService = SafeExecutors . newFixedThreadPool ( 10 , "wallet-services" ) ; private static final int NUMBER_OF_SECONDS_TO_WAIT_BEFORE_TRANSACTION_CHECKING = 10 ; private final HeaderController headerController ; private MainView mainView ; private RAGStatus lastExchangeSeverity = RAGStatus . GREEN ; private CredentialsRequestType deferredCredentialsRequestType = CredentialsRequestType . PASSWORD ; private static final int TREZOR_WIPE_TIME_THRESHOLD = 4 ; private DateTime lastWipedTrezorDateTime = Dates . nowUtc ( ) . minusDays ( 1 ) ; public MainController ( BitcoinURIListeningService bitcoinURIListeningService , HeaderController headerController ) { } @ Override public void unsubscribe ( ) { } @ Subscribe public void onShutdownEvent ( ShutdownEvent shutdownEvent ) { } @ Subscribe public void onWizardHideEvent ( WizardHideEvent event ) { } @ Subscribe public void onSwitchWalletEvent ( SwitchWalletEvent event ) { } @ Subscribe public synchronized void onConfigurationChangedEvent ( ConfigurationChangedEvent event ) { } @ Subscribe public void onBitcoinNetworkChangeEvent ( BitcoinNetworkChangedEvent event ) { } @ Subscribe public void onExchangeStatusChangeEvent ( ExchangeStatusChangedEvent event ) { } @ Subscribe public void onSecurityEvent ( SecurityEvent event ) { } @ Subscribe public void onComponentChangedEvent ( ComponentChangedEvent event ) { } public void setMainView ( MainView mainView ) { } private void handleSwitchWallet ( ) { } private void shutdownCurrentWallet ( ShutdownEvent . ShutdownType shutdownType ) { } private void shutdownMainView ( ) { } private void handleFullMainViewRefresh ( ) { } private void handleBasicMainViewRefresh ( ) { } @ Override public void onAboutEvent ( GenericAboutEvent event ) { } @ Subscribe @ Override public void onOpenURIEvent ( GenericOpenURIEvent event ) { } @ Override public void onPreferencesEvent ( GenericPreferencesEvent event ) { } @ Override public void onQuitEvent ( GenericQuitEvent event , GenericQuitResponse response ) { } @ Subscribe public void onTransactionCreationEvent ( TransactionCreationEvent transactionCreationEvent ) { } @ Subscribe public void onHardwareWalletEvent ( final HardwareWalletEvent event ) { } private AbstractAction getShowRepairWalletAction ( ) { } private AbstractAction getShowHelpAction ( ) { } private void handleExchange ( ) { } private void handleTheme ( ) { } private void handleLocale ( ) { } private void handleBackupManager ( ) { } private void handleBitcoinURIAlert ( ) { } public void handleHardwareWallets ( ) { } private void handleSystemTimeDrift ( ) { } private void hideAsExitCancel ( String panelName ) { } private void hideEditWalletWizard ( String walletName ) { } private void handoverToCredentialsWizard ( ) { } private void handoverToWelcomeWizardRestore ( ) { } private void handoverToWelcomeWizardCreateTrezorWallet ( ) { } private void hideCredentialsWizard ( ) { MainController . log . debug ( "Wallet<seq2seq4repair_space>unlocked.<seq2seq4repair_space>Starting<seq2seq4repair_space>services..." ) ; mainView . setShowExitingWelcomeWizard ( false ) ; mainView . setShowExitingCredentialsWizard ( false ) ; Optional < HardwareWalletEvent > lastHardwareWalletEvent = CoreServices . getApplicationEventService ( ) . getLatestHardwareWalletEvent ( ) ; mainView . refresh ( ) ; if ( lastHardwareWalletEvent . isPresent ( ) ) { <START_BUG> HardwareWalletEvents . fireHardwareWalletEvent ( lastHardwareWalletEvent . get ( ) ) ; <END_BUG> } Uninterruptibles . sleepUninterruptibly ( 100 , TimeUnit . MILLISECONDS ) ; MainController . log . debug ( "Starting<seq2seq4repair_space>backup<seq2seq4repair_space>manager..." ) ; handleBackupManager ( ) ; Optional < WalletSummary > walletSummary = INSTANCE . getCurrentWalletSummary ( ) ; mainView . sidebarWalletName ( walletSummary . get ( ) . getName ( ) ) ; MainController . log . debug ( "Starting<seq2seq4repair_space>wallet<seq2seq4repair_space>service..." ) ; CoreServices . getOrCreateWalletService ( walletSummary . get ( ) . getWalletId ( ) ) ; CoreServices . logHistory ( Languages . safeText ( HISTORY_WALLET_OPENED , walletSummary . get ( ) . getName ( ) ) ) ; Screen screen = Screen . valueOf ( currentConfiguration . getAppearance ( ) . getCurrentScreen ( ) ) ; ViewEvents . fireShowDetailScreenEvent ( screen ) ; MainController . walletExecutorService . submit ( new Runnable ( ) { @ Override public void run ( ) { try { MainController . log . debug ( "Starting<seq2seq4repair_space>exchange..." ) ; handleExchange ( ) ; MainController . log . debug ( "Check<seq2seq4repair_space>for<seq2seq4repair_space>system<seq2seq4repair_space>time<seq2seq4repair_space>drift..." ) ; handleSystemTimeDrift ( ) ; MainController . log . debug ( "Check<seq2seq4repair_space>for<seq2seq4repair_space>Bitcoin<seq2seq4repair_space>URIs..." ) ; handleBitcoinURIAlert ( ) ; } catch ( Exception e ) { MainController . log . error ( "Services<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>start<seq2seq4repair_space>ok.<seq2seq4repair_space>Error<seq2seq4repair_space>was<seq2seq4repair_space>{}" , ( ( ( e . getClass ( ) . getCanonicalName ( ) ) + "<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) , e ) ; } } } ) ; } private void initiateDelayedTransactionStatusCheck ( final TransactionCreationEvent transactionCreationEvent ) { } public CredentialsRequestType getDeferredCredentialsRequestType ( ) { } }

Fix:
HardwareWalletEvents . fireHardwareWalletEvent ( lastHardwareWalletEvent . get ( ) . getEventType ( ) ) ;