Buggy code:
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 ) { } 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 ) { Map < Set < ServerIdentity > , ModelNode > result ; ModelNode serverOp = null ; if ( ( address . size ( ) ) > 1 ) { String type = address . getElement ( 1 ) . getKey ( ) ; if ( ( PATH . equals ( type ) ) || ( INTERFACE . equals ( type ) ) ) { serverOp = operation . clone ( ) ; PathAddress serverAddress = address . subAddress ( 1 ) ; serverOp . get ( OP_ADDR ) . set ( serverAddress . toModelNode ( ) ) ; } else if ( ( SYSTEM_PROPERTY . equals ( type ) ) && ( isServerAffectingSystemPropertyOperation ( operation ) ) ) { String propName = address . getLastElement ( ) . getValue ( ) ; String serverName = address . getElement ( 0 ) . getValue ( ) ; ServerIdentity serverId = getServerIdentity ( serverName , host ) ; serverOp = getServerSystemPropertyOperation ( operation , propName , serverId , ServerOperationResolver . Level . SERVER , domain , host ) ; } } else if ( ( address . size ( ) ) == 1 ) { if ( WRITE_ATTRIBUTE_OPERATION . equals ( operation . require ( OP ) . asString ( ) ) ) { final String attr = operation . get ( NAME ) . asString ( ) ; if ( ( ( GROUP . equals ( attr ) ) || ( SOCKET_BINDING_GROUP . equals ( attr ) ) ) || ( SOCKET_BINDING_PORT_OFFSET . equals ( attr ) ) ) { final String serverName = address . getElement ( 0 ) . getValue ( ) ; <START_BUG> final String group = host . get ( address . getLastElement ( ) . getKey ( ) , address . getLastElement ( ) . getValue ( ) , GROUP ) . toString ( ) ; <END_BUG> final ServerIdentity id = new ServerIdentity ( localHostName , group , serverName ) ; result = getServerRestartRequiredOperations ( Collections . singleton ( id ) ) ; return result ; } } } if ( serverOp == null ) { result = Collections . emptyMap ( ) ; } else { String serverName = address . getElement ( 0 ) . getValue ( ) ; ServerIdentity gs = getServerIdentity ( serverName , host ) ; Set < ServerIdentity > set = Collections . singleton ( gs ) ; result = Collections . singletonMap ( set , serverOp ) ; } return result ; } private Map < Set < ServerIdentity > , ModelNode > getServerRestartRequiredOperations ( Set < ServerIdentity > servers ) { } private ServerIdentity getServerIdentity ( String serverName , ModelNode host ) { } private boolean isServerAffectingSystemPropertyOperation ( ModelNode operation ) { } }

Fix:
final String group = host . get ( address . getLastElement ( ) . getKey ( ) , address . getLastElement ( ) . getValue ( ) , GROUP ) . asString ( ) ;