Buggy code:
private void parseManagementInterface1_1 ( XMLExtendedStreamReader reader , ModelNode address , boolean http , Namespace expectedNs , List < ModelNode > list ) throws XMLStreamException { } private void parseHttpManagementInterfaceAttributes2_0 ( XMLExtendedStreamReader reader , ModelNode addOp ) throws XMLStreamException { } private void parseNativeManagementInterfaceAttributes2_0 ( XMLExtendedStreamReader reader , ModelNode addOp ) throws XMLStreamException { } private void parseManagementInterface2_0 ( XMLExtendedStreamReader reader , ModelNode address , boolean http , Namespace expectedNs , List < ModelNode > list ) throws XMLStreamException { } private void parseNativeManagementSocket ( XMLExtendedStreamReader reader , ModelNode addOp ) throws XMLStreamException { } private void parseHttpManagementSocket ( XMLExtendedStreamReader reader , ModelNode addOp ) throws XMLStreamException { } private void addLocalHost ( final ModelNode address , final List < ModelNode > operationList , final String hostName ) { } private void parseDomainController ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseLocalDomainController2_0 ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseRemoteDomainController1_0 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseRemoteDomainController1_1 ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseRemoteDomainController2_0 ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { boolean requireDiscoveryOptions = false ; boolean hasDiscoveryOptions = false ; switch ( expectedNs ) { case DOMAIN_1_1 : case DOMAIN_1_2 : parseRemoteDomainControllerAttributes_1_0 ( reader , address , list ) ; break ; case DOMAIN_1_3 : case DOMAIN_1_4 : parseRemoteDomainControllerAttributes_1_3 ( reader , address , list ) ; break ; default : requireDiscoveryOptions = parseRemoteDomainControllerAttributes_2_0 ( reader , address , list ) ; break ; } Set < String > types = new HashSet < String > ( ) ; Set < String > staticDiscoveryOptionNames = new HashSet < String > ( ) ; Set < String > discoveryOptionNames = new HashSet < String > ( ) ; while ( ( reader . hasNext ( ) ) && ( ( reader . nextTag ( ) ) != ( XMLStreamConstants . END_ELEMENT ) ) ) { requireNamespace ( reader , expectedNs ) ; final Element element = Element . forName ( reader . getLocalName ( ) ) ; switch ( element ) { case IGNORED_RESOURCE : { parseIgnoredResource ( reader , address , expectedNs , list , types ) ; break ; } case DISCOVERY_OPTIONS : { if ( hasDiscoveryOptions ) { throw MESSAGES . alreadyDefined ( element . getLocalName ( ) , reader . getLocation ( ) ) ; } parseDiscoveryOptions ( reader , address , expectedNs , list , staticDiscoveryOptionNames , discoveryOptionNames ) ; hasDiscoveryOptions = true ; break ; } default : throw unexpectedElement ( reader ) ; } } if ( requireDiscoveryOptions && ( ! hasDiscoveryOptions ) ) { <START_BUG> MESSAGES . discoveryOptionsMustBeDeclared ( DISCOVERY_OPTIONS . getLocalName ( ) , HOST . getLocalName ( ) , PORT . getLocalName ( ) , reader . getLocation ( ) ) ; <END_BUG> } } private void parseRemoteDomainControllerAttributes_1_0 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseRemoteDomainControllerAttributes_1_3 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private boolean parseRemoteDomainControllerAttributes_2_0 ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseIgnoredResource ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list , final Set < String > foundTypes ) throws XMLStreamException { } protected void parseDiscoveryOptions ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list , final Set < String > staticDiscoveryOptionNames , final Set < String > discoveryOptionNames ) throws XMLStreamException { } protected void parseStaticDiscoveryOption ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list , final Set < String > staticDiscoveryOptionNames ) throws XMLStreamException { } protected void parseDiscoveryOption ( final XMLExtendedStreamReader reader , final ModelNode address , Namespace expectedNs , final List < ModelNode > list , final Set < String > discoveryOptionNames ) throws XMLStreamException { } private ModelNode parseDiscoveryOptionAttributes ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list , final Set < String > discoveryOptionNames ) throws XMLStreamException { } protected void parseDiscoveryOptionProperty ( XMLExtendedStreamReader reader , ModelNode discoveryOptionProperties ) throws XMLStreamException { } private void parseJvms ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseServersAttributes ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > list ) throws XMLStreamException { } private void parseServers_1_0 ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseServers_1_2 ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseServer ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final Namespace expectedNs , final List < ModelNode > list , final Set < String > serverNames ) throws XMLStreamException { } private void parseServerContent1_0 ( final XMLExtendedStreamReader reader , final ModelNode serverAddOperation , final ModelNode serverAddress , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } private void parseServerContent1_1 ( final XMLExtendedStreamReader reader , final ModelNode serverAddOperation , final ModelNode serverAddress , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { }

Fix:
throw MESSAGES . discoveryOptionsMustBeDeclared ( DISCOVERY_OPTIONS . getLocalName ( ) , HOST . getLocalName ( ) , PORT . getLocalName ( ) , reader . getLocation ( ) ) ;