Buggy code:
expectFailNotAssignable ( parser , ctx , "(3<seq2seq4repair_space>between<seq2seq4repair_space>{1,5})++" ) ; expectFailNotAssignable ( parser , ctx , "--(3<seq2seq4repair_space>between<seq2seq4repair_space>{1,5})" ) ; expectFailSetValueNotSupported ( parser , ctx , "(3<seq2seq4repair_space>between<seq2seq4repair_space>{1,5})=(3<seq2seq4repair_space>between<seq2seq4repair_space>{1,5})" ) ; expectFailNotAssignable ( parser , ctx , "(type<seq2seq4repair_space>instanceof<seq2seq4repair_space>T(String))++" ) ; expectFailNotAssignable ( parser , ctx , "--(type<seq2seq4repair_space>instanceof<seq2seq4repair_space>T(String))" ) ; expectFailSetValueNotSupported ( parser , ctx , "(type<seq2seq4repair_space>instanceof<seq2seq4repair_space>T(String))=(type<seq2seq4repair_space>instanceof<seq2seq4repair_space>T(String))" ) ; expectFailNotAssignable ( parser , ctx , "(true?:false)++" ) ; expectFailNotAssignable ( parser , ctx , "--(true?:false)" ) ; expectFailSetValueNotSupported ( parser , ctx , "(true?:false)=(true?:false)" ) ; expectFailNotAssignable ( parser , ctx , "(iii++)++" ) ; expectFailNotAssignable ( parser , ctx , "--(++iii)" ) ; expectFailSetValueNotSupported ( parser , ctx , "(iii++)=(++iii)" ) ; expectFailNotAssignable ( parser , ctx , "(iii--)++" ) ; expectFailNotAssignable ( parser , ctx , "--(--iii)" ) ; expectFailSetValueNotSupported ( parser , ctx , "(iii--)=(--iii)" ) ; expectFailNotAssignable ( parser , ctx , "(!true)++" ) ; expectFailNotAssignable ( parser , ctx , "--(!false)" ) ; expectFailSetValueNotSupported ( parser , ctx , "(!true)=(!false)" ) ; expectFailNotAssignable ( parser , ctx , "(iii^2)++" ) ; expectFailNotAssignable ( parser , ctx , "--(iii^2)" ) ; expectFailSetValueNotSupported ( parser , ctx , "(iii^2)=(iii^3)" ) ; e = parser . parseExpression ( "iii=iii++" ) ; assertEquals ( 42 , helper . iii ) ; int return_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 42 , helper . iii ) ; assertEquals ( 42 , return_iii ) ; e = parser . parseExpression ( "iii++" ) ; assertEquals ( 42 , helper . iii ) ; return_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 42 , return_iii ) ; assertEquals ( 43 , helper . iii ) ; e = parser . parseExpression ( "--iii" ) ; assertEquals ( 43 , helper . iii ) ; return_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 42 , return_iii ) ; assertEquals ( 42 , helper . iii ) ; e = parser . parseExpression ( "iii=99" ) ; assertEquals ( 42 , helper . iii ) ; return_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 99 , return_iii ) ; assertEquals ( 99 , helper . iii ) ; e = parser . parseExpression ( "foo.iii++" ) ; assertEquals ( 99 , helper . foo . iii ) ; int return_foo_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 99 , return_foo_iii ) ; assertEquals ( 100 , helper . foo . iii ) ; e = parser . parseExpression ( "--foo.iii" ) ; assertEquals ( 100 , helper . foo . iii ) ; return_foo_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 99 , return_foo_iii ) ; assertEquals ( 99 , helper . foo . iii ) ; e = parser . parseExpression ( "foo.iii=999" ) ; assertEquals ( 99 , helper . foo . iii ) ; return_foo_iii = e . getValue ( ctx , Integer . TYPE ) ; assertEquals ( 999 , return_foo_iii ) ; assertEquals ( 999 , helper . foo . iii ) ; expectFailNotAssignable ( parser , ctx , "(new<seq2seq4repair_space>String('abc'))++" ) ; expectFailNotAssignable ( parser , ctx , "--(new<seq2seq4repair_space>String('abc'))" ) ; expectFailSetValueNotSupported ( parser , ctx , "(new<seq2seq4repair_space>String('abc'))=(new<seq2seq4repair_space>String('abc'))" ) ; expectFailNotIncrementable ( parser , ctx , "m()++" ) ; expectFailNotDecrementable ( parser , ctx , "--m()" ) ; expectFailSetValueNotSupported ( parser , ctx , "m()=m()" ) ; expectFailNotAssignable ( parser , ctx , "('abc'<seq2seq4repair_space>matches<seq2seq4repair_space>'^a..')++" ) ; expectFailNotAssignable ( parser , ctx , "--('abc'<seq2seq4repair_space>matches<seq2seq4repair_space>'^a..')" ) ; expectFailSetValueNotSupported ( parser , ctx , "('abc'<seq2seq4repair_space>matches<seq2seq4repair_space>'^a..')=('abc'<seq2seq4repair_space>matches<seq2seq4repair_space>'^a..')" ) ; ctx . registerFunction ( "isEven" , EvaluationTests . Spr9751 . class . getDeclaredMethod ( "isEven" , Integer . TYPE ) ) ; expectFailNotIncrementable ( parser , ctx , "({1,2,3}.?[#isEven(#this)])++" ) ; expectFailNotDecrementable ( parser , ctx , "--({1,2,3}.?[#isEven(#this)])" ) ; expectFailNotAssignable ( parser , ctx , "({1,2,3}.?[#isEven(#this)])=({1,2,3}.?[#isEven(#this)])" ) ; expectFailNotAssignable ( parser , ctx , "({1,2,3}.^[#isEven(#this)])++" ) ; expectFailNotAssignable ( parser , ctx , "--({1,2,3}.^[#isEven(#this)])" ) ; expectFailNotAssignable ( parser , ctx , "({1,2,3}.^[#isEven(#this)])=({1,2,3}.^[#isEven(#this)])" ) ; expectFailNotAssignable ( parser , ctx , "({1,2,3}.$[#isEven(#this)])++" ) ; expectFailNotAssignable ( parser , ctx , "--({1,2,3}.$[#isEven(#this)])" ) ; expectFailNotAssignable ( parser , ctx , "({1,2,3}.$[#isEven(#this)])=({1,2,3}.$[#isEven(#this)])" ) ; expectFailNotAssignable ( parser , ctx , "#isEven(3)++" ) ; expectFailNotAssignable ( parser , ctx , "--#isEven(4)" ) ; expectFailSetValueNotSupported ( parser , ctx , "#isEven(3)=#isEven(5)" ) ; ctx . setVariable ( "wibble" , "hello<seq2seq4repair_space>world" ) ; expectFailNotIncrementable ( parser , ctx , "#wibble++" ) ; expectFailNotDecrementable ( parser , ctx , "--#wibble" ) ; e = parser . parseExpression ( "#wibble=#wibble+#wibble" ) ; String s = e . getValue ( ctx , String . class ) ; assertEquals ( "hello<seq2seq4repair_space>worldhello<seq2seq4repair_space>world" , s ) ; <START_BUG> assertEquals ( "hello<seq2seq4repair_space>worldhello<seq2seq4repair_space>world" , ( ( String ) ( ctx . lookupVariable ( "wibble" ) ) ) ) ; <END_BUG>

Fix:
assertEquals ( "hello<seq2seq4repair_space>worldhello<seq2seq4repair_space>world" , ctx . lookupVariable ( "wibble" ) ) ;