Buggy code:
public class ApplyRemoteMasterDomainModelHandler implements OperationStepHandler { public static final String OPERATION_NAME = "apply-remote-domain-model" ; public static final OperationDefinition DEFINITION = new SimpleOperationDefinitionBuilder ( ApplyRemoteMasterDomainModelHandler . OPERATION_NAME , null ) . withFlag ( HOST_CONTROLLER_ONLY ) . setPrivateEntry ( ) . build ( ) ; protected final DomainController domainController ; protected final HostControllerEnvironment hostControllerEnvironment ; protected final LocalHostControllerInfo localHostInfo ; protected final IgnoredDomainResourceRegistry ignoredResourceRegistry ; private final HostFileRepository fileRepository ; private final ContentRepository contentRepository ; private final WritableAuthorizerConfiguration authorizerConfiguration ; public ApplyRemoteMasterDomainModelHandler ( final DomainController domainController , final HostControllerEnvironment hostControllerEnvironment , final HostFileRepository fileRepository , final ContentRepository contentRepository , final LocalHostControllerInfo localHostInfo , final IgnoredDomainResourceRegistry ignoredResourceRegistry , final WritableAuthorizerConfiguration authorizerConfiguration ) { } public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { } private void clearDomain ( final Resource rootResource ) { } protected Resource getResource ( PathAddress resourceAddress , Resource rootResource , ModelNode resourceModel , OperationContext context , List < ModelNode > addOps ) { if ( ( resourceAddress . size ( ) ) == 0 ) { return rootResource ; } boolean allowCreate = true ; boolean writeResourceModel = true ; boolean coreService = false ; boolean accessControl = false ; PathElement created = null ; Resource temp = rootResource ; int idx = 0 ; for ( PathElement element : resourceAddress ) { temp = ( temp == null ) ? null : temp . getChild ( element ) ; String type = element . getKey ( ) ; assert ! ( EXTENSION . equals ( type ) ) : "extension<seq2seq4repair_space>resources<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>excluded" ; String value = element . getValue ( ) ; if ( temp == null ) { if ( idx == 0 ) { if ( ( MANAGEMENT_CLIENT_CONTENT . equals ( type ) ) && ( ROLLOUT_PLANS . equals ( value ) ) ) { temp = new org . jboss . as . management . client . content . ManagedDMRContentTypeResource ( element , ROLLOUT_PLAN , null , contentRepository ) ; context . addResource ( resourceAddress , temp ) ; } } else if ( accessControl ) { allowCreate = false ; if ( idx == ( ( resourceAddress . size ( ) ) - 1 ) ) { ModelNode addOp = Util . createAddOperation ( resourceAddress ) ; if ( resourceModel . isDefined ( ) ) { for ( Property property : resourceModel . asPropertyList ( ) ) { addOp . get ( property . getName ( ) ) . set ( property . getValue ( ) ) ; } } addOps . add ( addOp ) ; } } if ( ( temp == null ) && allowCreate ) { assert created == null : "already<seq2seq4repair_space>created<seq2seq4repair_space>" + created ; temp = context . createResource ( resourceAddress ) ; created = element ; } } else if ( ( CORE_SERVICE . equals ( type ) ) && ( MANAGEMENT . equals ( value ) ) ) { coreService = true ; } else if ( ( coreService && ( idx == 1 ) ) && ( element . equals ( PATH_ELEMENT ) ) ) { accessControl = true ; if ( idx == ( ( resourceAddress . size ( ) ) - 1 ) ) { writeResourceModel = false ; ModelNode configureOp = Util . createEmptyOperation ( AccessAuthorizationDomainSlaveConfigHandler . OPERATION_NAME , resourceAddress ) ; <START_BUG> for ( AttributeDefinition ad : AccessAuthorizationResourceDefinition . ATTRIBUTES ) { <END_BUG> String attrName = ad . getName ( ) ; if ( resourceModel . hasDefined ( attrName ) ) { configureOp . get ( attrName ) . set ( resourceModel . get ( attrName ) ) ; } } addOps . add ( configureOp ) ; } } else if ( ( accessControl && ( idx == 2 ) ) && ( ( ( APPLICATION_PATH_ELEMENT . equals ( element ) ) || ( SENSITIVITY_PATH_ELEMENT . equals ( element ) ) ) || ( VAULT_PATH_ELEMENT . equals ( element ) ) ) ) { accessControl = false ; allowCreate = false ; } idx ++ ; } if ( writeResourceModel && ( temp != null ) ) { temp . writeModel ( resourceModel ) ; } return temp ; } private Set < String > getOurServerGroups ( OperationContext context ) { } private void makeAffectedServersRestartRequired ( OperationContext context , ModelNode startRoot ) { } private ServerIdentity createServerIdentity ( ModelNode hostModel , String serverName ) { } private boolean bootOpsChanged ( ModelNode startOps , ModelNode endOps ) { } private ModelNode createBootOps ( final OperationContext context , final String serverName , final ModelNode domainModel , final ModelNode hostModel ) { } private static class ResourceAddition { private final Resource addedResource ; private final List < ModelNode > addOps ; private ResourceAddition ( Resource addedResource , List < ModelNode > addOps ) { } } }

Fix:
for ( AttributeDefinition ad : AccessAuthorizationResourceDefinition . CONFIG_ATTRIBUTES ) {