Program: 167902
Project: 167902
Buggy source:
private void parseServer(final XMLExtendedStreamReader reader,final ModelNode parentAddress,final List<ModelNode> list,final Set<String> serverNames) throws XMLStreamException {
  String name=null;
  String group=null;
  Boolean start=null;
  final int count=reader.getAttributeCount();
  for (int i=0; i < count; i++) {
    final String value=reader.getAttributeValue(i);
    if (!isNoNamespaceAttribute(reader,i)) {
      throw unexpectedAttribute(reader,i);
    }
 else {
      final Attribute attribute=Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case NAME:
{
          if (!serverNames.add(value)) {
            throw new XMLStreamException("String_Node_Str" + value,reader.getLocation());
          }
          name=value;
          break;
        }
case GROUP:
{
        group=value;
        break;
      }
case AUTO_START:
{
      start=Boolean.valueOf(value);
      break;
    }
default :
  throw unexpectedAttribute(reader,i);
}
}
}
if (name == null) {
throw ParseUtils.missingRequired(reader,Collections.singleton(Attribute.NAME));
}
if (group == null) {
throw ParseUtils.missingRequired(reader,Collections.singleton(Attribute.GROUP));
}
final ModelNode address=parentAddress.clone().add(SERVER_CONFIG,name);
final ModelNode addUpdate=Util.getEmptyOperation(ADD,address);
addUpdate.get(GROUP).set(group);
if (start != null) {
addUpdate.get(AUTO_START).set(start.booleanValue());
}
list.add(addUpdate);
boolean sawJvm=false;
boolean sawSystemProperties=false;
boolean sawSocketBinding=false;
final Set<String> interfaceNames=new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
final Element element=Element.forName(reader.getLocalName());
switch (element) {
case INTERFACE_SPECS:
{
parseInterfaces(reader,interfaceNames,address,list,true);
break;
}
case JVM:
{
if (sawJvm) {
throw new XMLStreamException(element.getLocalName() + "String_Node_Str",reader.getLocation());
}
parseJvm(reader,address,list,new HashSet<String>());
sawJvm=true;
break;
}
case PATHS:
{
parsePaths(reader,address,list,true);
break;
}
case SOCKET_BINDING_GROUP:
{
if (sawSocketBinding) {
throw new XMLStreamException(element.getLocalName() + "String_Node_Str",reader.getLocation());
}
parseSocketBindingGroupRef(reader,address,list);
sawSocketBinding=true;
break;
}
case SYSTEM_PROPERTIES:
{
if (sawSystemProperties) {
throw new XMLStreamException(element.getLocalName() + "String_Node_Str",reader.getLocation());
}
parseSystemProperties(reader,address,list,false);
sawSystemProperties=true;
break;
}
default :
throw unexpectedElement(reader);
}
}
}

Fixed version (ground truth):
private void parseServer(final XMLExtendedStreamReader reader,final ModelNode parentAddress,final List<ModelNode> list,final Set<String> serverNames) throws XMLStreamException {
  String name=null;
  String group=null;
  Boolean start=null;
  final int count=reader.getAttributeCount();
  for (int i=0; i < count; i++) {
    final String value=reader.getAttributeValue(i);
    if (!isNoNamespaceAttribute(reader,i)) {
      throw unexpectedAttribute(reader,i);
    }
 else {
      final Attribute attribute=Attribute.forName(reader.getAttributeLocalName(i));
switch (attribute) {
case NAME:
{
          if (!serverNames.add(value)) {
            throw new XMLStreamException("String_Node_Str" + value,reader.getLocation());
          }
          name=value;
          break;
        }
case GROUP:
{
        group=value;
        break;
      }
case AUTO_START:
{
      start=Boolean.valueOf(value);
      break;
    }
default :
  throw unexpectedAttribute(reader,i);
}
}
}
if (name == null) {
throw ParseUtils.missingRequired(reader,Collections.singleton(Attribute.NAME));
}
if (group == null) {
throw ParseUtils.missingRequired(reader,Collections.singleton(Attribute.GROUP));
}
final ModelNode address=parentAddress.clone().add(SERVER_CONFIG,name);
final ModelNode addUpdate=Util.getEmptyOperation(ADD,address);
addUpdate.get(GROUP).set(group);
if (start != null) {
addUpdate.get(AUTO_START).set(start.booleanValue());
}
list.add(addUpdate);
boolean sawJvm=false;
boolean sawSystemProperties=false;
boolean sawSocketBinding=false;
final Set<String> interfaceNames=new HashSet<String>();
while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
final Element element=Element.forName(reader.getLocalName());
switch (element) {
case INTERFACE_SPECS:
{
parseInterfaces(reader,interfaceNames,address,list,true);
break;
}
case JVM:
{
if (sawJvm) {
throw new XMLStreamException(element.getLocalName() + "String_Node_Str",reader.getLocation());
}
parseJvm(reader,address,list,new HashSet<String>(),true);
sawJvm=true;
break;
}
case PATHS:
{
parsePaths(reader,address,list,true);
break;
}
case SOCKET_BINDING_GROUP:
{
if (sawSocketBinding) {
throw new XMLStreamException(element.getLocalName() + "String_Node_Str",reader.getLocation());
}
parseSocketBindingGroupRef(reader,address,list);
sawSocketBinding=true;
break;
}
case SYSTEM_PROPERTIES:
{
if (sawSystemProperties) {
throw new XMLStreamException(element.getLocalName() + "String_Node_Str",reader.getLocation());
}
parseSystemProperties(reader,address,list,false);
sawSystemProperties=true;
break;
}
default :
throw unexpectedElement(reader);
}
}
}