Buggy code:
static void processDiscoveryGroups ( XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { } private static void parseDiscoveryGroup ( XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { } static void processConnectionFactories ( final XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { } static void processJmsDestinations ( final XMLExtendedStreamReader reader , final ModelNode address , List < ModelNode > updates ) throws XMLStreamException { } static void processAcceptors ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } static void parseQueues ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } static void parseQueue ( final XMLExtendedStreamReader reader , final ModelNode queue ) throws XMLStreamException { } static ModelNode processSecuritySettings ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > operations ) throws XMLStreamException { } static void parseSecurityRoles ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > operations ) throws XMLStreamException { } static void processConnectors ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } static void processAddressSettings ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > operations ) throws XMLStreamException { } static ModelNode parseAddressSettings ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } static void parseTransportConfigurationParams ( final XMLExtendedStreamReader reader , final ModelNode transportConfig , final boolean generic ) throws XMLStreamException { } static void parseDirectory ( final XMLExtendedStreamReader reader , final String name , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parseDiverts ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private static void parseDivert ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } static void unhandledElement ( XMLExtendedStreamReader reader , Element element ) throws XMLStreamException { } static void handleElementText ( final XMLExtendedStreamReader reader , final Element element , final ModelNode node ) throws XMLStreamException { } static void handleElementText ( final XMLExtendedStreamReader reader , final Element element , final String modelName , final ModelNode node ) throws XMLStreamException { } @ Deprecated static void handleElementText ( final XMLExtendedStreamReader reader , final Element element , final ModelNode node , final ModelType expectedType , final boolean allowNull , final boolean allowExpression ) throws XMLStreamException { } public void writeContent ( final XMLExtendedStreamWriter writer , final SubsystemMarshallingContext context ) throws XMLStreamException { } private void writeConnectorServices ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } private void writeBridges ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } private void writeClusterConnections ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } private void writeGroupingHandler ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } static void writeAcceptors ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } static void writeConnectors ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } static void writeAcceptorAndConnectorContent ( final XMLExtendedStreamWriter writer , final Property property ) throws XMLStreamException { } private void writeSecuritySettings ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writePermission ( final XMLExtendedStreamWriter writer , final String type , final List < String > roles ) throws XMLStreamException { } private void writeAddressSettings ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeQueues ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeBroadcastGroups ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeDiscoveryGroups ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeDiverts ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeFilter ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } static void writeSimpleElement ( final XMLExtendedStreamWriter writer , final Element element , final ModelNode node ) throws XMLStreamException { final String localName = element . getLocalName ( ) ; <START_BUG> if ( node . has ( localName ) ) { <END_BUG> final String content = node . get ( localName ) . asString ( ) ; if ( content != null ) { writer . writeStartElement ( localName ) ; writer . writeCharacters ( content ) ; writer . writeEndElement ( ) ; } } } static void writeDirectory ( final XMLExtendedStreamWriter writer , final Element element , final ModelNode node ) throws XMLStreamException { } private void writeConnectionFactories ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writePooledConnectionFactories ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeConnectionFactory ( XMLExtendedStreamWriter writer , ModelNode node , String name , ModelNode factory ) throws XMLStreamException { } private void writeJmsQueues ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeTopics ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeTransactionTypeAttribute ( final XMLExtendedStreamWriter writer , final Element attr , final ModelNode value ) throws XMLStreamException { } static boolean has ( ModelNode node , String name ) { } static void writeAttribute ( final XMLExtendedStreamWriter writer , final Attribute attr , final ModelNode value ) throws XMLStreamException { } static void processJMSTopic ( final XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { } static void processJMSQueue ( final XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { } static void processConnectionFactory ( final XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > updates ) throws XMLStreamException { }

Fix:
if ( node . hasDefined ( localName ) ) {