Buggy code:
public class ServerOperationResolver { public static AttachmentKey < Set < ModelNode > > DONT_PROPAGATE_TO_SERVERS_ATTACHMENT = AttachmentKey . create ( Set . class ) ; private enum DomainKey { UNKNOWN ( null ) , EXTENSION ( "extension" ) , PATH ( "path" ) , SYSTEM_PROPERTY ( "system-property" ) , PROFILE ( "profile" ) , INTERFACE ( "interface" ) , SOCKET_BINDING_GROUP ( "socket-binding-group" ) , DEPLOYMENT ( "deployment" ) , SERVER_GROUP ( "server-group" ) , MANAGMENT_CLIENT_CONTENT ( "management-client-content" ) , 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" ) , SYSTEM_PROPERTY ( "system-property" ) , CORE_SERVICE ( "core-service" ) , 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 enum Level { DOMAIN , SERVER_GROUP , HOST , SERVER ; } private final String localHostName ; private final Map < String , ProxyController > serverProxies ; public ServerOperationResolver ( final String localHostName , final Map < String , ProxyController > serverProxies ) { } public static synchronized void addToDontPropagateToServersAttachment ( OperationContext context , ModelNode op ) { } public Map < Set < ServerIdentity > , ModelNode > getServerOperations ( OperationContext context , ModelNode operation , PathAddress address ) { if ( DomainControllerLogger . HOST_CONTROLLER_LOGGER . isTraceEnabled ( ) ) { DomainControllerLogger . HOST_CONTROLLER_LOGGER . tracef ( "Resolving<seq2seq4repair_space>%s" , operation ) ; } Set < ModelNode > dontPropagate = context . getAttachment ( ServerOperationResolver . DONT_PROPAGATE_TO_SERVERS_ATTACHMENT ) ; if ( ( dontPropagate != null ) && ( dontPropagate . contains ( operation ) ) ) { return Collections . emptyMap ( ) ; } <START_BUG> final ModelNode domain = Tools . readModel ( context . getRootResource ( ) ) ; <END_BUG> final ModelNode host = domain . get ( HOST , localHostName ) ; if ( ( address . size ( ) ) == 0 ) { return resolveDomainRootOperation ( operation , domain , host ) ; } else { ServerOperationResolver . DomainKey domainKey = ServerOperationResolver . DomainKey . forName ( address . getElement ( 0 ) . getKey ( ) ) ; switch ( domainKey ) { case EXTENSION : { Set < ServerIdentity > allServers = DomainServerUtils . getAllRunningServers ( host , localHostName , serverProxies ) ; return Collections . singletonMap ( allServers , operation ) ; } case DEPLOYMENT : { return Collections . emptyMap ( ) ; } case PATH : { return getServerPathOperations ( operation , address , host , true ) ; } case SYSTEM_PROPERTY : { return getServerSystemPropertyOperations ( operation , address , ServerOperationResolver . Level . DOMAIN , domain , null , host ) ; } case PROFILE : { return getServerProfileOperations ( operation , address , domain , host ) ; } case INTERFACE : { return getServerInterfaceOperations ( operation , address , host , true ) ; } case SOCKET_BINDING_GROUP : { return getServerSocketBindingGroupOperations ( operation , address , domain , host ) ; } case SERVER_GROUP : { return getServerGroupOperations ( operation , address , domain , host ) ; } case MANAGMENT_CLIENT_CONTENT : { return Collections . emptyMap ( ) ; } case HOST : { return getServerHostOperations ( operation , address , domain , host ) ; } default : throw DomainControllerMessages . MESSAGES . unexpectedInitialPathKey ( address . getElement ( 0 ) . getKey ( ) ) ; } } } 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 Map < Set < ServerIdentity > , ModelNode > getServerGroupOperations ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { } private Map < Set < ServerIdentity > , ModelNode > resolveDomainRootOperation ( ModelNode operation , ModelNode domain , ModelNode host ) { } private Set < String > getServerGroupsForDeployment ( String deploymentName , ModelNode domainModel ) { } private boolean hasSystemProperty ( ModelNode resource , String propName ) { } private Map < Set < ServerIdentity > , ModelNode > getServerHostOperations ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { } private Map < Set < ServerIdentity > , ModelNode > resolveHostRootOperation ( ModelNode operation , ModelNode domain , ModelNode host ) { } private Map < Set < ServerIdentity > , ModelNode > getServerSystemPropertyOperations ( ModelNode operation , PathAddress address , ServerOperationResolver . Level level , ModelNode domain , String affectedGroup , ModelNode host ) { } private ModelNode getServerSystemPropertyOperation ( ModelNode operation , String propName , ServerIdentity server , ServerOperationResolver . Level level , ModelNode domain , ModelNode host ) { } private ModelNode getSystemPropertyValue ( ModelNode root , String propName ) { } private Map < Set < ServerIdentity > , ModelNode > resolveServerConfigOperation ( ModelNode operation , PathAddress address , ModelNode domain , ModelNode host ) { } private Map < Set < ServerIdentity > , ModelNode > getServerRestartRequiredOperations ( Set < ServerIdentity > servers ) { }

Fix:
final ModelNode domain = Tools . readModel ( context . readResourceFromRoot ( EMPTY_ADDRESS , true ) ) ;