Buggy code:
public class ServerOperationResolver { private enum DomainKey { UNKNOWN ( null ) , EXTENSION ( "extension" ) , PATH ( "path" ) , PROFILE ( "profile" ) , INTERFACE ( "interface" ) , SOCKET_BINDING_GROUP ( "socket-binding-group" ) , DEPLOYMENT ( "deployment" ) , SERVER_GROUP ( "server-group" ) , HOST ( "host" ) ; private final String name ; DomainKey ( final String name ) { } private static final Map < String , ServerOperationResolver . DomainKey > MAP ; public static ServerOperationResolver . DomainKey forName ( String localName ) { } } private enum HostKey { UNKNOWN ( null ) , PATH ( "path" ) , MANAGEMENT ( "management" ) , INTERFACE ( "interface" ) , JVM ( "jvm" ) , SERVER ( "server" ) , SERVER_CONFIG ( "server-config" ) ; private final String name ; HostKey ( final String name ) { } private static final Map < String , ServerOperationResolver . HostKey > MAP ; public static ServerOperationResolver . HostKey forName ( String localName ) { } } private final String localHostName ; ServerOperationResolver ( final String localHostName ) { } Map < Set < ServerIdentity > , ModelNode > getServerOperations ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { } private Set < ServerIdentity > getAllRunningServers ( ModelNode hostModel ) { } private Set < ServerIdentity > getServersForGroup ( String groupName , ModelNode hostModel ) { } private Set < ServerIdentity > getServersForType ( String type , String ref , ModelNode domainModel , ModelNode hostModel ) { } private Set < String > getGroupsForType ( String type , String ref , ModelNode domainModel ) { } private Map < Set < ServerIdentity > , ModelNode > getServerProfileOperations ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { } private Map < Set < ServerIdentity > , ModelNode > getServerInterfaceOperations ( ModelNode operation , PathAddress address , ModelNode hostModel , boolean forDomain ) { } private Map < Set < ServerIdentity > , ModelNode > getServerPathOperations ( ModelNode operation , PathAddress address , ModelNode hostModel , boolean forDomain ) { } private Map < Set < ServerIdentity > , ModelNode > getServerSocketBindingGroupOperations ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { } private Set < String > getRelatedElements ( String containerType , String parent , ModelNode domainModel ) { } private Map < Set < ServerIdentity > , ModelNode > getServerGroupOperations ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { Map < Set < ServerIdentity > , ModelNode > result = null ; if ( ( address . size ( ) ) > 1 ) { String type = address . getElement ( 1 ) . getKey ( ) ; if ( JVM . equals ( type ) ) { result = Collections . emptyMap ( ) ; } else if ( DEPLOYMENT . equals ( type ) ) { String groupName = address . getElement ( 0 ) . getValue ( ) ; Set < ServerIdentity > servers = getServersForGroup ( groupName , host ) ; ModelNode serverOp = operation . clone ( ) ; if ( ADD . equals ( serverOp . get ( OP ) . asString ( ) ) ) { ModelNode domainDeployment = domain . get ( DEPLOYMENT , address . getElement ( 1 ) . getValue ( ) ) ; serverOp . get ( RUNTIME_NAME ) . set ( domainDeployment . get ( RUNTIME_NAME ) ) ; <START_BUG> serverOp . get ( CONTENT ) . get ( 0 ) . get ( HASH ) . set ( domainDeployment . require ( CONTENT ) . require ( 0 ) . require ( HASH ) . asBytes ( ) ) ; <END_BUG> } PathAddress serverAddress = address . subAddress ( 1 ) ; serverOp . get ( OP_ADDR ) . set ( serverAddress . toModelNode ( ) ) ; result = Collections . singletonMap ( servers , serverOp ) ; } } if ( result == null ) { String opName = operation . require ( OP ) . asString ( ) ; if ( ( OPERATION_NAME . equals ( opName ) ) || ( SystemPropertyRemoveHandler . OPERATION_NAME . equals ( opName ) ) ) { String propName = operation . require ( NAME ) . asString ( ) ; Set < ServerIdentity > servers = null ; if ( ! ( hasSystemProperty ( host , propName ) ) ) { if ( host . hasDefined ( SERVER_CONFIG ) ) { servers = new HashSet < ServerIdentity > ( ) ; String groupName = address . getElement ( 0 ) . getValue ( ) ; for ( Property serverProp : host . get ( SERVER_CONFIG ) . asPropertyList ( ) ) { ModelNode server = serverProp . getValue ( ) ; if ( ( ( groupName . equals ( server . require ( GROUP ) . asString ( ) ) ) && ( ! ( hasSystemProperty ( server , propName ) ) ) ) && ( ( ! ( server . hasDefined ( AUTO_START ) ) ) || ( server . get ( AUTO_START ) . asBoolean ( ) ) ) ) { servers . add ( new ServerIdentity ( localHostName , groupName , serverProp . getName ( ) ) ) ; } } } } if ( ( servers != null ) && ( ( servers . size ( ) ) > 0 ) ) { ModelNode serverOp = operation . clone ( ) ; serverOp . get ( OP_ADDR ) . setEmptyList ( ) ; result = Collections . singletonMap ( servers , serverOp ) ; } } } if ( result == null ) { result = Collections . emptyMap ( ) ; } return result ; } private Map < Set < ServerIdentity > , ModelNode > resolveDomainRootOperation ( ModelNode operation , ModelNode domain , ModelNode host ) { }

Fix:
serverOp . get ( CONTENT ) . set ( domainDeployment . require ( CONTENT ) ) ;