Buggy code:
private static final String descriptionFormatDefault = "@note<seq2seq4repair_space>-<seq2seq4repair_space>@action<seq2seq4repair_space>from<seq2seq4repair_space>@actor<seq2seq4repair_space>to<seq2seq4repair_space>@target" ; private static final String venmoTokenTooltip = "To<seq2seq4repair_space>find<seq2seq4repair_space>your<seq2seq4repair_space>access<seq2seq4repair_space>token,<seq2seq4repair_space>log<seq2seq4repair_space>in<seq2seq4repair_space>to<seq2seq4repair_space>venmo<seq2seq4repair_space>and<seq2seq4repair_space>navigate<seq2seq4repair_space>to<seq2seq4repair_space>'Account'<seq2seq4repair_space>and<seq2seq4repair_space>then<seq2seq4repair_space>'developers'" ; public VenmoImporterWindow ( Main extension ) { } public void downloadVenmoTransactions ( ) { String venmoPositivecharge = "pay" ; String venmoUserId ; AccountBook book = extension . getUnprotectedContext ( ) . getCurrentAccountBook ( ) ; Account targetAcc = book . getAccountByUUID ( targetAcctId ) ; if ( targetAcc == null ) { JOptionPane . showMessageDialog ( this , "\n<seq2seq4repair_space>There<seq2seq4repair_space>was<seq2seq4repair_space>a<seq2seq4repair_space>problem<seq2seq4repair_space>with<seq2seq4repair_space>your<seq2seq4repair_space>account<seq2seq4repair_space>selection." ) ; return ; } OnlineTxnList txnlist = targetAcc . getDownloadedTxns ( ) ; URL VenmoURL ; try { VenmoURL = new URL ( ( "https:////api.venmo.com//v1//me?access_token=" + ( venmoToken ) ) ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( VenmoURL . openStream ( ) ) ) ; JSONObject tId ; tId = new JSONObject ( in . readLine ( ) ) ; if ( tId . has ( "error" ) ) { throw new Exception ( ( ( ( "The<seq2seq4repair_space>request<seq2seq4repair_space>to<seq2seq4repair_space>Venmo<seq2seq4repair_space>had<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>error:\n\n" + ( tId . getJSONObject ( "error" ) . getInt ( "code" ) ) ) + "<seq2seq4repair_space>" ) + ( tId . getJSONObject ( "error" ) . getString ( "message" ) ) ) ) ; } venmoUserId = tId . getJSONObject ( "data" ) . getJSONObject ( "user" ) . getString ( "id" ) ; in . close ( ) ; VenmoURL = new URL ( ( ( ( "https:////api.venmo.com//v1//payments?limit=" + ( VenmoImporterWindow . venmoDownloadTrabsactionLimit ) ) + "&access_token=" ) + ( venmoToken ) ) ) ; in = new BufferedReader ( new InputStreamReader ( VenmoURL . openStream ( ) ) ) ; JSONObject tr ; tr = new JSONObject ( in . readLine ( ) ) ; if ( tr . has ( "error" ) ) { throw new Exception ( ( ( ( "The<seq2seq4repair_space>request<seq2seq4repair_space>to<seq2seq4repair_space>Venmo<seq2seq4repair_space>had<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>error:\n\n" + ( tr . getJSONObject ( "error" ) . getInt ( "code" ) ) ) + "<seq2seq4repair_space>" ) + ( tr . getJSONObject ( "error" ) . getString ( "message" ) ) ) ) ; } double amount = 0 ; String comment ; String remotetxnId ; SimpleDateFormat sdf = new SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss" ) ; SimpleDateFormat output = new SimpleDateFormat ( "yyyyMMdd" ) ; int date ; OnlineTxn otrans ; for ( int i = 0 ; i < ( tr . getJSONArray ( "data" ) . length ( ) ) ; i ++ ) { JSONObject t = tr . getJSONArray ( "data" ) . getJSONObject ( i ) ; if ( ! ( t . getString ( "status" ) . equals ( "settled" ) ) ) continue ; if ( t . getJSONObject ( "actor" ) . getString ( "id" ) . equals ( venmoUserId ) ) { if ( t . getString ( "action" ) . equals ( venmoPositivecharge ) ) { amount = - ( t . getDouble ( "amount" ) ) ; } else { amount = + ( t . getDouble ( "amount" ) ) ; } } else if ( ( t . getJSONObject ( "target" ) . getString ( "type" ) . equals ( "user" ) ) && ( t . getJSONObject ( "target" ) . getJSONObject ( "user" ) . getString ( "id" ) . equals ( venmoUserId ) ) ) { if ( t . getString ( "action" ) . equals ( venmoPositivecharge ) ) { amount = + ( t . getDouble ( "amount" ) ) ; } else { amount = - ( t . getDouble ( "amount" ) ) ; } } String [ ] descriptionValues = new String [ ] { Double . toString ( t . getDouble ( "amount" ) ) , t . getString ( "action" ) , t . getJSONObject ( "actor" ) . getString ( "display_name" ) , t . getJSONObject ( "actor" ) . getString ( "username" ) , t . getJSONObject ( "target" ) . getJSONObject ( "user" ) . getString ( "display_name" ) , t . getJSONObject ( "target" ) . getJSONObject ( "user" ) . getString ( "username" ) , t . getString ( "note" ) , t . getString ( "date_created" ) , t . getString ( "date_completed" ) , t . getString ( "note" ) } ; comment = StringUtils . replaceEach ( descriptionFormat , VenmoImporterWindow . descriptionFields , descriptionValues ) ; date = Integer . parseInt ( output . format ( sdf . parse ( t . getString ( "date_completed" ) ) ) ) ; remotetxnId = t . getString ( "id" ) ; otrans = txnlist . newTxn ( ) ; <START_BUG> otrans . setAmount ( ( ( long ) ( amount * 100 ) ) ) ; <END_BUG> otrans . setMemo ( comment ) ; otrans . setDatePostedInt ( date ) ; otrans . setFITxnId ( remotetxnId ) ; txnlist . addNewTxn ( otrans ) ; } in . close ( ) ; } catch ( NumberFormatException | JSONException | ParseException e ) { JOptionPane . showMessageDialog ( this , e . toString ( ) ) ; e . printStackTrace ( ) ; } catch ( Exception e ) { JOptionPane . showMessageDialog ( this , ( ( e . toString ( ) ) + "\n\n<seq2seq4repair_space>See<seq2seq4repair_space>the<seq2seq4repair_space>moneydance<seq2seq4repair_space>console<seq2seq4repair_space>for<seq2seq4repair_space>additional<seq2seq4repair_space>details<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>error." ) ) ; e . printStackTrace ( ) ; } targetAcc . downloadedTxnsUpdated ( ) ; com . moneydance . apps . md . controller . Main mainApp = ( ( com . moneydance . apps . md . controller . Main ) ( extension . getUnprotectedContext ( ) ) ) ; OnlineManager onlineMgr = new OnlineManager ( ( ( MoneydanceGUI ) ( mainApp . getUI ( ) ) ) ) ; onlineMgr . processDownloadedTxns ( targetAcc ) ; } private void loadSettings ( ) { } private void saveSettings ( ) { } public void actionPerformed ( ActionEvent evt ) { } private void deleteAllSettings ( ) { } public final void processEvent ( AWTEvent evt ) { } void goAway ( ) { } }

Fix:
otrans . setAmount ( ( ( long ) ( Math . round ( ( amount * 100 ) ) ) ) ) ;