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=\"?([^\"]*)?\"?.*$" ) ; private static final Logger log = Logger . getLogger ( "org.jboss.as.domain.http.api" ) ; enum GetOperation { RESOURCE ( "read-resource" ) , ATTRIBUTE ( "read-attribute" ) , RESOURCE_DESCRIPTION ( "read-resource-description" ) , OPERATION_DESCRIPTION ( "read-operation-description" ) , OPERATION_NAMES ( "read-operation-names" ) ; private String realOperation ; GetOperation ( String realOperation ) { } public String realOperation ( ) { } } private NewModelControllerClient modelController ; DomainApiHandler ( NewModelControllerClient modelController ) { } public void handle ( HttpExchange http ) throws IOException { } 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 = null ; 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> response = modelController . execute ( Factory . create ( dmr ) . build ( ) ) ; <END_BUG> } catch ( Throwable t ) { DomainApiHandler . log . error ( "Unexpected<seq2seq4repair_space>error<seq2seq4repair_space>executing<seq2seq4repair_space>model<seq2seq4repair_space>request" , t ) ; http . sendResponseHeaders ( Constants . INTERNAL_SERVER_ERROR , ( - 1 ) ) ; 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 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:
response = modelController . execute ( new org . jboss . as . controller . client . NewOperationBuilder ( dmr ) . build ( ) ) ;