Buggy code:
public class SendBitcoinPanel extends AbstractTradePanel implements Viewable , AssetFormDataProvider { static final Logger log = LoggerFactory . getLogger ( SendBitcoinPanel . class ) ; private static final long serialVersionUID = - 2065108865497111662L ; private static SendBitcoinConfirmAction sendBitcoinConfirmAction ; private static boolean enableSendButton = false ; private static MultiBitButton sendButton ; private MultiBitButton pasteAddressButton ; private static SendBitcoinPanel thisPanel ; private static String regularTooltipText = "" ; private static String pleaseWaitTooltipText = "" ; private String sendAssetAmountText ; private static SendAssetConfirmAction sendAssetConfirmAction ; private JComboBox < WalletAssetComboBoxItem > assetComboBox ; private JPanel bitcoinAmountPanel ; private CSSendAssetPanel assetAmountPanel ; private MultiBitLabel notificationLabel2 ; private int yGridAssetAmountPanel ; private int yGridMessagePanel ; private CSMessageSendPanel messageSendPanel ; private MultiBitLabel messageLabel ; private MultiBitLabel paymentRefTextLabel ; public SendBitcoinPanel ( BitcoinController bitcoinController , MultiBitFrame mainFrame ) { } public static void setEnableSendButton ( boolean enableSendButton ) { } private static void enableSendButtonOnSwingThread ( ) { } @ Override protected boolean isReceiveBitcoin ( ) { } @ Override public boolean isTradingAsset ( ) { } @ Override public String getMessage ( ) { } @ Override public int getAssetId ( ) { } @ Override public String getAssetAmount ( ) { } @ Override public String getAssetAmountText ( ) { } @ Override public void setAssetAmount ( String s ) { } @ Override public String getAssetReference ( ) { } @ Override public boolean selectAssetByReference ( String assetRef ) { } public boolean isSenderPays ( ) { } @ Override public Action getCreateNewAddressAction ( ) { } @ Override protected Action getDeleteAddressAction ( ) { } @ Override public void checkDeleteSendingEnabled ( ) { } @ Override public String getAddressConstant ( ) { } @ Override public String getLabelConstant ( ) { } @ Override public String getAmountConstant ( ) { } @ Override protected void populateLocalisationMap ( ) { } @ Override protected JPanel createFormPanel ( JPanel formPanel , GridBagConstraints constraints ) { } public void removeAmountPanel ( JPanel formPanel , JPanel panel ) { } public void setAmountPanel ( JPanel formPanel , JPanel panel ) { } @ Override public String getAddress ( ) { } public String getSparkAddress ( ) { } @ Override public void loadForm ( ) { } public void setAddressBookDataByRow ( WalletAddressBookData addressBookData ) { } @ Override public void displayView ( DisplayHint displayHint ) { } @ Override public Icon getViewIcon ( ) { } @ Override public String getViewTitle ( ) { } @ Override public String getViewTooltip ( ) { } @ Override public View getViewId ( ) { } public SendBitcoinConfirmAction getSendBitcoinConfirmAction ( ) { } protected class MessageKeyListener implements KeyListener { @ Override public void keyTyped ( KeyEvent e ) { } @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent e ) { } } class AssetAmountKeyListener implements KeyListener { @ Override public void keyTyped ( KeyEvent e ) { } @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent e ) { } } void displaySenderRecipientCharges ( ) { } void displayAssetChargesText ( ) { } public void validateAddressUpdatePanel ( ) { boolean showingAssets = isTradingAsset ( ) ; boolean showingBTC = ! showingAssets ; ComboBoxModel < WalletAssetComboBoxItem > model = assetComboBox . getModel ( ) ; boolean assetsAvailable = ( model . getSize ( ) ) > 1 ; boolean validCoinsparkAddress = false ; boolean validBitcoinAddress = false ; boolean cannotSendAssetsToValidCoinsparkAddress = false ; boolean canSendMessage = false ; boolean showPaymentRef = false ; String address = addressTextField . getText ( ) ; if ( address . startsWith ( "s" ) ) { CoinSparkAddress csa = CSMiscUtils . decodeCoinSparkAddress ( address ) ; if ( csa != null ) { String btcAddress = csa . getBitcoinAddress ( ) ; validCoinsparkAddress = CSMiscUtils . validateBitcoinAddress ( btcAddress , bitcoinController ) ; if ( ( CSMiscUtils . canSendAssetsToCoinSparkAddress ( csa ) ) == false ) { cannotSendAssetsToValidCoinsparkAddress = true ; } } int flags = csa . getAddressFlags ( ) ; canSendMessage = ( flags & ( CoinSparkAddress . COINSPARK_ADDRESS_FLAG_TEXT_MESSAGES ) ) > 0 ; <START_BUG> if ( ( flags & ( CoinSparkAddress . COINSPARK_ADDRESS_FLAG_PAYMENT_REFS ) ) > 0 ) { <END_BUG> CoinSparkPaymentRef paymentRef = csa . getPaymentRef ( ) ; long ref = paymentRef . getRef ( ) ; if ( ref > 0 ) { showPaymentRef = true ; paymentRefTextLabel . setText ( ( "This<seq2seq4repair_space>address<seq2seq4repair_space>has<seq2seq4repair_space>a<seq2seq4repair_space>payment<seq2seq4repair_space>reference:<seq2seq4repair_space>" + ref ) ) ; } } } else { validBitcoinAddress = CSMiscUtils . validateBitcoinAddress ( address , bitcoinController ) ; } String message = null ; if ( ( ! validBitcoinAddress ) && ( ! validCoinsparkAddress ) ) { if ( ( address != null ) && ( ( address . length ( ) ) > 0 ) ) { message = "Please<seq2seq4repair_space>enter<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>Bitcoin<seq2seq4repair_space>or<seq2seq4repair_space>Coinspark<seq2seq4repair_space>address" ; } assetComboBox . setEnabled ( false ) ; } else if ( validBitcoinAddress ) { assetComboBox . setEnabled ( true ) ; if ( assetsAvailable ) message = "To<seq2seq4repair_space>send<seq2seq4repair_space>assets<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>recipient,<seq2seq4repair_space>ask<seq2seq4repair_space>them<seq2seq4repair_space>for<seq2seq4repair_space>their<seq2seq4repair_space>Coinspark<seq2seq4repair_space>address" ; if ( showingAssets ) { assetComboBox . getModel ( ) . setSelectedItem ( assetComboBox . getModel ( ) . getElementAt ( 0 ) ) ; } ( ( org . multibit . model . bitcoin . WalletAssetComboBoxModel ) ( assetComboBox . getModel ( ) ) ) . disableAssets ( ) ; } else if ( validCoinsparkAddress && cannotSendAssetsToValidCoinsparkAddress ) { assetComboBox . setEnabled ( false ) ; message = "The<seq2seq4repair_space>Coinspark<seq2seq4repair_space>address<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>support<seq2seq4repair_space>sending<seq2seq4repair_space>assets" ; } else if ( validCoinsparkAddress ) { assetComboBox . setEnabled ( true ) ; ( ( org . multibit . model . bitcoin . WalletAssetComboBoxModel ) ( assetComboBox . getModel ( ) ) ) . enableAssets ( ) ; } notificationLabel2 . setText ( message ) ; messageSendPanel . setVisible ( canSendMessage ) ; messageLabel . setVisible ( canSendMessage ) ; paymentRefTextLabel . setVisible ( showPaymentRef ) ; } @ Subscribe public void listen ( CSEvent event ) throws Exception { } }

Fix:
if ( validCoinsparkAddress && ( ( flags & ( CoinSparkAddress . COINSPARK_ADDRESS_FLAG_PAYMENT_REFS ) ) > 0 ) ) {