Buggy code:
public class GlobalOperationHandlers { public static final NewStepHandler READ_RESOURCE = new GlobalOperationHandlers . ReadResourceHandler ( ) ; public static final NewStepHandler READ_ATTRIBUTE = new GlobalOperationHandlers . ReadAttributeHandler ( ) ; public static final NewStepHandler READ_CHILDREN_NAMES = new GlobalOperationHandlers . ReadChildrenNamesOperationHandler ( ) ; public static final NewStepHandler READ_CHILDREN_RESOURCES = new GlobalOperationHandlers . ReadChildrenResourcesOperationHandler ( ) ; public static final NewStepHandler WRITE_ATTRIBUTE = new GlobalOperationHandlers . WriteAttributeHandler ( ) ; public static final GlobalOperationHandlers . ResolveAddressOperationHandler RESOLVE = new GlobalOperationHandlers . ResolveAddressOperationHandler ( ) ; private GlobalOperationHandlers ( ) { } public static class ReadResourceHandler implements NewStepHandler { static final String PROXIES = "proxies" ; @ Override public void execute ( NewOperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode result = readModel ( context , operation , EMPTY_ADDRESS ) ; context . getResult ( ) . set ( result ) ; context . completeStep ( ) ; } protected ModelNode readModel ( final NewOperationContext context , final ModelNode readOperation , final PathAddress address ) throws OperationFailedException { } protected void addProxyNodes ( NewOperationContext context , PathAddress address , ModelNode originalOperation , ModelNode result , ModelNodeRegistration registry ) { } protected void handleNonRecursiveProxyEntries ( final NewOperationContext context , final PathAddress address , final ModelNode originalOperation , final ModelNode result , final ModelNodeRegistration registry ) { } protected void addProxyResultToMainResult ( final PathAddress address , final ModelNode mainResult , final ModelNode proxyResult ) { } } public static class ReadAttributeHandler implements NewStepHandler { @ Override public void execute ( NewOperationContext context , ModelNode operation ) throws OperationFailedException { final String attributeName = operation . require ( NAME ) . asString ( ) ; final ModelNode subModel = context . readModel ( EMPTY_ADDRESS ) ; final AttributeAccess attributeAccess = context . getModelNodeRegistration ( ) . getAttributeAccess ( EMPTY_ADDRESS , attributeName ) ; if ( attributeAccess == null ) { final Set < String > children = context . getModelNodeRegistration ( ) . getChildNames ( EMPTY_ADDRESS ) ; if ( children . contains ( attributeName ) ) { throw new OperationFailedException ( new ModelNode ( ) . set ( String . format ( "'%s'<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>registered<seq2seq4repair_space>child<seq2seq4repair_space>of<seq2seq4repair_space>resource<seq2seq4repair_space>(%s)" , attributeName , operation . get ( OP_ADDR ) ) ) ) ; } else if ( subModel . has ( attributeName ) ) { final ModelNode result = subModel . get ( attributeName ) ; context . getResult ( ) . set ( result ) ; context . completeStep ( ) ; } else { throw new OperationFailedException ( new ModelNode ( ) . set ( ( "No<seq2seq4repair_space>known<seq2seq4repair_space>attribute<seq2seq4repair_space>called<seq2seq4repair_space>" + attributeName ) ) ) ; } } else if ( ( attributeAccess . getReadHandler ( ) ) == null ) { final ModelNode result = subModel . get ( attributeName ) ; context . getResult ( ) . set ( result ) ; context . completeStep ( ) ; } else { attributeAccess . getReadHandler ( ) . execute ( context , operation ) ; } } } public static class WriteAttributeHandler implements NewStepHandler { public void execute ( NewOperationContext context , ModelNode operation ) throws OperationFailedException { final String attributeName = operation . require ( NAME ) . asString ( ) ; final AttributeAccess attributeAccess = context . getModelNodeRegistration ( ) . getAttributeAccess ( EMPTY_ADDRESS , attributeName ) ; if ( attributeAccess == null ) { throw new OperationFailedException ( new ModelNode ( ) . set ( ( "No<seq2seq4repair_space>known<seq2seq4repair_space>attribute<seq2seq4repair_space>called<seq2seq4repair_space>" + attributeName ) ) ) ; } else if ( ( attributeAccess . getAccessType ( ) ) != ( AccessType . READ_WRITE ) ) { throw new OperationFailedException ( new ModelNode ( ) . set ( ( ( "Attribute<seq2seq4repair_space>" + attributeName ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>writeable" ) ) ) ; } else { <START_BUG> attributeAccess . getReadHandler ( ) . execute ( context , operation ) ; <END_BUG> } } } public static class ReadChildrenNamesOperationHandler implements NewStepHandler { @ Override public void execute ( NewOperationContext context , ModelNode operation ) throws OperationFailedException { final String childName = operation . require ( CHILD_TYPE ) . asString ( ) ; ModelNode subModel = context . readModel ( EMPTY_ADDRESS ) ; if ( ! ( subModel . isDefined ( ) ) ) { final ModelNode result = new ModelNode ( ) ; context . getResult ( ) . setEmptyList ( ) ; } else { final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; final Set < String > childNames = context . getModelNodeRegistration ( ) . getChildNames ( EMPTY_ADDRESS ) ; if ( ! ( childNames . contains ( childName ) ) ) { throw new OperationFailedException ( new ModelNode ( ) . set ( ( "No<seq2seq4repair_space>known<seq2seq4repair_space>child<seq2seq4repair_space>called<seq2seq4repair_space>" + childName ) ) ) ; } else { final ModelNode result = new ModelNode ( ) ; subModel = subModel . get ( childName ) ; if ( ! ( subModel . isDefined ( ) ) ) { result . setEmptyList ( ) ; } else { for ( final String key : subModel . keys ( ) ) { final ModelNode node = new ModelNode ( ) ; node . set ( key ) ; result . add ( node ) ; } } context . getResult ( ) . set ( result ) ; } } context . completeStep ( ) ; } } public static class ReadChildrenResourcesOperationHandler implements NewStepHandler { @ Override public void execute ( NewOperationContext context , ModelNode operation ) throws OperationFailedException { final String childName = operation . require ( CHILD_TYPE ) . asString ( ) ; ModelNode subModel = context . readModel ( EMPTY_ADDRESS ) ; if ( ! ( subModel . isDefined ( ) ) ) { context . getResult ( ) . setEmptyList ( ) ; } else { final Set < String > childNames = context . getModelNodeRegistration ( ) . getChildNames ( EMPTY_ADDRESS ) ;

Fix:
attributeAccess . getWriteHandler ( ) . execute ( context , operation ) ;