Buggy code:
if ( ! ( jvmNames . add ( value ) ) ) { throw MESSAGES . duplicateDeclaration ( "JVM" , value , reader . getLocation ( ) ) ; } name = value ; break ; } case JAVA_HOME : { if ( home != null ) throw ParseUtils . duplicateAttribute ( reader , attribute . getLocalName ( ) ) ; home = value ; final ModelNode update = Util . getWriteAttributeOperation ( null , JVM_JAVA_HOME , home ) ; attrUpdates . add ( update ) ; break ; } case TYPE : { try { Enum . valueOf ( JvmType . class , value ) ; type = value ; } catch ( final IllegalArgumentException e ) { throw ParseUtils . invalidAttributeValue ( reader , i ) ; } break ; } case DEBUG_ENABLED : { if ( ! server ) { throw ParseUtils . unexpectedAttribute ( reader , i ) ; } if ( debugEnabled != null ) { throw ParseUtils . duplicateAttribute ( reader , attribute . getLocalName ( ) ) ; } debugEnabled = Boolean . valueOf ( value ) ; final ModelNode update = Util . getWriteAttributeOperation ( null , JVM_DEBUG_ENABLED , debugEnabled ) ; attrUpdates . add ( update ) ; break ; } case DEBUG_OPTIONS : { if ( ! server ) { throw ParseUtils . unexpectedAttribute ( reader , i ) ; } if ( debugOptions != null ) { throw ParseUtils . duplicateAttribute ( reader , attribute . getLocalName ( ) ) ; } debugOptions = value ; final ModelNode update = Util . getWriteAttributeOperation ( null , JVM_DEBUG_OPTIONS , debugOptions ) ; attrUpdates . add ( update ) ; break ; } case ENV_CLASSPATH_IGNORED : { if ( envClasspathIgnored != null ) throw ParseUtils . duplicateAttribute ( reader , attribute . getLocalName ( ) ) ; envClasspathIgnored = Boolean . valueOf ( value ) ; final ModelNode update = Util . getWriteAttributeOperation ( null , JVM_ENV_CLASSPATH_IGNORED , envClasspathIgnored ) ; attrUpdates . add ( update ) ; break ; } default : throw ParseUtils . unexpectedAttribute ( reader , i ) ; } } } if ( name == null ) { throw ParseUtils . missingRequired ( reader , Collections . singleton ( NAME ) ) ; } if ( ( ( debugEnabled != null ) && ( debugOptions == null ) ) && ( debugEnabled . booleanValue ( ) ) ) { throw ParseUtils . missingRequired ( reader , EnumSet . of ( DEBUG_OPTIONS ) ) ; } final ModelNode address = parentAddress . clone ( ) ; address . add ( JVM , name ) ; final ModelNode addUpdate = Util . getEmptyOperation ( ADD , address ) ; if ( type != null ) addUpdate . get ( JVM_TYPE ) . set ( type ) ; updates . add ( addUpdate ) ; for ( final ModelNode attrUpdate : attrUpdates ) { attrUpdate . get ( OP_ADDR ) . set ( address ) ; updates . add ( attrUpdate ) ; } boolean hasJvmOptions = false ; boolean hasEnvironmentVariables = false ; while ( ( reader . hasNext ( ) ) && ( ( reader . nextTag ( ) ) != ( XMLStreamConstants . END_ELEMENT ) ) ) { requireNamespace ( reader , expectedNs ) ; final Element element = Element . forName ( reader . getLocalName ( ) ) ; switch ( element ) { case HEAP : { JvmXml . parseHeap ( reader , address , updates ) ; break ; } case PERMGEN : { JvmXml . parsePermgen ( reader , address , updates ) ; break ; } case STACK : { JvmXml . parseStack ( reader , address , updates ) ; break ; } case AGENT_LIB : { JvmXml . parseAgentLib ( reader , address , updates ) ; break ; } case AGENT_PATH : { JvmXml . parseAgentPath ( reader , address , updates ) ; break ; } case JAVA_AGENT : { JvmXml . parseJavaagent ( reader , address , updates ) ; break ; } case ENVIRONMENT_VARIABLES : { if ( hasEnvironmentVariables ) { throw MESSAGES . alreadyDefined ( element . getLocalName ( ) , reader . getLocation ( ) ) ; } <START_BUG> updates . add ( Util . getWriteAttributeOperation ( address , JVM_ENV_VARIABLES , CommonXml . parseProperties ( reader , expectedNs ) ) ) ; <END_BUG> hasEnvironmentVariables = true ; break ; } case JVM_OPTIONS : { if ( hasJvmOptions ) { throw MESSAGES . alreadyDefined ( element . getLocalName ( ) , reader . getLocation ( ) ) ; } JvmXml . parseJvmOptions ( reader , address , expectedNs , updates ) ; hasJvmOptions = true ; break ; } default : throw unexpectedElement ( reader ) ; } } } private static void parseHeap ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parsePermgen ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parseStack ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parseAgentLib ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parseAgentPath ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parseJavaagent ( final XMLExtendedStreamReader reader , final ModelNode address , final List < ModelNode > updates ) throws XMLStreamException { } private static void parseJvmOptions ( final XMLExtendedStreamReader reader , final ModelNode address , final Namespace expectedNs , final List < ModelNode > updates ) throws XMLStreamException { } public static void writeJVMElement ( final XMLExtendedStreamWriter writer , final String jvmName , final ModelNode jvmElement ) throws XMLStreamException { } }

Fix:
updates . add ( Util . getWriteAttributeOperation ( address , JVM_ENV_VARIABLES , CommonXml . parseEnvironmentVariables ( reader , expectedNs ) ) ) ;