Buggy code:
public class AddressProvider implements IAddressProvider { private static AddressProvider addressProvider = new AddressProvider ( ApplicationInstanceManager . addressDBHelper ) ; private static final String insertHDSeedSql = "insert<seq2seq4repair_space>into<seq2seq4repair_space>hd_seeds<seq2seq4repair_space>" + ( "(encrypt_seed,encrypt_hd_seed,is_xrandom,hdm_address)" + "<seq2seq4repair_space>values<seq2seq4repair_space>(?,?,?,?)<seq2seq4repair_space>" ) ; private static final String insertAddressSql = "insert<seq2seq4repair_space>into<seq2seq4repair_space>addresses<seq2seq4repair_space>" + ( "(address,encrypt_private_key,pub_key,is_xrandom,is_trash,is_synced,sort_time)" + "<seq2seq4repair_space>values<seq2seq4repair_space>(?,?,?,?,?,?,?)<seq2seq4repair_space>" ) ; private static final String insertHDMBidSql = "insert<seq2seq4repair_space>into<seq2seq4repair_space>hdm_bid<seq2seq4repair_space>" + ( "(hdm_bid,encrypt_bither_password)" + "<seq2seq4repair_space>values<seq2seq4repair_space>(?,?)<seq2seq4repair_space>" ) ; private static final String updateHDMBidSql = "update<seq2seq4repair_space>hdm_bid<seq2seq4repair_space>set<seq2seq4repair_space>" + "<seq2seq4repair_space>encrypt_bither_password=?<seq2seq4repair_space>where<seq2seq4repair_space>hdm_bid=?" ; public static AddressProvider getInstance ( ) { } private AddressDBHelper mDb ; private AddressProvider ( AddressDBHelper db ) { } @ Override public boolean changePassword ( CharSequence oldPassword , CharSequence newPassword ) { } @ Override public PasswordSeed getPasswordSeed ( ) { } @ Override public boolean hasPasswordSeed ( ) { } private boolean hasPasswordSeed ( Connection conn ) throws SQLException { } @ Override public List < Integer > getHDSeeds ( ) { } @ Override public String getEncryptMnemonicSeed ( int hdSeedId ) { } @ Override public String getEncryptHDSeed ( int hdSeedId ) { } @ Override public void updateEncrypttMnmonicSeed ( int hdSeedId , String encryptMnmonicSeed ) { } @ Override public boolean isHDSeedFromXRandom ( int hdSeedId ) { } @ Override public String getHDMFristAddress ( int hdSeedId ) { } @ Override public int addHDKey ( final String encryptedMnemonicSeed , final String encryptHdSeed , final String firstAddress , final boolean isXrandom , final String addressOfPS ) { } @ Override public HDMBId getHDMBId ( ) { } @ Override public void addAndUpdateHDMBId ( final HDMBId bitherId , final String addressOfPS ) { } @ Override public List < HDMAddress > getHDMAddressInUse ( HDMKeychain keychain ) { } @ Override public void prepareHDMAddresses ( final int hdSeedId , final List < HDMAddress . Pubs > pubsList ) { } @ Override public List < HDMAddress . Pubs > getUncompletedHDMAddressPubs ( int hdSeedId , int count ) { } @ Override public int maxHDMAddressPubIndex ( int hdSeedId ) { } @ Override public int uncompletedHDMAddressCount ( int hdSeedId ) { } @ Override public void completeHDMAddresses ( final int hdSeedId , final List < HDMAddress > addresses ) { } public void setHDMPubsRemote ( final int hdSeedId , final int index , final byte [ ] remote ) { } private static final String insertHDMAddressSql = "insert<seq2seq4repair_space>into<seq2seq4repair_space>hdm_addresses<seq2seq4repair_space>" + ( "(hd_seed_id,hd_seed_index,pub_key_hot,pub_key_cold,pub_key_remote,address,is_synced)" + "<seq2seq4repair_space>values<seq2seq4repair_space>(?,?,?,?,?,?,?)<seq2seq4repair_space>" ) ; @ Override public void recoverHDMAddresses ( final int hdSeedId , final List < HDMAddress > addresses ) { } @ Override public void syncComplete ( int hdSeedId , int hdSeedIndex ) { } @ Override public List < Address > getAddresses ( ) { } @ Override public String getEncryptPrivateKey ( String address ) { } @ Override public void addAddress ( final Address address ) { try { this . mDb . getConn ( ) . setAutoCommit ( false ) ; <START_BUG> String [ ] params = new String [ ] { address . getAddress ( ) , address . hasPrivKey ( ) ? address . getEncryptPrivKeyOfDb ( ) : null , Base58 . encode ( address . getPubKey ( ) ) , Integer . toString ( ( address . isFromXRandom ( ) ? 1 : 0 ) ) , Integer . toString ( ( address . isSyncComplete ( ) ? 1 : 0 ) ) , Integer . toString ( ( address . isTrashed ( ) ? 1 : 0 ) ) , Long . toString ( address . getSortTime ( ) ) } ; <END_BUG> PreparedStatement stmt = this . mDb . getConn ( ) . prepareStatement ( AddressProvider . insertAddressSql ) ; if ( params != null ) { for ( int i = 0 ; i < ( params . length ) ; i ++ ) { stmt . setString ( ( i + 1 ) , params [ i ] ) ; } } stmt . executeUpdate ( ) ; if ( address . hasPrivKey ( ) ) { if ( ! ( hasPasswordSeed ( this . mDb . getConn ( ) ) ) ) { PasswordSeed passwordSeed = new PasswordSeed ( address . getAddress ( ) , address . getFullEncryptPrivKeyOfDb ( ) ) ; addPasswordSeed ( this . mDb . getConn ( ) , passwordSeed ) ; } } this . mDb . getConn ( ) . commit ( ) ; stmt . close ( ) ; } catch ( SQLException e ) { e . printStackTrace ( ) ; } } @ Override public void updatePrivateKey ( String address , String encryptPriv ) { } @ Override public void removeWatchOnlyAddress ( Address address ) { } @ Override public void trashPrivKeyAddress ( Address address ) { } @ Override public void restorePrivKeyAddress ( Address address ) { } @ Override public void updateSyncComplete ( Address address ) { } @ Override public String getAlias ( String address ) { } @ Override public Map < String , String > getAliases ( ) { } @ Override public void updateAlias ( String address , @ Nullable String alias ) { } @ Override public int getVanityLen ( String address ) { } @ Override public Map < String , Integer > getVanitylens ( ) { } @ Override public void updateVaitylen ( String address , int vanitylen ) { } @ Override public void setSingularModeBackup ( int hdSeedId , String singularModeBackup ) { } @ Override public String getSingularModeBackup ( int hdSeedId ) { } @ Override public int addHDAccount ( String encryptedMnemonicSeed , String encryptSeed , String firstAddress , boolean isXrandom , String addressOfPS , byte [ ] externalPub , byte [ ] internalPub ) { } @ Override public String getHDFristAddress ( int hdSeedId ) { } @ Override public byte [ ] getExternalPub ( int hdSeedId ) { } @ Override public byte [ ] getInternalPub ( int hdSeedId ) { } @ Override public String getHDAccountEncryptSeed ( int hdSeedId ) { } @ Override public String getHDAccountEncryptMnmonicSeed ( int hdSeedId ) { }

Fix:
String [ ] params = new String [ ] { address . getAddress ( ) , address . hasPrivKey ( ) ? address . getEncryptPrivKeyOfDb ( ) : null , Base58 . encode ( address . getPubKey ( ) ) , Integer . toString ( ( address . isFromXRandom ( ) ? 1 : 0 ) ) , Integer . toString ( ( address . isTrashed ( ) ? 1 : 0 ) ) , Integer . toString ( ( address . isSyncComplete ( ) ? 1 : 0 ) ) , Long . toString ( address . getSortTime ( ) ) } ;