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" ) , RUNNING_SERVER ( "running-server" ) ; 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 ) { if ( ( address . size ( ) ) == 1 ) { return Collections . emptyMap ( ) ; } String profileName = address . getElement ( 0 ) . getValue ( ) ; Set < String > relatedProfiles = getRelatedElements ( PROFILE , profileName , domain ) ; Set < ServerIdentity > allServers = new HashSet < ServerIdentity > ( ) ; for ( String profile : relatedProfiles ) { allServers . addAll ( getServersForType ( PROFILE , profile , domain , host ) ) ; } ModelNode serverOp = operation . clone ( ) ; PathAddress serverAddress = address . subAddress ( 1 ) ; serverOp . get ( OP_ADDR ) . set ( serverAddress . toModelNode ( ) ) ; <START_BUG> return Collections . singletonMap ( allServers , operation ) ; <END_BUG> } 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 ) { } private Map < Set < ServerIdentity > , ModelNode > resolveDomainRootOperation ( ModelNode operation , ModelNode domain , ModelNode host ) { } 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 host ) { } private Map < Set < ServerIdentity > , ModelNode > resolveServerConfigOperation ( ModelNode operation , PathAddress address , ModelNode host ) { } }

Fix:
return Collections . singletonMap ( allServers , serverOp ) ;