Buggy code:
public class NewThreadsExtension implements NewExtension { @ Override public void initialize ( final NewExtensionContext context ) { } @ Override public void initializeParsers ( final ExtensionParsingContext context ) { } static final class NewThreadsSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { static final NewThreadsExtension . NewThreadsSubsystemParser INSTANCE = new NewThreadsExtension . 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 ScaledCount parseScaledCount ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } private TimeSpec parseTimeSpec ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } private String parseRef ( XMLExtendedStreamReader reader ) throws XMLStreamException { } private Map < String , String > 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 { } 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 , String count , String perCpu ) throws XMLStreamException { } private void writeTime ( final XMLExtendedStreamWriter writer , final ModelNode node , Element element , String time , String unit ) throws XMLStreamException { } private void writeProperties ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } private boolean has ( ModelNode node , String name ) { <START_BUG> return ( node . has ( name ) ) && ( ( node . get ( name ) ) != null ) ; <END_BUG> } private void writeAttribute ( final XMLExtendedStreamWriter writer , final Attribute attr , final ModelNode value ) throws XMLStreamException { } } }

Fix:
return ( node . has ( name ) ) && ( node . get ( name ) . isDefined ( ) ) ;