Buggy code:
Wallet w = this . bitcoinController . getModel ( ) . getActiveWallet ( ) ; CSMessage message = w . CS . getMessageDB ( ) . getMessage ( txid ) ; if ( message != null ) { int state = message . getMessageState ( ) ; if ( state == ( CSMessageState . PAYMENTREF_ONLY ) ) { } else if ( ( state == ( CSMessageState . SELF ) ) || ( state == ( CSMessageState . VALID ) ) ) { List < CSMessagePart > parts = message . getMessagePartsSortedByPartID ( ) ; int n = parts . size ( ) ; ImageIcon attachIcon = ImageLoader . fatCow16 ( attach ) ; if ( n == 1 ) { icon = attachIcon ; tip = "1<seq2seq4repair_space>attachment" ; } else if ( n > 1 ) { String counterName = null ; if ( n > 20 ) { counterName = "notification_counter_20_plus" ; } else { counterName = String . format ( "notification_counter_%02d" , n ) ; } ImageIcon counterIcon = ImageLoader . fugue ( counterName ) ; CompoundIcon badgeIcon = new CompoundIcon ( Axis . X_AXIS , ( - 10 ) , CompoundIcon . RIGHT , CompoundIcon . BOTTOM , attachIcon , counterIcon ) ; icon = badgeIcon ; tip = n + "<seq2seq4repair_space>attachments" ; } } else { icon = ImageLoader . fatCow16 ( server_error ) ; tip = "Problem!" ; } } } map . put ( "tooltip" , tip ) ; map . put ( "icon" , icon ) ; return map ; } case "walletTransactionTableColumn.message" : { HashMap < String , Object > map = new HashMap < > ( ) ; ImageIcon icon = null ; String tip = null ; if ( ( walletDataRow . getTransaction ( ) ) != null ) { String txid = walletDataRow . getTransaction ( ) . getHashAsString ( ) ; Wallet w = this . bitcoinController . getModel ( ) . getActiveWallet ( ) ; CSMessage message = w . CS . getMessageDB ( ) . getMessage ( txid ) ; if ( ( txid != null ) && ( message != null ) ) { int state = message . getMessageState ( ) ; if ( state == ( CSMessageState . PAYMENTREF_ONLY ) ) { } else if ( ( state == ( CSMessageState . SELF ) ) || ( state == ( CSMessageState . VALID ) ) ) { String shortMessage = CSMiscUtils . getShortTextMessage ( w , txid ) ; if ( ( shortMessage != null ) && ( ! ( shortMessage . isEmpty ( ) ) ) ) { icon = ImageLoader . fatCow16 ( email ) ; final int limit = 140 * 2 ; tip = shortMessage ; if ( ( shortMessage . length ( ) ) > limit ) { tip = shortMessage . substring ( 0 , limit ) ; } tip = tip . replace ( "\n\n" , "<p>" ) . replace ( "\n" , "<br>" ) ; tip = ( "<html><div<seq2seq4repair_space>style=\"width:<seq2seq4repair_space>300px\">" + tip ) + "<//div><//html>" ; } } else if ( message . getIsRetrieving ( ) ) { tip = "Retrieving<seq2seq4repair_space>message..." ; icon = ImageLoader . fugue ( download_cloud ) ; } else { switch ( state ) { case CSMessageState . NEVERCHECKED : tip = "Message<seq2seq4repair_space>is<seq2seq4repair_space>pending<seq2seq4repair_space>retrieval" ; icon = ImageLoader . fatCow16 ( hourglass ) ; break ; case CSMessageState . NOT_FOUND : tip = "Not<seq2seq4repair_space>found" ; icon = ImageLoader . fatCow16 ( find ) ; break ; case CSMessageState . PENDING : tip = "Pending" ; icon = ImageLoader . fugue ( balloon_ellipsis ) ; break ; case CSMessageState . EXPIRED : tip = "Expired,<seq2seq4repair_space>cannot<seq2seq4repair_space>retrieve<seq2seq4repair_space>message" ; icon = ImageLoader . fugue ( clock__exclamation ) ; break ; case CSMessageState . INVALID : tip = "Message<seq2seq4repair_space>was<seq2seq4repair_space>invalid" ; icon = ImageLoader . fatCow16 ( exclamation ) ; break ; case CSMessageState . HASH_MISMATCH : tip = "Error,<seq2seq4repair_space>message<seq2seq4repair_space>could<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>authenticated,<seq2seq4repair_space>may<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>tampered<seq2seq4repair_space>with." ; icon = ImageLoader . fugue ( traffic_cone__exclamation ) ; break ; case CSMessageState . SERVER_NOT_RESPONDING : tip = "Server<seq2seq4repair_space>not<seq2seq4repair_space>responding" ; icon = ImageLoader . fatCow16 ( server_connect ) ; break ; case CSMessageState . SERVER_ERROR : tip = "Server<seq2seq4repair_space>returned<seq2seq4repair_space>an<seq2seq4repair_space>error" ; icon = ImageLoader . fatCow16 ( server_error ) ; break ; case CSMessageState . ENCRYPTED_KEY : <START_BUG> if ( message . hasAesKey ( ) ) { <END_BUG> tip = "Message<seq2seq4repair_space>is<seq2seq4repair_space>pending<seq2seq4repair_space>retrieval" ; icon = ImageLoader . fatCow16 ( hourglass ) ; } else { tip = "Unlock<seq2seq4repair_space>wallet<seq2seq4repair_space>to<seq2seq4repair_space>retrieve<seq2seq4repair_space>message" ; icon = ImageLoader . fatCow16 ( lock ) ; } break ; case CSMessageState . REFRESH : tip = "Waiting<seq2seq4repair_space>to<seq2seq4repair_space>refresh" ; icon = ImageLoader . fatCow16 ( arrow_refresh ) ; break ; case CSMessageState . DELETED : tip = "Error,<seq2seq4repair_space>message<seq2seq4repair_space>was<seq2seq4repair_space>deleted" ; icon = ImageLoader . fatCow16 ( delete ) ; break ; default : break ; } } } } map . put ( "tooltip" , tip ) ; map . put ( "icon" , icon ) ; return map ; } case "walletTransactionTableColumn.extras" : { HashMap < String , Object > map = new HashMap < > ( ) ; ImageIcon icon = null ; String tip = null ; if ( ( walletDataRow . getTransaction ( ) ) != null ) { String txid = walletDataRow . getTransaction ( ) . getHashAsString ( ) ; Wallet w = this . bitcoinController . getModel ( ) . getActiveWallet ( ) ; long l = CSMiscUtils . getPaymentRefFromTx ( w , txid ) ; if ( l > 0 ) { icon = ImageLoader . fugue ( tag_hash ) ; tip = "Transaction<seq2seq4repair_space>payment<seq2seq4repair_space>reference:<seq2seq4repair_space>" + l ; } } map . put ( "tooltip" , tip ) ; map . put ( "icon" , icon ) ; return map ; } case "walletTransactionTableColumn.status" : { if ( ( ( walletDataRow . getTransaction ( ) ) != null ) && ( ( walletDataRow . getTransaction ( ) . getConfidence ( ) ) != null ) ) { return walletDataRow . getTransaction ( ) ; }

Fix:
if ( message . hasAesKey ( txid ) ) {