Buggy code:
public class XFormsErrorServlet extends HttpServlet { private static final Log LOGGER = LogFactory . getLog ( XFormsErrorServlet . class ) ; private static final String HTMLHEAD = "" + ( ( ( ( ( ( ( ( "<html>" + "<head>" ) + "<title>Error<seq2seq4repair_space>Page<//title>" ) + "<link<seq2seq4repair_space>rel=\"stylesheet\"<seq2seq4repair_space>type=\"text//css\"<seq2seq4repair_space>href=\"..//..//bfResources//styles//error.css\"//>" ) + "<//head>" ) + "<body>" ) + "<div<seq2seq4repair_space>class=\"errorContent\">" ) + "<img<seq2seq4repair_space>src=\"..//..//bfResources//images//error.png\"<seq2seq4repair_space>width=\"24\"<seq2seq4repair_space>height=\"24\"<seq2seq4repair_space>alt=\"Error\"<seq2seq4repair_space>style=\"float:left;padding-right:5px;\"//>" ) + "<div<seq2seq4repair_space>class=\"message1\">Oops,<seq2seq4repair_space>an<seq2seq4repair_space>error<seq2seq4repair_space>occured...<br//><//div>" ) ; private static final String HTMLFOOT = "" + ( ( "<//div>" + "<//body>" ) + "<//html>" ) ; private String getHTML ( HttpServletRequest request ) { StringBuffer html = new StringBuffer ( ) ; String msg = ( ( String ) ( request . getSession ( ) . getAttribute ( "betterform.exception.message" ) ) ) ; String xpath = "unknown" ; String cause = "<seq2seq4repair_space>" ; if ( msg != null ) { int start = msg . indexOf ( "::" ) ; if ( start > 3 ) { xpath = msg . substring ( ( start + 2 ) ) ; msg = msg . substring ( 0 , start ) ; } } Exception ex = ( ( Exception ) ( request . getSession ( ) . getAttribute ( "betterform.exception" ) ) ) ; if ( ( ( ex != null ) && ( ( ex . getCause ( ) ) != null ) ) && ( ( ex . getCause ( ) . getMessage ( ) ) != null ) ) { cause = ex . getCause ( ) . getMessage ( ) ; } request . getSession ( ) . removeAttribute ( "betterform.exception" ) ; request . getSession ( ) . removeAttribute ( "betterform.exception.message" ) ; <START_BUG> html . append ( "<div<seq2seq4repair_space>class=\"message2\">" ) ; <END_BUG> html . append ( msg ) ; html . append ( "<//div>" ) ; html . append ( "<div<seq2seq4repair_space>class=\"message3\"><strong>URL:<//strong><br//>" ) ; html . append ( request . getSession ( ) . getAttribute ( "betterform.referer" ) ) ; html . append ( "<//div>" ) ; html . append ( "<div<seq2seq4repair_space>class=\"message3\"><strong>Element<seq2seq4repair_space>causing<seq2seq4repair_space>Exception:<//strong><br//>" ) ; html . append ( xpath ) ; html . append ( "<//div>" ) ; html . append ( "<div<seq2seq4repair_space>class=\"message3\"><strong>Caused<seq2seq4repair_space>by:<//strong><br//>" ) ; html . append ( cause ) ; html . append ( "<//div>" ) ; html . append ( "<form><input<seq2seq4repair_space>type=\"button\"<seq2seq4repair_space>value=\"Back\"<seq2seq4repair_space>onClick=\"history.back()\"//><//form>" ) ; try { String mail = Config . getInstance ( ) . getProperty ( "admin.mail" ) ; StringBuffer mailbody = new StringBuffer ( ) ; html . append ( "<div<seq2seq4repair_space>class=\"message3\">" ) ; html . append ( "<a<seq2seq4repair_space>href=\"mailto:" ) ; html . append ( mail ) ; mailbody . append ( "?subject='XForms<seq2seq4repair_space>Problem<seq2seq4repair_space>at<seq2seq4repair_space>" ) ; mailbody . append ( request . getSession ( ) . getAttribute ( "betterform.referer" ) ) ; mailbody . append ( "'" ) ; mailbody . append ( "&Body=\'Message:\n" ) ; mailbody . append ( msg ) ; mailbody . append ( "\n\nElement<seq2seq4repair_space>causing<seq2seq4repair_space>Exception:\n" ) ; mailbody . append ( xpath ) ; mailbody . append ( "\n\nCaused<seq2seq4repair_space>by:\n" ) ; mailbody . append ( cause ) ; mailbody . append ( "'" ) ; html . append ( URLEncoder . encode ( mailbody . toString ( ) , "UTF-8" ) ) ; html . append ( "\">" ) ; html . append ( "Report<seq2seq4repair_space>this<seq2seq4repair_space>problem...<//a>" ) ; html . append ( "<//div>" ) ; } catch ( Exception e ) { XFormsErrorServlet . LOGGER . debug ( e ) ; } XFormsErrorServlet . LOGGER . error ( html . toString ( ) ) ; return html . toString ( ) ; } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
html . append ( "<div<seq2seq4repair_space>class=\"message2\"<seq2seq4repair_space>id=\"msg\">" ) ;