Program: 67189
Project: 67189
Buggy source:
/** 
 * Process a given XMLCompositeDirectCollectionMapping.
 * @param mapping
 * @param seq
 * @param ct
 * @param workingSchema
 */
protected void processXMLCompositeDirectCollectionMapping(XMLCompositeDirectCollectionMapping mapping,Sequence seq,ComplexType ct,HashMap<String,Schema> schemaForNamespace,Schema workingSchema,SchemaModelGeneratorProperties properties){
  XMLField field=((XMLField)(mapping).getField());
  XPathFragment frag=field.getXPathFragment();
  seq=buildSchemaComponentsForXPath(frag,seq,schemaForNamespace,workingSchema,properties);
  frag=getTargetXPathFragment(frag);
  String schemaTypeString=getSchemaTypeForElement(field,mapping.getAttributeElementClass(),workingSchema);
  Element element=null;
  if (field.usesSingleNode()) {
    SimpleType st=new SimpleType();
    org.eclipse.persistence.internal.oxm.schema.model.List list=new org.eclipse.persistence.internal.oxm.schema.model.List();
    if (schemaTypeString == null) {
      schemaTypeString=getSchemaTypeString(XMLConstants.ANY_SIMPLE_TYPE_QNAME,workingSchema);
    }
    list.setItemType(schemaTypeString);
    st.setList(list);
    element=buildElement(field.getXPathFragment(),null,Occurs.ZERO,null);
    element.setSimpleType(st);
  }
 else {
    if (frag.getNamespaceURI() != null) {
      element=handleFragNamespace(frag,schemaForNamespace,workingSchema,properties,element,schemaTypeString);
      element.setMaxOccurs(Occurs.UNBOUNDED);
    }
 else {
      element=buildElement(frag,schemaTypeString,Occurs.ZERO,Occurs.UNBOUNDED);
    }
  }
  seq.addElement(element);
}

Fixed version (ground truth):
/** 
 * Process a given XMLCompositeDirectCollectionMapping.
 * @param mapping
 * @param seq
 * @param ct
 * @param workingSchema
 */
protected void processXMLCompositeDirectCollectionMapping(XMLCompositeDirectCollectionMapping mapping,Sequence seq,ComplexType ct,HashMap<String,Schema> schemaForNamespace,Schema workingSchema,SchemaModelGeneratorProperties properties){
  XMLField field=((XMLField)(mapping).getField());
  XPathFragment frag=field.getXPathFragment();
  seq=buildSchemaComponentsForXPath(frag,seq,schemaForNamespace,workingSchema,properties);
  frag=getTargetXPathFragment(frag);
  String schemaTypeString=getSchemaTypeForElement(field,mapping.getAttributeElementClass(),workingSchema);
  Element element=null;
  if (field.usesSingleNode()) {
    SimpleType st=new SimpleType();
    org.eclipse.persistence.internal.oxm.schema.model.List list=new org.eclipse.persistence.internal.oxm.schema.model.List();
    if (schemaTypeString == null) {
      schemaTypeString=getSchemaTypeString(XMLConstants.ANY_SIMPLE_TYPE_QNAME,workingSchema);
    }
    list.setItemType(schemaTypeString);
    st.setList(list);
    element=buildElement(field.getXPathFragment(),null,Occurs.ZERO,null);
    element.setSimpleType(st);
  }
 else {
    if (frag.getNamespaceURI() != null) {
      element=handleFragNamespace(frag,schemaForNamespace,workingSchema,properties,element,schemaTypeString);
      element.setMaxOccurs(Occurs.UNBOUNDED);
    }
 else {
      element=buildElement(frag,schemaTypeString,Occurs.ZERO,Occurs.UNBOUNDED);
    }
  }
  if (mapping.getNullPolicy().isNullRepresentedByXsiNil()) {
    element.setNillable(true);
  }
  seq.addElement(element);
}