Program: 167973
Project: 167973
Buggy source:
private void readServerElement(final XMLExtendedStreamReader reader,final ModelNode address,final List<ModelNode> list) throws XMLStreamException {
  parseNamespaces(reader,address,list);
  final int count=reader.getAttributeCount();
  for (int i=0; i < count; i++) {
switch (Namespace.forUri(reader.getAttributeNamespace(i))) {
case NONE:
{
        final String value=reader.getAttributeValue(i);
        final Attribute attribute=Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case NAME:
{
            setServerName(address,list,value);
            break;
          }
default :
        throw unexpectedAttribute(reader,i);
    }
    break;
  }
case XML_SCHEMA_INSTANCE:
{
switch (Attribute.forName(reader.getAttributeLocalName(i))) {
case SCHEMA_LOCATION:
{
      parseSchemaLocations(reader,address,list,i);
      break;
    }
case NO_NAMESPACE_SCHEMA_LOCATION:
{
    break;
  }
default :
{
  throw unexpectedAttribute(reader,i);
}
}
break;
}
default :
throw unexpectedAttribute(reader,i);
}
}
Element element=nextElement(reader);
if (element == Element.EXTENSIONS) {
parseExtensions(reader,address,list);
element=nextElement(reader);
}
if (element == Element.PATHS) {
parsePaths(reader,address,list,true);
element=nextElement(reader);
}
if (element == Element.MANAGEMENT) {
parseManagementSocket(reader,address,list);
element=nextElement(reader);
}
if (element == Element.PROFILE) {
parseServerProfile(reader,list);
element=nextElement(reader);
}
final Set<String> interfaceNames=new HashSet<String>();
if (element == Element.INTERFACES) {
parseInterfaces(reader,interfaceNames,address,list,true);
element=nextElement(reader);
}
if (element == Element.SOCKET_BINDING_GROUP) {
parseSocketBindingGroup(reader,interfaceNames,address,list,false);
element=nextElement(reader);
}
if (element == Element.SYSTEM_PROPERTIES) {
list.add(getWriteAttributeOperation(address,"String_Node_Str",parseProperties(reader)));
element=nextElement(reader);
}
if (element == Element.DEPLOYMENTS) {
parseServerDeployments(reader,list);
element=nextElement(reader);
}
if (element != null) {
throw unexpectedElement(reader);
}
for (; ; ) {
switch (reader.nextTag()) {
case START_ELEMENT:
{
readHeadComment(reader,address,list);
if (Namespace.forUri(reader.getNamespaceURI()) != Namespace.DOMAIN_1_0) {
throw unexpectedElement(reader);
}
switch (Element.forName(reader.getLocalName())) {
default :
throw unexpectedElement(reader);
}
}
case END_ELEMENT:
{
readTailComment(reader,address,list);
return;
}
default :
throw new IllegalStateException();
}
}
}

Fixed version (ground truth):
private void readServerElement(final XMLExtendedStreamReader reader,final ModelNode address,final List<ModelNode> list) throws XMLStreamException {
  parseNamespaces(reader,address,list);
  final int count=reader.getAttributeCount();
  for (int i=0; i < count; i++) {
switch (Namespace.forUri(reader.getAttributeNamespace(i))) {
case NONE:
{
        final String value=reader.getAttributeValue(i);
        final Attribute attribute=Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case NAME:
{
            setServerName(address,list,value);
            break;
          }
default :
        throw unexpectedAttribute(reader,i);
    }
    break;
  }
case XML_SCHEMA_INSTANCE:
{
switch (Attribute.forName(reader.getAttributeLocalName(i))) {
case SCHEMA_LOCATION:
{
      parseSchemaLocations(reader,address,list,i);
      break;
    }
case NO_NAMESPACE_SCHEMA_LOCATION:
{
    break;
  }
default :
{
  throw unexpectedAttribute(reader,i);
}
}
break;
}
default :
throw unexpectedAttribute(reader,i);
}
}
Element element=nextElement(reader);
if (element == Element.EXTENSIONS) {
parseExtensions(reader,address,list);
element=nextElement(reader);
}
if (element == Element.PATHS) {
parsePaths(reader,address,list,true);
element=nextElement(reader);
}
if (element == Element.MANAGEMENT) {
parseManagementSocket(reader,address,list);
element=nextElement(reader);
}
if (element == Element.PROFILE) {
parseServerProfile(reader,list);
element=nextElement(reader);
}
final Set<String> interfaceNames=new HashSet<String>();
if (element == Element.INTERFACES) {
parseInterfaces(reader,interfaceNames,address,list,true);
element=nextElement(reader);
}
if (element == Element.SOCKET_BINDING_GROUP) {
parseSocketBindingGroup(reader,interfaceNames,address,list,false);
element=nextElement(reader);
}
if (element == Element.SYSTEM_PROPERTIES) {
list.add(getWriteAttributeOperation(address,"String_Node_Str",parseProperties(reader)));
element=nextElement(reader);
}
if (element == Element.DEPLOYMENTS) {
parseServerDeployments(reader,list);
element=nextElement(reader);
}
if (element != null) {
throw unexpectedElement(reader);
}
}