Buggy code:
public class DomainXml extends CommonXml { private final ExtensionXml extensionXml ; private final ExtensionRegistry extensionRegistry ; public DomainXml ( final ModuleLoader loader , ExecutorService executorService , ExtensionRegistry extensionRegistry ) { } @ Override public void readElement ( final XMLExtendedStreamReader reader , final List < ModelNode > nodes ) throws XMLStreamException { } @ Override public void writeContent ( final XMLExtendedStreamWriter writer , final ModelMarshallingContext context ) throws XMLStreamException { ModelNode modelNode = context . getModelNode ( ) ; writer . writeStartDocument ( ) ; writer . writeStartElement ( DOMAIN . getLocalName ( ) ) ; writer . writeDefaultNamespace ( CURRENT . getUriString ( ) ) ; writeNamespaces ( writer , modelNode ) ; writeSchemaLocation ( writer , modelNode ) ; NAME . marshallAsAttribute ( modelNode , false , writer ) ; writeNewLine ( writer ) ; if ( modelNode . hasDefined ( EXTENSION ) ) { extensionXml . writeExtensions ( writer , modelNode . get ( EXTENSION ) ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( SYSTEM_PROPERTY ) ) { writeProperties ( writer , modelNode . get ( SYSTEM_PROPERTY ) , SYSTEM_PROPERTIES , false ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( PATH ) ) { <START_BUG> writePaths ( writer , modelNode . get ( PATH ) ) ; <END_BUG> writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( PROFILE ) ) { writer . writeStartElement ( PROFILES . getLocalName ( ) ) ; for ( final Property profile : modelNode . get ( PROFILE ) . asPropertyList ( ) ) { writeProfile ( writer , profile . getName ( ) , profile . getValue ( ) , context ) ; } writer . writeEndElement ( ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( INTERFACE ) ) { writeInterfaces ( writer , modelNode . get ( INTERFACE ) ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( SOCKET_BINDING_GROUP ) ) { writer . writeStartElement ( SOCKET_BINDING_GROUPS . getLocalName ( ) ) ; for ( final Property property : modelNode . get ( SOCKET_BINDING_GROUP ) . asPropertyList ( ) ) { writeSocketBindingGroup ( writer , property . getValue ( ) , false ) ; } writer . writeEndElement ( ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( DEPLOYMENT ) ) { writeDomainDeployments ( writer , modelNode . get ( DEPLOYMENT ) ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( DEPLOYMENT_OVERLAY ) ) { writeDeploymentOverlays ( writer , modelNode . get ( DEPLOYMENT_OVERLAY ) ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( SERVER_GROUP ) ) { writer . writeStartElement ( SERVER_GROUPS . getLocalName ( ) ) ; for ( final Property property : modelNode . get ( SERVER_GROUP ) . asPropertyList ( ) ) { writeServerGroup ( writer , property . getName ( ) , property . getValue ( ) ) ; } writer . writeEndElement ( ) ; writeNewLine ( writer ) ; } if ( modelNode . hasDefined ( MANAGEMENT_CLIENT_CONTENT ) ) { writeManagementClientContent ( writer , modelNode . get ( MANAGEMENT_CLIENT_CONTENT ) ) ; writeNewLine ( writer ) ; } writer . writeEndElement ( ) ; writeNewLine ( writer ) ; writer . writeEndDocument ( ) ; } void readDomainElement1_0 ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } void readDomainElement1_1 ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } void readDomainElement1_3 ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } void readDomainElement1_4 ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } protected void readDomainElementAttributes_1_0 ( XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > list ) throws XMLStreamException { } protected void readDomainElementAttributes_1_1 ( XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > list ) throws XMLStreamException { } protected void readDomainElementAttributes_1_3 ( XMLExtendedStreamReader reader , Namespace expectedNs , ModelNode address , List < ModelNode > list ) throws XMLStreamException { } void parseDomainSocketBindingGroups ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list , final Set < String > interfaces ) throws XMLStreamException { } void parseSocketBindingGroup_1_0 ( final XMLExtendedStreamReader reader , final Set < String > interfaces , final ModelNode address , final Namespace expectedNs , final List < ModelNode > updates ) throws XMLStreamException { } void parseSocketBindingGroup_1_1 ( final XMLExtendedStreamReader reader , final Set < String > interfaces , final ModelNode address , final Namespace expectedNs , final List < ModelNode > updates ) throws XMLStreamException { } void parseServerGroups ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } void parseProfiles ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > list ) throws XMLStreamException { } void parseSubsystemManagementEndpoint ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } private void parseManagementClientContent ( XMLExtendedStreamReader reader , ModelNode address , Namespace expectedNs , List < ModelNode > list ) throws XMLStreamException { } private void parseRolloutPlans ( XMLExtendedStreamReader reader , ModelNode address , List < ModelNode > list ) throws XMLStreamException { } private void initializeRolloutPlans ( ModelNode address , List < ModelNode > list ) { } private void writeProfile ( final XMLExtendedStreamWriter writer , final String profileName , final ModelNode profileNode , final ModelMarshallingContext context ) throws XMLStreamException { }

Fix:
writePaths ( writer , modelNode . get ( PATH ) , true ) ;