Program: 68716
Project: 68716
Buggy source:
/** 
 * Return a Schema for the given Source object. Since this method is called recursively, and the SchemaResolverWrapper is stateful, the resolver wrapper must be created outside of this method.
 * @param xsdSource
 * @param schemaResolverWrapper wraps the schema resolver to be used to resolve imports/includes
 * @return
 */
public Schema getSchema(Source xsdSource,SchemaResolverWrapper schemaResolverWrapper){
  try {
    XMLContext context=new XMLContext(getSchemaProject());
    XMLUnmarshaller unmarshaller=context.createUnmarshaller();
    Schema schema=(Schema)unmarshaller.unmarshal(xsdSource);
    Map imports=schema.getImports();
    Iterator keysIter=imports.keySet().iterator();
    while (keysIter.hasNext()) {
      String key=(String)keysIter.next();
      Import nextImport=(Import)imports.get(key);
      Source referencedSchema=getReferencedSchema(xsdSource,nextImport.getNamespace(),nextImport.getSchemaLocation(),schemaResolverWrapper);
      if (referencedSchema != null) {
        Schema importedSchema=getSchema(referencedSchema,schemaResolverWrapper);
        nextImport.setSchema(importedSchema);
      }
    }
    Map includes=schema.getIncludes();
    Iterator includesIter=includes.keySet().iterator();
    while (includesIter.hasNext()) {
      String key=(String)includesIter.next();
      Include nextInclude=(Include)includes.get(key);
      Source referencedSchema=getReferencedSchema(xsdSource,schema.getTargetNamespace(),nextInclude.getSchemaLocation(),schemaResolverWrapper);
      if (referencedSchema != null) {
        Schema includedSchema=getSchema(referencedSchema,schemaResolverWrapper);
        nextInclude.setSchema(includedSchema);
      }
    }
    return schema;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Return a Schema for the given Source object. Since this method is called recursively, and the SchemaResolverWrapper is stateful, the resolver wrapper must be created outside of this method.
 * @param xsdSource
 * @param schemaResolverWrapper wraps the schema resolver to be used to resolve imports/includes
 * @return
 */
public Schema getSchema(Source xsdSource,SchemaResolverWrapper schemaResolverWrapper){
  try {
    XMLContext context=new XMLContext(getSchemaProject());
    XMLUnmarshaller unmarshaller=context.createUnmarshaller();
    Schema schema=(Schema)unmarshaller.unmarshal(xsdSource);
    java.util.List imports=schema.getImports();
    Iterator iter=imports.iterator();
    while (iter.hasNext()) {
      Import nextImport=(Import)iter.next();
      Source referencedSchema=getReferencedSchema(xsdSource,nextImport.getNamespace(),nextImport.getSchemaLocation(),schemaResolverWrapper);
      if (referencedSchema != null) {
        Schema importedSchema=getSchema(referencedSchema,schemaResolverWrapper);
        nextImport.setSchema(importedSchema);
      }
    }
    java.util.List includes=schema.getIncludes();
    Iterator includesIter=includes.iterator();
    while (includesIter.hasNext()) {
      Include nextInclude=(Include)includesIter.next();
      Source referencedSchema=getReferencedSchema(xsdSource,schema.getTargetNamespace(),nextInclude.getSchemaLocation(),schemaResolverWrapper);
      if (referencedSchema != null) {
        Schema includedSchema=getSchema(referencedSchema,schemaResolverWrapper);
        nextInclude.setSchema(includedSchema);
      }
    }
    return schema;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}