Buggy code:
BigDecimal [ ] value = checkInvoiceDetailFromBilldescId ( billableDescId ) ; BigDecimal costTemp = value [ 0 ] ; BigDecimal amountTemp = value [ 1 ] ; amount = amountinvoice . subtract ( amountTemp ) ; cost = costinvoice . subtract ( costTemp ) ; System . out . println ( ( ( ( ( ( "<seq2seq4repair_space>amount<seq2seq4repair_space>=<seq2seq4repair_space>" + amountinvoice ) + "-" ) + amountTemp ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + amount ) ) ; System . out . println ( ( ( ( ( ( "<seq2seq4repair_space>cost<seq2seq4repair_space>=<seq2seq4repair_space>" + costinvoice ) + "-" ) + costTemp ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + cost ) ) ; refItemId = billableDescs . get ( i ) . getRefItemId ( ) ; String displaydescription = "" ; String displaydesTemp = "" ; String displaydescriptionother = "" ; description = ( ( ( refNo + "<seq2seq4repair_space>" ) + leader ) + "<seq2seq4repair_space>" ) + billTypeName ; if ( "1" . equals ( product ) ) { displaydescription = billTypeName ; } else if ( ( "2" . equals ( product ) ) || ( "8" . equals ( product ) ) ) { if ( ! ( "" . equals ( refItemId ) ) ) { displaydescription += billTypeName + "<seq2seq4repair_space>#--<seq2seq4repair_space>" ; displaydescriptionother += billTypeName + "<seq2seq4repair_space>#--<seq2seq4repair_space>" ; displaydesTemp = billableDao . getDescriptionInvoiceOthersFromRefId ( refItemId ) ; if ( ( displaydesTemp != null ) && ( ! ( "" . equalsIgnoreCase ( displaydesTemp ) ) ) ) { String [ ] parts = displaydesTemp . split ( "\\|" ) ; displaydescription += ( ( parts [ 4 ] ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( parts [ 5 ] ) ; displaydescriptionother += ( ( ( ( parts [ 9 ] ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( parts [ 4 ] ) ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( parts [ 5 ] ) ; } } } else if ( "3" . equals ( product ) ) { displaydescription = billTypeName ; } else if ( "4" . equals ( product ) ) { displaydescription = billTypeName ; } else if ( "6" . equals ( product ) ) { if ( ! ( "" . equals ( refItemId ) ) ) { displaydescription += billTypeName + "<seq2seq4repair_space>" ; displaydesTemp = billableDao . getDescriptionInvoiceDayTourFromRefId ( refItemId ) ; if ( ( displaydesTemp != null ) && ( ! ( "" . equalsIgnoreCase ( displaydesTemp ) ) ) ) { String [ ] parts = displaydesTemp . split ( "\\|" ) ; displaydescription += ( ( parts [ 4 ] ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( parts [ 6 ] ) ; } } else { displaydescription = billTypeName ; } } else { displaydescription = billTypeName ; } System . out . println ( ( "displaydescription" + displaydescription ) ) ; if ( ( amount . compareTo ( BigDecimal . ZERO ) ) != 0 ) { String newrow = "" ; newrow += ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<tr>" + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='masterBookType'<seq2seq4repair_space>id='masterBookType'<seq2seq4repair_space>value='" ) + ( billable . getMaster ( ) . getBookingType ( ) ) ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='receiveFromBillable'<seq2seq4repair_space>id='receiveFromBillable'<seq2seq4repair_space>value='" ) + receiveFrom ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='receiveNameBillable'<seq2seq4repair_space>id='receiveNameBillable'<seq2seq4repair_space>value='" ) + receiveName ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='receiveAddressBillable'<seq2seq4repair_space>id='receiveAddressBillable'<seq2seq4repair_space>value='" ) + receiveAddress ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='arcodeBillable'<seq2seq4repair_space>id='arcodeBillable'<seq2seq4repair_space>value='" ) + arcode ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='mAccPayBillable'<seq2seq4repair_space>id='mAccPayBillable'<seq2seq4repair_space>value='" ) + mAccPay ) + "'>" ) + "<td<seq2seq4repair_space>class='text-center'>" ) + No ) + "<//td>" ; if ( ( "2" . equals ( product ) ) || ( "8" . equals ( product ) ) ) { newrow += ( "<td>" + displaydescriptionother ) + "<//td>" ; } else { newrow += ( "<td>" + displaydescription ) + "<//td>" ; } <START_BUG> newrow += ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<td<seq2seq4repair_space>class='money'>" + amount ) + "<//td>" ) + "<td>" ) + currency ) + "<//td>" ) + "<td><center><a<seq2seq4repair_space>href=\"#//ref\"><span<seq2seq4repair_space>onclick=\"addProduct(\'" ) + product ) + "','" ) + description ) + "','" ) + cost ) + "','" ) + cur ) + "','','','" ) + amount ) + "','" ) + "THB" ) + "','','" ) + billableDescId ) + "','','','2','" ) + displaydescription ) + "','" ) + refNo ) + "\',\'\',\'\',\'\',\'\',\'\',\'\')\"<seq2seq4repair_space>class=\"glyphicon<seq2seq4repair_space>glyphicon-plus\"><//span><//a><//center><//td>" ) + "<//tr>" ; <END_BUG> html . append ( newrow ) ; No ++ ; } else { String newrow = "" ; newrow += ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='masterBookType'<seq2seq4repair_space>id='masterBookType'<seq2seq4repair_space>value='" + ( billable . getMaster ( ) . getBookingType ( ) ) ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='receiveFromBillable'<seq2seq4repair_space>id='receiveFromBillable'<seq2seq4repair_space>value='" ) + receiveFrom ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='receiveNameBillable'<seq2seq4repair_space>id='receiveNameBillable'<seq2seq4repair_space>value='" ) + receiveName ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='receiveAddressBillable'<seq2seq4repair_space>id='receiveAddressBillable'<seq2seq4repair_space>value='" ) + receiveAddress ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='arcodeBillable'<seq2seq4repair_space>id='arcodeBillable'<seq2seq4repair_space>value='" ) + arcode ) + "'>" ) + "<input<seq2seq4repair_space>type='hidden'<seq2seq4repair_space>name='mAccPayBillable'<seq2seq4repair_space>id='mAccPayBillable'<seq2seq4repair_space>value='" ) + mAccPay ) + "'>" ) + "" ; html . append ( newrow ) ; } } return html . toString ( ) ; } public String buildPassengerListHTML ( List < Customer > passList ) { } public JSONArray buildAirportListJSON ( List < MAirport > listAirport ) { } public JSONArray buildPassengerListJSON ( List < Customer > listCutomer ) { } public JSONArray buildBillListJSON ( List < CustomerAgentInfo > listCutomerInfo ) { } public JSONArray buildTourListJSON ( List < Daytour > listDaytour ) { } public JSONArray buildCustomerListJSON ( List < Customer > listCutomer ) { } public String buildAirportListHTMLDeparture ( List < MAirport > listAirport ) { } public String buildAirportListHTMLArrive ( List < MAirport > listAirport ) { } public String buildTourReferenceListHTML ( List < DaytourBooking > ListBook ) { } public String buildTourListHTML ( List < DaytourBooking > ListBook ) { } public String buildTourPlaceListHTML ( List < Place > ListPlace ) { } public String buildJobDetailHTML ( List < DaytourBooking > bookingList ) { }

Fix:
newrow += ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "<td<seq2seq4repair_space>class='money'>" + amount ) + "<//td>" ) + "<td>" ) + currency ) + "<//td>" ) + "<td><center><a<seq2seq4repair_space>href=\"#//ref\"><span<seq2seq4repair_space>onclick=\"addProduct(\'" ) + product ) + "','" ) + description ) + "','" ) + cost ) + "','" ) + cur ) + "','','','" ) + amount ) + "','" ) + currency ) + "','','" ) + billableDescId ) + "','','','2','" ) + displaydescription ) + "','" ) + refNo ) + "\',\'\',\'\',\'\',\'\',\'\',\'\')\"<seq2seq4repair_space>class=\"glyphicon<seq2seq4repair_space>glyphicon-plus\"><//span><//a><//center><//td>" ) + "<//tr>" ;