Buggy code:
public abstract class CommonXml implements XMLElementReader < List < ModelNode > > , XMLElementWriter < ModelNode > { protected static final Set < String > RESTRICTED_PATHS ; protected final ModuleLoader moduleLoader ; protected CommonXml ( final ModuleLoader loader ) { } protected void parseNamespaces ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > nodes ) { } protected void readHeadComment ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > nodes ) throws XMLStreamException { } protected void readTailComment ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > nodes ) throws XMLStreamException { } protected void parseSchemaLocations ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updateList , final int idx ) throws XMLStreamException { } protected void writeSchemaLocation ( final XMLExtendedStreamWriter writer , final ModelNode modelNode ) throws XMLStreamException { } protected void writeNamespaces ( final XMLExtendedStreamWriter writer , final ModelNode modelNode ) throws XMLStreamException { } protected void writeExtensions ( final XMLExtendedStreamWriter writer , final ModelNode modelNode ) throws XMLStreamException { } protected void writePaths ( final XMLExtendedStreamWriter writer , final ModelNode node ) throws XMLStreamException { } protected void parseExtensions ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { ParseUtils . requireNoAttributes ( reader ) ; final Set < String > found = new HashSet < String > ( ) ; final ExtensionParsingContextImpl context = new ExtensionParsingContextImpl ( reader . getXMLMapper ( ) ) ; <START_BUG> while ( ( reader . nextTag ( ) ) != ( XMLStreamConstants . END_ELEMENT ) ) { <END_BUG> final String moduleName = ParseUtils . readStringAttributeElement ( reader , MODULE . getLocalName ( ) ) ; if ( ! ( found . add ( moduleName ) ) ) { throw ParseUtils . invalidAttributeValue ( reader , 0 ) ; } try { final Module module = moduleLoader . loadModule ( ModuleIdentifier . fromString ( moduleName ) ) ; boolean initialized = false ; for ( final NewExtension extension : module . loadService ( NewExtension . class ) ) { extension . initializeParsers ( context ) ; if ( ! initialized ) { initialized = true ; } } if ( ! initialized ) { throw new IllegalStateException ( ( ( ( "No<seq2seq4repair_space>META-INF//services//" + ( NewExtension . class . getName ( ) ) ) + "<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>" ) + ( module . getIdentifier ( ) ) ) ) ; } final ModelNode add = new ModelNode ( ) ; add . get ( OP_ADDR ) . set ( address ) . add ( EXTENSION , moduleName ) ; add . get ( OP ) . set ( ADD ) ; list . add ( add ) ; } catch ( final ModuleLoadException e ) { throw new XMLStreamException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>module" , e ) ; } } } protected void parsePaths ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list , final boolean requirePath ) throws XMLStreamException { } protected void parsePath ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list , final boolean requirePath , final Set < String > defined ) throws XMLStreamException { } protected ModelNode parseProperties ( final XMLExtendedStreamReader reader ) throws XMLStreamException { } protected void parseManagementSocket ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > list ) throws XMLStreamException { } protected void parseJvm ( final XMLExtendedStreamReader reader , final ModelNode parentAddress , final List < ModelNode > updates , final Set < String > jvmNames ) throws XMLStreamException { } private void parseHeap ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parsePermgen ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseStack ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseAgentLib ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseAgentPath ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseJavaagent ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private void parseJvmOptions ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } protected void parseInterfaceCriteria ( final XMLExtendedStreamReader reader , final ModelNode criteria ) throws XMLStreamException { } protected void parseCompoundInterfaceCriterion ( final XMLExtendedStreamReader reader , final ModelNode criterion ) throws XMLStreamException { } protected void parseSimpleInterfaceCriterion ( final XMLExtendedStreamReader reader , final ModelNode criteria ) throws XMLStreamException { } protected void parseInterfaces ( final XMLExtendedStreamReader reader , final Set < String > names , final ModelNode address , final List < ModelNode > list , final boolean checkSpecified ) throws XMLStreamException { } protected void parseSocketBindingGroupRef ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } protected String parseSocketBinding ( final XMLExtendedStreamReader reader , final Set < String > interfaces , final ModelNode address , final String inheritedInterfaceName , final List < ModelNode > updates ) throws XMLStreamException { } }

Fix:
while ( ( reader . hasNext ( ) ) && ( ( reader . nextTag ( ) ) != ( XMLStreamConstants . END_ELEMENT ) ) ) {