Buggy code:
class DomainApiHandler implements ManagementHttpHandler { private static final String DOMAIN_API_CONTEXT = "//management" ; private static final String UPLOAD_REQUEST = ( DomainApiHandler . DOMAIN_API_CONTEXT ) + "//add-content" ; private static Pattern MULTIPART_FD_BOUNDARY = Pattern . compile ( "^multipart//form-data.*;\\s*boundary=(.*)$" ) ; private static Pattern DISPOSITION_FILE = Pattern . compile ( "^form-data.*filename=\"?([^\"]*)?\"?.*$" ) ; enum GetOperation { RESOURCE ( "read-resource" ) , ATTRIBUTE ( "read-attribute" ) , RESOURCE_DESCRIPTION ( "read-resource-description" ) , SNAPSHOTS ( "list-snapshots" ) , OPERATION_DESCRIPTION ( "read-operation-description" ) , OPERATION_NAMES ( "read-operation-names" ) ; private String realOperation ; GetOperation ( String realOperation ) { } public String realOperation ( ) { } } private final Authenticator authenticator ; private ModelControllerClient modelController ; DomainApiHandler ( ModelControllerClient modelController , Authenticator authenticator ) { } private void doHandle ( HttpExchange http ) throws IOException { } @ Override public void handle ( HttpExchange exchange ) throws IOException { } private void drain ( HttpExchange exchange ) throws IOException { } private String extractContentType ( final String fullContentType ) { } private void processUploadRequest ( final HttpExchange http ) throws IOException { } private void processRequest ( final HttpExchange http ) throws IOException { final URI request = http . getRequestURI ( ) ; final String requestMethod = http . getRequestMethod ( ) ; boolean isGet = Constants . GET . equals ( requestMethod ) ; if ( ( ! isGet ) && ( ! ( Constants . POST . equals ( requestMethod ) ) ) ) { http . sendResponseHeaders ( Constants . METHOD_NOT_ALLOWED , ( - 1 ) ) ; return ; } ModelNode dmr ; ModelNode response ; int status = Constants . OK ; Headers requestHeaders = http . getRequestHeaders ( ) ; boolean encode = ( Constants . APPLICATION_DMR_ENCODED . equals ( requestHeaders . getFirst ( Constants . ACCEPT ) ) ) || ( Constants . APPLICATION_DMR_ENCODED . equals ( requestHeaders . getFirst ( Constants . CONTENT_TYPE ) ) ) ; try { dmr = ( isGet ) ? convertGetRequest ( request ) : convertPostRequest ( http . getRequestBody ( ) , encode ) ; <START_BUG> } catch ( IllegalArgumentException iae ) { <END_BUG> HttpServerLogger . ROOT_LOGGER . debugf ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>construct<seq2seq4repair_space>ModelNode<seq2seq4repair_space>'%s'" , iae . getMessage ( ) ) ; sendError ( http , isGet , iae ) ; return ; } try { response = modelController . execute ( new org . jboss . as . controller . client . OperationBuilder ( dmr ) . build ( ) ) ; } catch ( Throwable t ) { HttpServerLogger . ROOT_LOGGER . modelRequestError ( t ) ; sendError ( http , isGet , t ) ; return ; } if ( ( response . hasDefined ( OUTCOME ) ) && ( FAILED . equals ( response . get ( OUTCOME ) . asString ( ) ) ) ) { status = Constants . INTERNAL_SERVER_ERROR ; } boolean pretty = ( dmr . hasDefined ( "json.pretty" ) ) && ( dmr . get ( "json.pretty" ) . asBoolean ( ) ) ; writeResponse ( http , isGet , pretty , response , status , encode ) ; } private void sendError ( final HttpExchange http , boolean isGet , Throwable t ) throws IOException { } private void sendResponse ( final HttpExchange exchange , final int responseCode , final String body ) throws IOException { } private void writeResponse ( final HttpExchange http , boolean isGet , boolean pretty , ModelNode response , int status , boolean encode ) throws IOException { } private void writeResponse ( final HttpExchange http , boolean isGet , boolean pretty , ModelNode response , int status , boolean encode , String contentType ) throws IOException { } private static final class SeekResult { BoundaryDelimitedInputStream stream ; String fileName ; } private DomainApiHandler . SeekResult seekToDeployment ( final HttpExchange http ) throws IOException { } private void drain ( InputStream stream ) { } private void safeClose ( Closeable close ) { } private ModelNode convertPostRequest ( InputStream stream , boolean encode ) throws IOException { } private ModelNode convertGetRequest ( URI request ) { } private ArrayList < String > decodePath ( String path ) { } private String unescape ( String string ) { } private Map < String , String > decodeQuery ( String query ) { } public void start ( HttpServer httpServer , SecurityRealm securityRealm ) { } public void stop ( HttpServer httpServer ) { } }

Fix:
} catch ( Exception iae ) {