Program: 20560
Project: 20560
Buggy source:
@Override public void processProperty(ISchemaType type,ISchemaProperty prop,ISerializationNode childNode,Set<String> processedTypes){
  ISchemaType propType=prop.getType();
  if (prop.isAttribute()) {
    this.element.setAttribute(type.getQualifiedPropertyName(prop),DefaultValueFactory.getDefaultValue(prop).toString());
    return;
  }
 else {
    if (prop.getStructureType() == StructureType.MAP) {
      ISchemaType keyType=SimpleType.STRING;
      ISchemaType valueType=new TypeModelImpl("String_Node_Str","String_Node_Str",null,StructureType.COMMON);
      if (prop instanceof IMapSchemaProperty) {
        IMapSchemaProperty msp=(IMapSchemaProperty)prop;
        keyType=msp.getKeyType();
        valueType=msp.getValueType();
      }
      String name=getPropertyName(type,prop);
      Element mapElement=document.createElement(name);
      if (this.element != null) {
        this.element.appendChild(mapElement);
      }
 else {
        this.document.appendChild(mapElement);
      }
      Element entryElement=this.document.createElement("String_Node_Str");
      mapElement.appendChild(entryElement);
      if (keyType != null && keyType.isSimple()) {
        Element keyElement=this.document.createElement("String_Node_Str");
        keyElement.setTextContent(DefaultValueFactory.getDefaultValue(keyType).toString());
        entryElement.appendChild(keyElement);
      }
 else {
        Node keyNode=new Node("String_Node_Str",this.document);
        String qName=keyType.getClassQualifiedName();
        if (!processedTypes.contains(qName)) {
          processedTypes.add(qName);
          XMLModelSerializer.this.process(keyType,keyNode,processedTypes);
          processedTypes.remove(qName);
        }
        entryElement.appendChild(keyNode.element);
      }
      if (valueType != null && valueType.isSimple()) {
        Element valueElement=this.document.createElement("String_Node_Str");
        valueElement.setTextContent(DefaultValueFactory.getDefaultValue(valueType).toString());
        entryElement.appendChild(valueElement);
      }
 else {
        Node valueNode=new Node("String_Node_Str",this.document);
        String qName=valueType.getClassQualifiedName();
        if (!processedTypes.contains(qName)) {
          processedTypes.add(qName);
          XMLModelSerializer.this.process(valueType,valueNode,processedTypes);
          processedTypes.remove(qName);
        }
        entryElement.appendChild(valueNode.element);
      }
    }
 else {
      Element childElement=((Node)childNode).element;
      if (propType != null && propType.isSimple() || prop.isGeneric()) {
        childElement.setTextContent(DefaultValueFactory.getDefaultValue(prop).toString());
      }
      this.element.appendChild(childElement);
      if (prop.getStructureType() == StructureType.COLLECTION) {
        this.element.appendChild(childElement.cloneNode(true));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void processProperty(ISchemaType type,ISchemaProperty prop,ISerializationNode childNode,Set<String> processedTypes){
  ISchemaType propType=prop.getType();
  if (prop.isAttribute()) {
    String propName=type.getQualifiedPropertyName(prop);
    if (prop.getStructureType() == StructureType.MAP) {
      String defaultValue=DefaultValueFactory.DEFAULT_STRING_VALUE;
      this.element.setAttribute(propName + "String_Node_Str",defaultValue + "String_Node_Str");
      this.element.setAttribute(propName + "String_Node_Str",defaultValue + "String_Node_Str");
    }
 else {
      String defaultValue=DefaultValueFactory.getDefaultValue(prop).toString();
      this.element.setAttribute(propName,defaultValue);
    }
    return;
  }
 else {
    if (prop.getStructureType() == StructureType.MAP) {
      ISchemaType keyType=SimpleType.STRING;
      ISchemaType valueType=new TypeModelImpl("String_Node_Str","String_Node_Str",null,StructureType.COMMON);
      if (prop instanceof IMapSchemaProperty) {
        IMapSchemaProperty msp=(IMapSchemaProperty)prop;
        keyType=msp.getKeyType();
        valueType=msp.getValueType();
      }
      String name=getPropertyName(type,prop);
      Element mapElement=document.createElement(name);
      if (this.element != null) {
        this.element.appendChild(mapElement);
      }
 else {
        this.document.appendChild(mapElement);
      }
      Element entryElement=this.document.createElement("String_Node_Str");
      mapElement.appendChild(entryElement);
      if (keyType != null && keyType.isSimple()) {
        Element keyElement=this.document.createElement("String_Node_Str");
        keyElement.setTextContent(DefaultValueFactory.getDefaultValue(keyType).toString());
        entryElement.appendChild(keyElement);
      }
 else {
        Node keyNode=new Node("String_Node_Str",this.document);
        String qName=keyType.getClassQualifiedName();
        if (!processedTypes.contains(qName)) {
          processedTypes.add(qName);
          XMLModelSerializer.this.process(keyType,keyNode,processedTypes);
          processedTypes.remove(qName);
        }
        entryElement.appendChild(keyNode.element);
      }
      if (valueType != null && valueType.isSimple()) {
        Element valueElement=this.document.createElement("String_Node_Str");
        valueElement.setTextContent(DefaultValueFactory.getDefaultValue(valueType).toString());
        entryElement.appendChild(valueElement);
      }
 else {
        Node valueNode=new Node("String_Node_Str",this.document);
        String qName=valueType.getClassQualifiedName();
        if (!processedTypes.contains(qName)) {
          processedTypes.add(qName);
          XMLModelSerializer.this.process(valueType,valueNode,processedTypes);
          processedTypes.remove(qName);
        }
        entryElement.appendChild(valueNode.element);
      }
    }
 else {
      Element childElement=((Node)childNode).element;
      if (propType != null && propType.isSimple() || prop.isGeneric()) {
        childElement.setTextContent(DefaultValueFactory.getDefaultValue(prop).toString());
      }
      this.element.appendChild(childElement);
      if (prop.getStructureType() == StructureType.COLLECTION) {
        this.element.appendChild(childElement.cloneNode(true));
      }
    }
  }
}