Buggy code:
public class Supplier_Transactions extends Controller { private static final Form < Supplier_Transaction > transactionForm = Form . form ( Supplier_Transaction . class ) ; public static Result newTransaction ( Long id ) { } public static Result list ( ) { } public static Result details ( Long id ) { } public static Result save ( Long id ) { Form < Supplier_Transaction > filledForm = Supplier_Transactions . transactionForm . bindFromRequest ( ) ; if ( filledForm . hasErrors ( ) ) { flash ( "error" , "Please<seq2seq4repair_space>correct<seq2seq4repair_space>the<seq2seq4repair_space>form<seq2seq4repair_space>below." ) ; return badRequest ( update . render ( Supplier_Transactions . transactionForm , id ) ) ; } Supplier_Transaction transaction = filledForm . get ( ) ; List < Product > products = Product . findByEan ( filledForm . apply ( "product_ean" ) . value ( ) ) ; if ( products . isEmpty ( ) ) { flash ( "error" , "Product<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ; return badRequest ( update . render ( filledForm , id ) ) ; } if ( ( transaction . quantity ) == 0 ) { flash ( "error" , "Please<seq2seq4repair_space>input<seq2seq4repair_space>quantity." ) ; return badRequest ( update . render ( filledForm , id ) ) ; } if ( ( transaction . price ) == 0 ) { flash ( "error" , "Please<seq2seq4repair_space>input<seq2seq4repair_space>price." ) ; return badRequest ( update . render ( filledForm , id ) ) ; } if ( ( transaction . buyDate ) == null ) { flash ( "error" , "Please<seq2seq4repair_space>input<seq2seq4repair_space>date." ) ; return badRequest ( update . render ( filledForm , id ) ) ; } Product product = products . get ( 0 ) ; User_Action action = new User_Action ( ) ; if ( ( transaction . internalId ) == null ) { Supplier supplier = Supplier . findByID ( id ) ; transaction . supplier = supplier ; product . setInstock ( ( ( product . instock ) + ( transaction . quantity ) ) ) ; transaction . product = product ; product . update ( ) ; transaction . save ( ) ; String str = String . format ( "Transaction<seq2seq4repair_space>%s<seq2seq4repair_space>:<seq2seq4repair_space>Imported<seq2seq4repair_space>%s<seq2seq4repair_space>to<seq2seq4repair_space>product<seq2seq4repair_space>%s-%s<seq2seq4repair_space>from<seq2seq4repair_space>%s" , transaction . internalId , transaction . quantity , product . id , product . name , transaction . supplier . name ) ; action . verb = "Insert" ; action . description = str ; action . save ( ) ; } else { Supplier_Transaction oldTransaction = find . byId ( transaction . internalId ) ; Product oldProduct = oldTransaction . product ; String str = String . format ( "Transaction<seq2seq4repair_space>%s<seq2seq4repair_space>:<seq2seq4repair_space>Updated" , transaction . internalId ) ; if ( ( product . ean ) != ( oldProduct . ean ) ) { str = str . concat ( ( ( ( ( "<seq2seq4repair_space>product<seq2seq4repair_space>EAN<seq2seq4repair_space>from<seq2seq4repair_space>" + ( oldProduct . ean ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( product . ean ) ) + "," ) ) ; transaction . product = product ; } if ( ( transaction . quantity ) != ( oldTransaction . quantity ) ) <START_BUG> str = str . concat ( ( ( ( ( "<seq2seq4repair_space>import<seq2seq4repair_space>quantity<seq2seq4repair_space>from<seq2seq4repair_space>" + ( oldTransaction . quantity ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( transaction . quantity ) ) + "," ) ) ; <END_BUG> if ( ( transaction . price ) != ( oldTransaction . price ) ) str = str . concat ( ( ( ( ( "<seq2seq4repair_space>bought<seq2seq4repair_space>price<seq2seq4repair_space>from<seq2seq4repair_space>" + ( oldTransaction . price ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( transaction . price ) ) + "," ) ) ; if ( ( transaction . buyDate ) != ( oldTransaction . buyDate ) ) str = str . concat ( ( ( ( "<seq2seq4repair_space>bought<seq2seq4repair_space>date<seq2seq4repair_space>from<seq2seq4repair_space>" + ( oldTransaction . buyDate ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( transaction . buyDate ) ) ) ; str = str . concat ( ( ( ( ( ( "<seq2seq4repair_space>to<seq2seq4repair_space>product<seq2seq4repair_space>" + ( product . id ) ) + "-" ) + ( product . name ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + ( oldTransaction . supplier . name ) ) ) ; action . verb = "Update" ; action . description = str ; action . save ( ) ; oldProduct . setInstock ( ( ( oldProduct . instock ) - ( oldTransaction . quantity ) ) ) ; if ( ( product . ean ) != ( oldProduct . ean ) ) oldProduct . update ( ) ; product . setInstock ( ( ( product . instock ) + ( transaction . quantity ) ) ) ; product . update ( ) ; transaction . update ( ) ; } return redirect ( Suppliers . details ( id ) ) ; } public static Result delete ( Long id ) { } }

Fix:
str = str . concat ( ( ( ( ( "<seq2seq4repair_space>buying<seq2seq4repair_space>quantity<seq2seq4repair_space>from<seq2seq4repair_space>" + ( oldTransaction . quantity ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( transaction . quantity ) ) + "," ) ) ;