Buggy code:
HashMap < String , HashMap < String , ModelNode > > cfConfigPropertiesOperations = new HashMap < String , HashMap < String , ModelNode > > ( ) ; HashMap < String , ModelNode > adminObjectsOperations = new HashMap < String , ModelNode > ( ) ; HashMap < String , HashMap < String , ModelNode > > aoConfigPropertiesOperations = new HashMap < String , HashMap < String , ModelNode > > ( ) ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case XMLStreamConstants . END_ELEMENT : { if ( ( ResourceAdapters . Tag . forName ( reader . getLocalName ( ) ) ) == ( ResourceAdapters . Tag . RESOURCE_ADAPTER ) ) { if ( archiveName != null ) { raAddress . add ( Constants . RESOURCEADAPTER_NAME , archiveName ) ; raAddress . protect ( ) ; operation . get ( OP_ADDR ) . set ( raAddress ) ; list . add ( operation ) ; for ( Map . Entry < String , ModelNode > entry : configPropertiesOperations . entrySet ( ) ) { final ModelNode env = raAddress . clone ( ) ; env . add ( Constants . CONFIG_PROPERTIES . getName ( ) , entry . getKey ( ) ) ; env . protect ( ) ; entry . getValue ( ) . get ( OP_ADDR ) . set ( env ) ; list . add ( entry . getValue ( ) ) ; } for ( Map . Entry < String , ModelNode > entry : connectionDefinitionsOperations . entrySet ( ) ) { final ModelNode env = raAddress . clone ( ) ; env . add ( Constants . CONNECTIONDEFINITIONS_NAME , entry . getKey ( ) ) ; env . protect ( ) ; entry . getValue ( ) . get ( OP_ADDR ) . set ( env ) ; list . add ( entry . getValue ( ) ) ; final HashMap < String , ModelNode > properties = cfConfigPropertiesOperations . get ( entry . getKey ( ) ) ; if ( properties != null ) { for ( Map . Entry < String , ModelNode > configEntry : properties . entrySet ( ) ) { final ModelNode configEnv = env . clone ( ) ; configEnv . add ( Constants . CONFIG_PROPERTIES . getName ( ) , configEntry . getKey ( ) ) ; configEnv . protect ( ) ; configEntry . getValue ( ) . get ( OP_ADDR ) . set ( configEnv ) ; list . add ( configEntry . getValue ( ) ) ; } } } for ( Map . Entry < String , ModelNode > entry : adminObjectsOperations . entrySet ( ) ) { final ModelNode env = raAddress . clone ( ) ; env . add ( Constants . ADMIN_OBJECTS_NAME , entry . getKey ( ) ) ; env . protect ( ) ; entry . getValue ( ) . get ( OP_ADDR ) . set ( env ) ; list . add ( entry . getValue ( ) ) ; final HashMap < String , ModelNode > aoProperties = aoConfigPropertiesOperations . get ( entry . getKey ( ) ) ; if ( aoProperties != null ) { for ( Map . Entry < String , ModelNode > configEntry : aoProperties . entrySet ( ) ) { final ModelNode configEnv = env . clone ( ) ; configEnv . add ( Constants . CONFIG_PROPERTIES . getName ( ) , configEntry . getKey ( ) ) ; configEnv . protect ( ) ; configEntry . getValue ( ) . get ( OP_ADDR ) . set ( configEnv ) ; list . add ( configEntry . getValue ( ) ) ; } } } return ; } else { throw new ParserException ( ResourceAdapterParser . bundle . requiredElementMissing ( Constants . ARCHIVE . getName ( ) , Constants . RESOURCEADAPTER_NAME ) ) ; } } else { if ( ( ResourceAdapter . Tag . forName ( reader . getLocalName ( ) ) ) == ( ResourceAdapter . Tag . UNKNOWN ) ) { throw new ParserException ( ResourceAdapterParser . bundle . unexpectedEndTag ( reader . getLocalName ( ) ) ) ; } } break ; } case XMLStreamConstants . START_ELEMENT : { switch ( ResourceAdapter . Tag . forName ( reader . getLocalName ( ) ) ) { case ADMIN_OBJECTS : case CONNECTION_DEFINITIONS : case BEAN_VALIDATION_GROUPS : { break ; } case ADMIN_OBJECT : { parseAdminObjects ( reader , adminObjectsOperations , aoConfigPropertiesOperations ) ; break ; } case CONNECTION_DEFINITION : { parseConnectionDefinitions ( reader , connectionDefinitionsOperations , cfConfigPropertiesOperations ) ; break ; } case BEAN_VALIDATION_GROUP : { String value = rawElementText ( reader ) ; <START_BUG> Constants . BEANVALIDATIONGROUPS . parseAndSetParameter ( value , operation , reader ) ; <END_BUG> break ; } case BOOTSTRAP_CONTEXT : { String value = rawElementText ( reader ) ; Constants . BOOTSTRAPCONTEXT . parseAndSetParameter ( value , operation , reader ) ; break ; } case CONFIG_PROPERTY : { parseConfigProperties ( reader , configPropertiesOperations ) ; break ; } case TRANSACTION_SUPPORT : { String value = rawElementText ( reader ) ; Constants . TRANSACTIONSUPPORT . parseAndSetParameter ( value , operation , reader ) ; break ; } case Constants . ARCHIVE : { archiveName = rawElementText ( reader ) ; Constants . ARCHIVE . parseAndSetParameter ( archiveName , operation , reader ) ; break ; } default : throw new ParserException ( ResourceAdapterParser . bundle . unexpectedElement ( reader . getLocalName ( ) ) ) ; } break ; } } } throw new ParserException ( ResourceAdapterParser . bundle . unexpectedEndOfDocument ( ) ) ; } public enum Tag { UNKNOWN ( null ) , RESOURCE_ADAPTERS ( "resource-adapters" ) ; private final String name ; Tag ( final String name ) { } public String getLocalName ( ) { } private static final Map < String , ResourceAdapterParser . Tag > MAP ;

Fix:
operation . get ( Constants . BEANVALIDATIONGROUPS . getName ( ) ) . add ( Constants . BEANVALIDATIONGROUPS . parse ( value , reader ) ) ;