Buggy code:
public class InfinispanSubsystemXMLWriter implements XMLElementWriter < SubsystemMarshallingContext > { public static final XMLElementWriter < SubsystemMarshallingContext > INSTANCE = new InfinispanSubsystemXMLWriter ( ) ; @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { <START_BUG> context . startSubsystemElement ( CURRENT . getUri ( ) , false ) ; <END_BUG> ModelNode model = context . getModelNode ( ) ; if ( model . isDefined ( ) ) { if ( model . hasDefined ( WILDCARD_PATH . getKey ( ) ) ) { for ( Property entry : model . get ( WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { String containerName = entry . getName ( ) ; ModelNode container = entry . getValue ( ) ; writer . writeStartElement ( CACHE_CONTAINER . getLocalName ( ) ) ; writer . writeAttribute ( NAME . getLocalName ( ) , containerName ) ; DEFAULT_CACHE . marshallAsAttribute ( container , writer ) ; EVICTION_EXECUTOR . marshallAsAttribute ( container , writer ) ; JNDI_NAME . marshallAsAttribute ( container , writer ) ; LISTENER_EXECUTOR . marshallAsAttribute ( container , writer ) ; REPLICATION_QUEUE_EXECUTOR . marshallAsAttribute ( container , writer ) ; START . marshallAsAttribute ( container , writer ) ; MODULE . marshallAsAttribute ( container , writer ) ; STATISTICS_ENABLED . marshallAsAttribute ( container , writer ) ; ALIASES . marshallAsElement ( container , writer ) ; if ( container . hasDefined ( PATH . getKey ( ) ) ) { writer . writeStartElement ( TRANSPORT . getLocalName ( ) ) ; ModelNode transport = container . get ( PATH . getKeyValuePair ( ) ) ; STACK . marshallAsAttribute ( transport , false , writer ) ; CLUSTER . marshallAsAttribute ( transport , false , writer ) ; EXECUTOR . marshallAsAttribute ( transport , false , writer ) ; LOCK_TIMEOUT . marshallAsAttribute ( transport , false , writer ) ; writer . writeEndElement ( ) ; } if ( container . hasDefined ( LocalCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { for ( Property property : container . get ( LocalCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { ModelNode cache = property . getValue ( ) ; writer . writeStartElement ( LOCAL_CACHE . getLocalName ( ) ) ; InfinispanSubsystemXMLWriter . writeCacheAttributes ( writer , property . getName ( ) , cache ) ; InfinispanSubsystemXMLWriter . writeCacheElements ( writer , cache ) ; writer . writeEndElement ( ) ; } } if ( container . hasDefined ( InvalidationCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { for ( Property property : container . get ( InvalidationCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { ModelNode cache = property . getValue ( ) ; writer . writeStartElement ( INVALIDATION_CACHE . getLocalName ( ) ) ; InfinispanSubsystemXMLWriter . writeClusteredCacheAttributes ( writer , property . getName ( ) , cache ) ; InfinispanSubsystemXMLWriter . writeCacheElements ( writer , cache ) ; writer . writeEndElement ( ) ; } } if ( container . hasDefined ( ReplicatedCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { for ( Property property : container . get ( ReplicatedCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { ModelNode cache = property . getValue ( ) ; writer . writeStartElement ( REPLICATED_CACHE . getLocalName ( ) ) ; InfinispanSubsystemXMLWriter . writeClusteredCacheAttributes ( writer , property . getName ( ) , cache ) ; InfinispanSubsystemXMLWriter . writeCacheElements ( writer , cache ) ; writer . writeEndElement ( ) ; } } if ( container . hasDefined ( DistributedCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { for ( Property property : container . get ( DistributedCacheResourceDefinition . WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { ModelNode cache = property . getValue ( ) ; writer . writeStartElement ( DISTRIBUTED_CACHE . getLocalName ( ) ) ; InfinispanSubsystemXMLWriter . writeClusteredCacheAttributes ( writer , property . getName ( ) , cache ) ; OWNERS . marshallAsAttribute ( cache , writer ) ; SEGMENTS . marshallAsAttribute ( cache , writer ) ; L1_LIFESPAN . marshallAsAttribute ( cache , writer ) ; InfinispanSubsystemXMLWriter . writeCacheElements ( writer , cache ) ; writer . writeEndElement ( ) ; } } writer . writeEndElement ( ) ; } } } writer . writeEndElement ( ) ; } private static void writeCacheAttributes ( XMLExtendedStreamWriter writer , String name , ModelNode cache ) throws XMLStreamException { } private static void writeClusteredCacheAttributes ( XMLExtendedStreamWriter writer , String name , ModelNode cache ) throws XMLStreamException { } private static void writeCacheElements ( XMLExtendedStreamWriter writer , ModelNode cache ) throws XMLStreamException { } private static void writeJDBCStoreTable ( XMLExtendedStreamWriter writer , Element element , ModelNode store , String key ) throws XMLStreamException { } private static void writeJDBCStoreColumn ( XMLExtendedStreamWriter writer , Element element , ModelNode table , String key ) throws XMLStreamException { } private static void writeStoreAttributes ( XMLExtendedStreamWriter writer , ModelNode store ) throws XMLStreamException { } private static void writeJDBCStoreAttributes ( XMLExtendedStreamWriter writer , ModelNode store ) throws XMLStreamException { } private static void writeStoreElements ( XMLExtendedStreamWriter writer , ModelNode store ) throws XMLStreamException { } }

Fix:
context . startSubsystemElement ( CURRENT . getNamespaceUri ( ) , false ) ;