Buggy code:
public class PasswordResetGui implements EntryPoint { private PerunWebSession session = PerunWebSession . getInstance ( ) ; private PasswordResetLeftMenu leftMenu ; private ScrollPanel contentPanel = new ScrollPanel ( ) ; public void onModuleLoad ( ) { } private void loadModule ( ) { } private void loadPerunPrincipal ( ) { final PopupPanel loadingBox = session . getUiElements ( ) . perunLoadingBox ( ) ; loadingBox . show ( ) ; final JsonCallbackEvents events = new JsonCallbackEvents ( ) { @ Override public void onFinished ( JavaScriptObject jso ) { PerunPrincipal pp = ( ( PerunPrincipal ) ( jso ) ) ; session . setPerunPrincipal ( pp ) ; if ( ( ( ( session . getUser ( ) ) != null ) && ( ! ( pp . getRoles ( ) . hasAnyRole ( ) ) ) ) && ( ! ( session . getRpcUrl ( ) . equals ( INSTANCE . perunRpcUrl ( ) ) ) ) ) { RootLayoutPanel body = RootLayoutPanel . get ( ) ; loadingBox . hide ( ) ; body . clear ( ) ; body . add ( new NotUserOfPerunWidget ( ) ) ; return ; } if ( ( ( session . getUser ( ) ) != null ) && ( ! ( pp . getRoles ( ) . hasAnyRole ( ) ) ) ) { session . setRoles ( pp . getRoles ( ) ) ; session . getUiElements ( ) . setLoggedUserInfo ( pp ) ; } GetGuiConfiguration getConf = new GetGuiConfiguration ( new JsonCallbackEvents ( ) { @ Override public void onFinished ( JavaScriptObject jso ) { session . setConfiguration ( ( ( BasicOverlayType ) ( jso . cast ( ) ) ) ) ; loadingBox . hide ( ) ; if ( session . getRpcUrl ( ) . equals ( INSTANCE . perunRpcUrl ( ) ) ) { FlexTable ft = new FlexTable ( ) ; ft . setSize ( "100%" , "500px" ) ; String key = Utils . getReCaptchaPublicKey ( ) ; if ( key == null ) { PerunError error = new JSONObject ( ) . getJavaScriptObject ( ) . cast ( ) ; error . setErrorId ( "0" ) ; error . setName ( "Missing<seq2seq4repair_space>public<seq2seq4repair_space>key" ) ; error . setErrorInfo ( "Public<seq2seq4repair_space>key<seq2seq4repair_space>for<seq2seq4repair_space>Re-Captcha<seq2seq4repair_space>service<seq2seq4repair_space>is<seq2seq4repair_space>missing.<seq2seq4repair_space>Please<seq2seq4repair_space>add<seq2seq4repair_space>public<seq2seq4repair_space>key<seq2seq4repair_space>to<seq2seq4repair_space>GUIs<seq2seq4repair_space>configuration<seq2seq4repair_space>file." ) ; error . setRequestURL ( "" ) ; <START_BUG> UiElements . generateError ( error , "Missing<seq2seq4repair_space>public<seq2seq4repair_space>key" , "Public<seq2seq4repair_space>key<seq2seq4repair_space>for<seq2seq4repair_space>Re-Captcha<seq2seq4repair_space>service<seq2seq4repair_space>is<seq2seq4repair_space>missing.<br<seq2seq4repair_space>//>Accessing<seq2seq4repair_space>application<seq2seq4repair_space>form<seq2seq4repair_space>without<seq2seq4repair_space>authorization<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>possible." ) ; <END_BUG> loadingBox . hide ( ) ; return ; } final RecaptchaWidget captcha = new RecaptchaWidget ( key , LocaleInfo . getCurrentLocale ( ) . getLocaleName ( ) , "clean" ) ; final CustomButton cb = new CustomButton ( ) ; cb . setIcon ( SmallIcons . INSTANCE . arrowRightIcon ( ) ) ; cb . setText ( ApplicationMessages . INSTANCE . captchaSendButton ( ) ) ; cb . setImageAlign ( true ) ; final TextBox response = new TextBox ( ) ; captcha . setOwnTextBox ( response ) ; Scheduler . get ( ) . scheduleDeferred ( new Command ( ) { @ Override public void execute ( ) { response . setFocus ( true ) ; } } ) ; response . addKeyDownHandler ( new KeyDownHandler ( ) { @ Override public void onKeyDown ( KeyDownEvent event ) { if ( ( event . getNativeKeyCode ( ) ) == ( KeyCodes . KEY_ENTER ) ) { cb . click ( ) ; } } } ) ; cb . addClickHandler ( new ClickHandler ( ) { @ Override public void onClick ( ClickEvent clickEvent ) { VerifyCaptcha req = new VerifyCaptcha ( captcha . getChallenge ( ) , captcha . getResponse ( ) , JsonCallbackEvents . disableButtonEvents ( cb , new JsonCallbackEvents ( ) { public void onFinished ( JavaScriptObject jso ) { BasicOverlayType bt = jso . cast ( ) ; if ( bt . getBoolean ( ) ) { contentPanel . setWidget ( new PasswordResetFormPage ( ) . getContent ( ) ) ; } else { UiElements . generateAlert ( ApplicationMessages . INSTANCE . captchaErrorHeader ( ) , ApplicationMessages . INSTANCE . captchaErrorMessage ( ) ) ; } } } ) ) ; req . retrieveData ( ) ; } } ) ; int row = 0 ; ft . getFlexCellFormatter ( ) . setAlignment ( row , 0 , ALIGN_CENTER , ALIGN_MIDDLE ) ; ft . setHTML ( row , 0 , "<h2>In<seq2seq4repair_space>order<seq2seq4repair_space>to<seq2seq4repair_space>continue<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>password<seq2seq4repair_space>reset<seq2seq4repair_space>page,<seq2seq4repair_space>please,<seq2seq4repair_space>retype<seq2seq4repair_space>words<seq2seq4repair_space>below.<//h2>" ) ; ft . setWidget ( ( row + 1 ) , 0 , captcha ) ; ft . getFlexCellFormatter ( ) . setHorizontalAlignment ( ( row + 1 ) , 0 , ALIGN_CENTER ) ; ft . getFlexCellFormatter ( ) . setVerticalAlignment ( ( row + 1 ) , 0 , ALIGN_BOTTOM ) ; FlexTable sendFt = new FlexTable ( ) ; sendFt . setStyleName ( "inputFormFlexTable" ) ; sendFt . setWidget ( 0 , 0 , response ) ; sendFt . setWidget ( 0 , 1 , cb ) ; ft . setWidget ( ( row + 2 ) , 0 , sendFt ) ; ft . getFlexCellFormatter ( ) . setHorizontalAlignment ( ( row + 2 ) , 0 , ALIGN_CENTER ) ; ft . getFlexCellFormatter ( ) . setVerticalAlignment ( ( row + 2 ) , 0 , ALIGN_TOP ) ; ft . setHeight ( "100%" ) ; ft . getFlexCellFormatter ( ) . setHeight ( row , 0 , "50%" ) ; ft . getFlexCellFormatter ( ) . setHeight ( ( row + 2 ) , 0 , "50%" ) ; loadingBox . hide ( ) ; contentPanel . setWidget ( ft ) ; } else { contentPanel . setWidget ( new PasswordResetFormPage ( ) . getContent ( ) ) ; } } @ Override public void onError ( PerunError error ) { loadingBox . hide ( ) ; PopupPanel loadingFailedBox ; if ( error == null ) { loadingFailedBox = session . getUiElements ( ) . perunLoadingFailedBox ( "Request<seq2seq4repair_space>timeout<seq2seq4repair_space>exceeded." ) ; }

Fix:
UiElements . generateError ( error , "Missing<seq2seq4repair_space>public<seq2seq4repair_space>key" , "Public<seq2seq4repair_space>key<seq2seq4repair_space>for<seq2seq4repair_space>Re-Captcha<seq2seq4repair_space>service<seq2seq4repair_space>is<seq2seq4repair_space>missing.<br<seq2seq4repair_space>//>Accessing<seq2seq4repair_space>password<seq2seq4repair_space>reset<seq2seq4repair_space>without<seq2seq4repair_space>authorization<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>possible." ) ;