Buggy code:
public class LoadCommandServlet extends HttpServlet { private static final Logger LOG = Logger . getLogger ( LoadCommandServlet . class . getName ( ) ) ; private HashMap < String , LoadCommandAction > commandMap ; private Class loadCommandClass ; private String loadCommandClassName ; @ Override public void doPost ( HttpServletRequest req , HttpServletResponse res ) throws IOException , ServletException { String loadKey = req . getParameter ( "__hxLoadKey" ) ; LoadCommandAction lca ; if ( loadKey != null ) { lca = commandMap . get ( loadKey ) ; if ( lca == null ) { lca = this . resolveLoadCommand ( loadKey , req . getParameter ( "__hxLoadMethod" ) , req . getParameter ( "__hxGetMethod" ) ) ; } String err = null ; try { Object thisObj = lca . getCTOR ( ) . newInstance ( req ) ; lca . doLoad ( thisObj , req ) ; String jsonToReturn = lca . getAndSerialize ( thisObj ) ; res . setContentType ( "application//json" ) ; res . setCharacterEncoding ( "UTF-8" ) ; res . getWriter ( ) . write ( jsonToReturn ) ; res . flushBuffer ( ) ; } catch ( IOException ioe ) { Logger . getLogger ( LoadCommandListener . class . getName ( ) ) . log ( Level . SEVERE , null , ioe ) ; err = "Error<seq2seq4repair_space>when<seq2seq4repair_space>writing<seq2seq4repair_space>to<seq2seq4repair_space>servlet<seq2seq4repair_space>response:<seq2seq4repair_space>" + ( ioe . getMessage ( ) ) ; } catch ( InstantiationException ie ) { LoadCommandServlet . LOG . log ( Level . SEVERE , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>instantiate<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>class." , ie ) ; err = "Error<seq2seq4repair_space>instantiating<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( ie . getMessage ( ) ) ; } catch ( IllegalAccessException ile ) { LoadCommandServlet . LOG . log ( Level . SEVERE , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>instantiate<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>class." , ile ) ; err = "Error<seq2seq4repair_space>instantiating<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( ile . getMessage ( ) ) ; } catch ( InvocationTargetException ite ) { LoadCommandServlet . LOG . log ( Level . SEVERE , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>instantiate<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>class." , ite ) ; err = "Error<seq2seq4repair_space>instantiating<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>class:<seq2seq4repair_space>" + ( ite . getMessage ( ) ) ; } catch ( Exception ex ) { LoadCommandServlet . LOG . log ( Level . SEVERE , "Failed<seq2seq4repair_space>to<seq2seq4repair_space>run<seq2seq4repair_space>load<seq2seq4repair_space>command<seq2seq4repair_space>with<seq2seq4repair_space>unexpected<seq2seq4repair_space>exception" , ex ) ; <START_BUG> err = "Unexpected<seq2seq4repair_space>server<seq2seq4repair_space>error.<seq2seq4repair_space>Please<seq2seq4repair_space>contact<seq2seq4repair_space>your<seq2seq4repair_space>administrator." ; <END_BUG> } if ( err != null ) { try { res . getWriter ( ) . write ( ( ( "{<seq2seq4repair_space>\"error\"<seq2seq4repair_space>:<seq2seq4repair_space>\"" + err ) + "\"<seq2seq4repair_space>}" ) ) ; res . flushBuffer ( ) ; } catch ( IOException ex ) { Logger . getLogger ( LoadCommandListener . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } } else { } } private LoadCommandAction resolveLoadCommand ( String loadKey , String loadMethodName , String getMethodName ) throws IOException { } @ Override public void init ( ) throws ServletException { } @ Override public void destroy ( ) { } }

Fix:
err = ( ( ex . getMessage ( ) ) != null ) ? ex . getMessage ( ) : "Unexpected<seq2seq4repair_space>error.<seq2seq4repair_space>Please<seq2seq4repair_space>contact<seq2seq4repair_space>your<seq2seq4repair_space>administrator." ;