Buggy code:
public class ThreadsExtension implements Extension { private static final Logger log = Logger . getLogger ( "org.jboss.as.threads" ) ; private static String SUBSYSTEM_NAME = "threads" ; @ Override public void initialize ( final ExtensionContext context ) { } @ Override public void initializeParsers ( final ExtensionParsingContext context ) { } static final class NewThreadsSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { static final ThreadsExtension . NewThreadsSubsystemParser INSTANCE = new ThreadsExtension . NewThreadsSubsystemParser ( ) ; @ Override public void readElement ( final XMLExtendedStreamReader reader , final List < ModelNode > list ) throws XMLStreamException { } private void parseThreadFactory ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > list ) throws XMLStreamException { } void parseBoundedQueueThreadPool ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > list ) throws XMLStreamException { } void parseUnboundedQueueThreadPool ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > list ) throws XMLStreamException { } void parseScheduledThreadPool ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > list ) throws XMLStreamException { } void parseQueuelessThreadPool ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > list ) throws XMLStreamException { } private ModelNode parseScaledCount ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } private ModelNode parseTimeSpec ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } private String parseRef ( XMLExtendedStreamReader reader ) throws XMLStreamException { } private ModelNode parseProperties ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } @ Override public void writeContent ( final XMLExtendedStreamWriter writer , final SubsystemMarshallingContext context ) throws XMLStreamException { } private void writeThreadFactory ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeBoundedQueueThreadPool ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeQueuelessThreadPool ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { writer . writeStartElement ( QUEUELESS_THREAD_POOL . getLocalName ( ) ) ; if ( node . hasDefined ( CommonAttributes . NAME ) ) { <START_BUG> writeAttribute ( writer , BLOCKING , node . get ( CommonAttributes . NAME ) ) ; <END_BUG> } if ( node . hasDefined ( CommonAttributes . BLOCKING ) ) { writeAttribute ( writer , BLOCKING , node . get ( CommonAttributes . BLOCKING ) ) ; } writeRef ( writer , node , HANDOFF_EXECUTOR , CommonAttributes . HANDOFF_EXECUTOR ) ; writeRef ( writer , node , THREAD_FACTORY , CommonAttributes . THREAD_FACTORY ) ; writeThreads ( writer , node , MAX_THREADS ) ; writeTime ( writer , node , KEEPALIVE_TIME ) ; if ( node . hasDefined ( CommonAttributes . PROPERTIES ) ) { writeProperties ( writer , node . get ( CommonAttributes . PROPERTIES ) ) ; } writer . writeEndElement ( ) ; } private void writeScheduledQueueThreadPool ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeUnboundedQueueThreadPool ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeRef ( final XMLExtendedStreamWriter writer , final ModelNode node , Element element , String name ) throws XMLStreamException { } private void writeThreads ( final XMLExtendedStreamWriter writer , final ModelNode node , Element element ) throws XMLStreamException { } private void writeTime ( final XMLExtendedStreamWriter writer , final ModelNode node , Element element ) throws XMLStreamException { } private void writeProperties ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private void writeAttribute ( final XMLExtendedStreamWriter writer , final Attribute attr , final ModelNode value ) throws XMLStreamException { } } private static class ThreadsSubsystemDescribeHandler implements ModelQueryOperationHandler , DescriptionProvider { static final ThreadsExtension . ThreadsSubsystemDescribeHandler INSTANCE = new ThreadsExtension . ThreadsSubsystemDescribeHandler ( ) ; @ Override public OperationResult execute ( final OperationContext context , final ModelNode operation , final ResultHandler resultHandler ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } private void addBoundedQueueThreadPools ( final ModelNode result , final ModelNode model ) { } private void addQueuelessThreadPools ( final ModelNode result , final ModelNode model ) { } private void addThreadFactories ( final ModelNode result , final ModelNode model ) { } private void addScheduledThreadPools ( final ModelNode result , final ModelNode model ) { } private void addUnboundedQueueThreadPools ( final ModelNode result , final ModelNode model ) { } private ModelNode pathAddress ( PathElement ... elements ) { } } }

Fix:
writeAttribute ( writer , NAME , node . get ( CommonAttributes . NAME ) ) ;