Buggy code:
public class Messaging12SubsystemParser extends MessagingSubsystemParser { private static final Messaging12SubsystemParser INSTANCE = new Messaging12SubsystemParser ( ) ; public static MessagingSubsystemParser getInstance ( ) { } protected Messaging12SubsystemParser ( ) { } @ Override protected void handleUnknownConnectionFactoryAttribute ( XMLExtendedStreamReader reader , Element element , ModelNode connectionFactory , boolean pooled ) throws XMLStreamException { } protected void processBridge ( XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { requireSingleAttribute ( reader , NAME ) ; String name = reader . getAttributeValue ( 0 ) ; ModelNode bridgeAdd = Util . getEmptyOperation ( ADD , address . clone ( ) . add ( BRIDGE , name ) ) ; EnumSet < Element > required = EnumSet . of ( QUEUE_NAME ) ; Set < Element > seen = EnumSet . noneOf ( Element . class ) ; while ( ( reader . hasNext ( ) ) && ( ( reader . nextTag ( ) ) != ( END_ELEMENT ) ) ) { final Element element = Element . forName ( reader . getLocalName ( ) ) ; if ( ! ( seen . add ( element ) ) ) { throw ParseUtils . duplicateNamedElement ( reader , element . getLocalName ( ) ) ; } required . remove ( element ) ; switch ( element ) { case QUEUE_NAME : case HA : case TRANSFORMER_CLASS_NAME : case USER : case PASSWORD : handleElementText ( reader , element , bridgeAdd ) ; break ; case CommonAttributes . FILTER : { String string = readStringAttributeElement ( reader , STRING ) ; CommonAttributes . FILTER . parseAndSetParameter ( string , bridgeAdd , reader ) ; break ; } case CHECK_PERIOD : case CONNECTION_TTL : case MAX_RETRY_INTERVAL : case MIN_LARGE_MESSAGE_SIZE : case RETRY_INTERVAL : case RETRY_INTERVAL_MULTIPLIER : handleElementText ( reader , element , "default" , bridgeAdd ) ; break ; case CONFIRMATION_WINDOW_SIZE : case FORWARDING_ADDRESS : case RECONNECT_ATTEMPTS : case USE_DUPLICATE_DETECTION : handleElementText ( reader , element , "bridge" , bridgeAdd ) ; break ; case STATIC_CONNECTORS : checkOtherElementIsNotAlreadyDefined ( reader , seen , STATIC_CONNECTORS , DISCOVERY_GROUP_REF ) ; processStaticConnectors ( reader , bridgeAdd , false ) ; break ; case DISCOVERY_GROUP_REF : { checkOtherElementIsNotAlreadyDefined ( reader , seen , DISCOVERY_GROUP_REF , STATIC_CONNECTORS ) ; final String groupRef = readStringAttributeElement ( reader , DISCOVERY_GROUP_NAME . getXmlName ( ) ) ; DISCOVERY_GROUP_NAME . parseAndSetParameter ( groupRef , bridgeAdd , reader ) ; break ; } case FAILOVER_ON_SERVER_SHUTDOWN : { ROOT_LOGGER . deprecatedXMLElement ( element . toString ( ) ) ; skipElementText ( reader ) ; break ; } default : { throw ParseUtils . unexpectedElement ( reader ) ; } } } checkOnlyOneOfElements ( reader , seen , STATIC_CONNECTORS , DISCOVERY_GROUP_REF ) ; if ( ! ( required . isEmpty ( ) ) ) { <START_BUG> missingRequired ( reader , required ) ; <END_BUG> } updates . add ( bridgeAdd ) ; } @ Override protected void handleUnknownClusterConnectionAttribute ( XMLExtendedStreamReader reader , Element element , ModelNode clusterConnectionAdd ) throws XMLStreamException { } @ Override protected void checkClusterConnectionConstraints ( XMLExtendedStreamReader reader , Set < Element > seen ) throws XMLStreamException { } }

Fix:
throw missingRequired ( reader , required ) ;