Buggy code:
protected void parseSimpleInterfaceCriterion ( final XMLExtendedStreamReader reader , final ModelNode subModel , boolean nested ) throws XMLStreamException { } private void validateAddressMask ( String value , Location location ) throws XMLStreamException { } protected void parseInterfaces ( final XMLExtendedStreamReader reader , final Set < String > names , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list , final boolean checkSpecified ) throws XMLStreamException { } protected void parseSocketBindingGroupRef ( final XMLExtendedStreamReader reader , final ModelNode addOperation , final SimpleAttributeDefinition socketBindingGroup , final SimpleAttributeDefinition portOffset ) throws XMLStreamException { } protected String parseSocketBinding ( final XMLExtendedStreamReader reader , final Set < String > interfaces , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private ModelNode parseClientMapping ( XMLExtendedStreamReader reader ) throws XMLStreamException { } protected String parseOutboundSocketBinding ( final XMLExtendedStreamReader reader , final Set < String > interfaces , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseLocalDestinationOutboundSocketBinding ( final XMLExtendedStreamReader reader , final ModelNode outboundSocketBindingAddOperation ) throws XMLStreamException { } private void parseRemoteDestinationOutboundSocketBinding ( final XMLExtendedStreamReader reader , final ModelNode outboundSocketBindingAddOperation ) throws XMLStreamException { } protected void parseDeployments ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list , final Set < Attribute > allowedAttributes , final Set < Element > allowedElements ) throws XMLStreamException { } protected void parseDeploymentOverlays ( final XMLExtendedStreamReader reader , final Namespace namespace , final ModelNode baseAddress , final List < ModelNode > list ) throws XMLStreamException { } protected void parseDeploymentOverlay ( final XMLExtendedStreamReader reader , final ModelNode baseAddress , final List < ModelNode > list ) throws XMLStreamException { } protected void parseContentOverride ( final String name , final XMLExtendedStreamReader reader , final ModelNode baseAddress , final List < ModelNode > list ) throws XMLStreamException { } protected void parseDeploymentOverlayDeployment ( final String name , final XMLExtendedStreamReader reader , final ModelNode baseAddress , final List < ModelNode > list ) throws XMLStreamException { } protected void parseVault ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } protected void parseModuleOption ( XMLExtendedStreamReader reader , ModelNode moduleOptions ) throws XMLStreamException { } protected void writeInterfaces ( final XMLExtendedStreamWriter writer , final ModelNode modelNode ) throws XMLStreamException { } private void writeInterfaceCriteria ( final XMLExtendedStreamWriter writer , final ModelNode subModel , final boolean nested ) throws XMLStreamException { } private void writeInterfaceCriteria ( final XMLExtendedStreamWriter writer , final Property property , final boolean nested ) throws XMLStreamException { } private static void writeInterfaceCriteria ( final XMLExtendedStreamWriter writer , final Element element , final Attribute attribute , final ModelNode subModel , boolean asList ) throws XMLStreamException { } private static void writeSingleElement ( final XMLExtendedStreamWriter writer , final Element element , final Attribute attribute , final ModelNode subModel ) throws XMLStreamException { } private static void writeListAsMultipleElements ( final XMLExtendedStreamWriter writer , final Element element , Attribute attribute , final ModelNode subModel ) throws XMLStreamException { } protected void writeSocketBindingGroup ( XMLExtendedStreamWriter writer , ModelNode bindingGroup , boolean fromServer ) throws XMLStreamException { } protected void writeProperties ( final XMLExtendedStreamWriter writer , final ModelNode modelNode , Element element , boolean standalone ) throws XMLStreamException { } protected static void writeAttribute ( XMLExtendedStreamWriter writer , Attribute attribute , String value ) throws XMLStreamException { } protected static void writeContentItem ( final XMLExtendedStreamWriter writer , final ModelNode contentItem ) throws XMLStreamException { } protected void writeVault ( XMLExtendedStreamWriter writer , ModelNode vault ) throws XMLStreamException { } protected static void writeNewLine ( XMLExtendedStreamWriter writer ) throws XMLStreamException { } protected void writeDeploymentOverlays ( final XMLExtendedStreamWriter writer , final ModelNode modelNode ) throws XMLStreamException { Set < String > names = modelNode . keys ( ) ; if ( ( names . size ( ) ) > 0 ) { writer . writeStartElement ( DEPLOYMENT_OVERLAYS . getLocalName ( ) ) ; for ( String uniqueName : names ) { final ModelNode contentItem = modelNode . get ( uniqueName ) ; writer . writeStartElement ( DEPLOYMENT_OVERLAY . getLocalName ( ) ) ; CommonXml . writeAttribute ( writer , NAME , uniqueName ) ; if ( contentItem . hasDefined ( CONTENT ) ) { final ModelNode overridesNode = contentItem . get ( CONTENT ) ; final Set < String > overrides = overridesNode . keys ( ) ; for ( final String override : overrides ) { final ModelNode overrideNode = overridesNode . get ( override ) ; final String content = HashUtil . bytesToHexString ( overrideNode . require ( CONTENT ) . asBytes ( ) ) ; writer . writeStartElement ( Element . CONTENT . getLocalName ( ) ) ; CommonXml . writeAttribute ( writer , PATH , override ) ; CommonXml . writeAttribute ( writer , Attribute . CONTENT , content ) ; writer . writeEndElement ( ) ; } } if ( contentItem . hasDefined ( DEPLOYMENT ) ) { final ModelNode deployments = contentItem . get ( DEPLOYMENT ) ; Set < String > deploymentNames = deployments . keys ( ) ; if ( ( deploymentNames . size ( ) ) > 0 ) { for ( String deploymentName : deploymentNames ) { <START_BUG> final ModelNode depNode = deployments . get ( uniqueName ) ; <END_BUG> final boolean regEx = ( depNode . hasDefined ( REGULAR_EXPRESSION ) ) ? depNode . get ( REGULAR_EXPRESSION ) . asBoolean ( ) : false ; writer . writeStartElement ( Element . DEPLOYMENT . getLocalName ( ) ) ; CommonXml . writeAttribute ( writer , NAME , deploymentName ) ; if ( regEx ) { CommonXml . writeAttribute ( writer , Attribute . REGULAR_EXPRESSION , "true" ) ; } writer . writeEndElement ( ) ; } } } writer . writeEndElement ( ) ; } writer . writeEndElement ( ) ; CommonXml . writeNewLine ( writer ) ; } } }

Fix:
final ModelNode depNode = deployments . get ( deploymentName ) ;