Buggy code:
class RemotingSubsystem11Parser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { static final RemotingSubsystem11Parser INSTANCE = new RemotingSubsystem11Parser ( ) ; @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } void parseWorkerThreadPool ( final XMLExtendedStreamReader reader , final ModelNode subsystemAdd ) throws XMLStreamException { } void parseConnector ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } void parseSaslElement ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } ModelNode parsePolicyElement ( XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseProperties ( XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseOutboundConnections ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > operations ) throws XMLStreamException { } private void parseRemoteOutboundConnection ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > operations ) throws XMLStreamException { final EnumSet < Attribute > required = EnumSet . of ( NAME , OUTBOUND_SOCKET_BINDING_REF ) ; final int count = reader . getAttributeCount ( ) ; String name = null ; String outboundSocketBindingRef = null ; String username = null ; String securityRealm = null ; for ( int i = 0 ; i < count ; i ++ ) { requireNoNamespaceAttribute ( reader , i ) ; final String value = reader . getAttributeValue ( i ) ; final Attribute attribute = Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; required . remove ( attribute ) ; switch ( attribute ) { case NAME : { name = value ; break ; } case OUTBOUND_SOCKET_BINDING_REF : { outboundSocketBindingRef = value ; break ; } case USERNAME : { username = value ; break ; } case SECURITY_REALM : { securityRealm = value ; break ; } default : throw unexpectedAttribute ( reader , i ) ; } } if ( ! ( required . isEmpty ( ) ) ) { throw missingRequired ( reader , required ) ; } final PathAddress address = PathAddress . pathAddress ( PathAddress . pathAddress ( parentAddress ) , PathElement . pathElement ( REMOTE_OUTBOUND_CONNECTION , name ) ) ; <START_BUG> operations . add ( RemotingSubsystem11Parser . getConnectionAddOperation ( name , outboundSocketBindingRef , address ) ) ; <END_BUG> final EnumSet < Element > visited = EnumSet . noneOf ( Element . class ) ; while ( ( reader . hasNext ( ) ) && ( ( reader . nextTag ( ) ) != ( XMLStreamConstants . END_ELEMENT ) ) ) { final Element element = Element . forName ( reader . getLocalName ( ) ) ; if ( visited . contains ( element ) ) { throw ParseUtils . unexpectedElement ( reader ) ; } visited . add ( element ) ; switch ( element ) { case PROPERTIES : { parseProperties ( reader , address . toModelNode ( ) , operations ) ; break ; } default : { throw unexpectedElement ( reader ) ; } } } } private void parseLocalOutboundConnection ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > operations ) throws XMLStreamException { } private void parseOutboundConnection ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > operations ) throws XMLStreamException { } static ModelNode getConnectionAddOperation ( final String connectionName , final String outboundSocketBindingRef , PathAddress address ) { } static ModelNode getConnectionAddOperation ( final String connectionName , final String outboundSocketBindingRef , final String userName , final String securityRealm , PathAddress address ) { } @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } private void writeWorkerThreadPoolIfAttributesSet ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeConnector ( final XMLExtendedStreamWriter writer , final ModelNode node , final String name ) throws XMLStreamException { } private void writeProperties ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeSasl ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writePolicy ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeOutboundConnection ( final XMLExtendedStreamWriter writer , final String connectionName , final ModelNode model ) throws XMLStreamException { } private void writeRemoteOutboundConnection ( final XMLExtendedStreamWriter writer , final String connectionName , final ModelNode model ) throws XMLStreamException { } private void writeLocalOutboundConnection ( final XMLExtendedStreamWriter writer , final String connectionName , final ModelNode model ) throws XMLStreamException { } }

Fix:
operations . add ( RemotingSubsystem11Parser . getConnectionAddOperation ( name , outboundSocketBindingRef , username , securityRealm , address ) ) ;