Program: 67465
Project: 67465
Buggy source:
/** 
 * Generates a Map of EclipseLink schema model Schema objects for a given list of XMLDescriptors. The descriptors are assumed to have been initialized.  One Schema  object will be generated  per namespace.
 * @param descriptorsToProcess list of XMLDescriptors which will be used to generate Schema objects
 * @param properties holds a namespace to Properties map containing schema settings, such as elementFormDefault 
 * @return a map of namespaces to EclipseLink schema model Schema objects
 * @throws DescriptorException if the reference descriptor for a composite mapping is not in the list of descriptors
 * @see Schema
 */
public Map<String,Schema> generateSchemas(List<XMLDescriptor> descriptorsToProcess,SchemaModelGeneratorProperties properties,SchemaOutputResolver outputResolver) throws DescriptorException {
  Map<String,Schema> schemas=generateSchemas(descriptorsToProcess,properties);
  Project proj=new SchemaModelProject();
  XMLContext context=new XMLContext(proj);
  XMLMarshaller marshaller=context.createMarshaller();
  XMLDescriptor schemaDescriptor=(XMLDescriptor)proj.getDescriptor(Schema.class);
  int schemaCount=0;
  for (  String key : schemas.keySet()) {
    Schema schema=schemas.get(key);
    try {
      NamespaceResolver schemaNamespaces=schema.getNamespaceResolver();
      schemaNamespaces.put(XMLConstants.SCHEMA_PREFIX,"String_Node_Str");
      schemaDescriptor.setNamespaceResolver(schemaNamespaces);
      javax.xml.transform.Result target=outputResolver.createOutput(schema.getTargetNamespace(),schema.getName());
      marshaller.marshal(schema,target);
      schemaCount++;
    }
 catch (    IOException ex) {
      ex.printStackTrace();
    }
  }
  return schemas;
}

Fixed version (ground truth):
/** 
 * Generates a Map of EclipseLink schema model Schema objects for a given list of XMLDescriptors. The descriptors are assumed to have been initialized.  One Schema  object will be generated  per namespace.
 * @param descriptorsToProcess list of XMLDescriptors which will be used to generate Schema objects
 * @param properties holds a namespace to Properties map containing schema settings, such as elementFormDefault 
 * @return a map of namespaces to EclipseLink schema model Schema objects
 * @throws DescriptorException if the reference descriptor for a composite mapping is not in the list of descriptors
 * @see Schema
 */
public Map<String,Schema> generateSchemas(List<XMLDescriptor> descriptorsToProcess,SchemaModelGeneratorProperties properties,SchemaModelOutputResolver outputResolver) throws DescriptorException {
  Map<String,Schema> schemas=generateSchemas(descriptorsToProcess,properties);
  Project proj=new SchemaModelProject();
  XMLContext context=new XMLContext(proj);
  XMLMarshaller marshaller=context.createMarshaller();
  XMLDescriptor schemaDescriptor=(XMLDescriptor)proj.getDescriptor(Schema.class);
  int schemaCount=0;
  for (  String key : schemas.keySet()) {
    Schema schema=schemas.get(key);
    try {
      NamespaceResolver schemaNamespaces=schema.getNamespaceResolver();
      schemaNamespaces.put(XMLConstants.SCHEMA_PREFIX,"String_Node_Str");
      schemaDescriptor.setNamespaceResolver(schemaNamespaces);
      javax.xml.transform.Result target=outputResolver.createOutput(schema.getTargetNamespace(),schema.getName());
      marshaller.marshal(schema,target);
      schemaCount++;
    }
 catch (    IOException ex) {
      ex.printStackTrace();
    }
  }
  return schemas;
}