Program: 20558
Project: 20558
Buggy source:
private void writeProperty(TypeModelImpl typeModel,JAXBProperty p,HashMap<String,String> prefixes){
  String name=p.name();
  if (name == null || name.length() == 0) {
    return;
  }
  PropertyModelImpl prop=null;
  String namespace=p.namespace;
  StructureType st=p.getStructureType();
  if (p instanceof JAXBAttributeProperty) {
    prop=new PropertyModelImpl(name,getType(p),p.required,true,st,namespace);
  }
 else   if (p instanceof JAXBValueProperty) {
    prop=new PropertyModelImpl(name,getType(p),p.required,false,st,namespace);
  }
 else   if (p instanceof JAXBElementProperty) {
    JAXBElementProperty el=(JAXBElementProperty)p;
    List<JAXBType> jaxbTypes=p.isGeneric() ? null : el.getJAXBTypes();
    if (jaxbTypes != null && !jaxbTypes.isEmpty()) {
      if (st == StructureType.MAP) {
        ArrayList<ISchemaType> list=new ArrayList<ISchemaType>();
        for (        JAXBType t : jaxbTypes) {
          list.add(generateType(t,StructureType.COMMON));
        }
        prop=new MapPropertyImpl(name,list,p.required,false,StructureType.MAP,namespace);
      }
 else {
        ISchemaType propertyType=generateType(jaxbTypes.get(0),st);
        prop=new PropertyModelImpl(name,propertyType,p.required,false,st,namespace);
      }
    }
 else {
      prop=new PropertyModelImpl(name,getType(p),p.required,false,st,namespace);
    }
  }
  if (prop != null) {
    prop.setGeneric(p.isGeneric());
    typeModel.addProperty(prop);
  }
}

Fixed version (ground truth):
private void writeProperty(TypeModelImpl typeModel,JAXBProperty p,HashMap<String,String> prefixes){
  String name=p.name();
  if (name == null || name.length() == 0) {
    return;
  }
  PropertyModelImpl prop=null;
  String namespace=p.namespace;
  StructureType st=p.getStructureType();
  if (p instanceof JAXBAttributeProperty) {
    if (((JAXBAttributeProperty)p).isAnyAttribute()) {
      ISchemaType strType=generateType(registry.getJAXBModel(new ReflectionType(String.class)),StructureType.COMMON);
      List<ISchemaType> list=Arrays.asList(strType,strType);
      prop=new MapPropertyImpl(name,list,p.required,true,namespace);
    }
 else {
      prop=new PropertyModelImpl(name,getType(p),p.required,true,st,namespace);
    }
  }
 else   if (p instanceof JAXBValueProperty) {
    prop=new PropertyModelImpl(name,getType(p),p.required,false,st,namespace);
  }
 else   if (p instanceof JAXBElementProperty) {
    JAXBElementProperty el=(JAXBElementProperty)p;
    List<JAXBType> jaxbTypes=p.isGeneric() ? null : el.getJAXBTypes();
    if (jaxbTypes != null && !jaxbTypes.isEmpty()) {
      if (st == StructureType.MAP) {
        ArrayList<ISchemaType> list=new ArrayList<ISchemaType>();
        for (        JAXBType t : jaxbTypes) {
          list.add(generateType(t,StructureType.COMMON));
        }
        prop=new MapPropertyImpl(name,list,p.required,false,namespace);
      }
 else {
        ISchemaType propertyType=generateType(jaxbTypes.get(0),st);
        prop=new PropertyModelImpl(name,propertyType,p.required,false,st,namespace);
      }
    }
 else {
      prop=new PropertyModelImpl(name,getType(p),p.required,false,st,namespace);
    }
  }
  if (prop != null) {
    prop.setGeneric(p.isGeneric());
    typeModel.addProperty(prop);
  }
}