Program: 67401
Project: 67401
Buggy source:
public void processClassesAndProperties(JavaClass[] classes){
  typeInfoClasses=new ArrayList<JavaClass>();
  typeInfo=new HashMap<String,TypeInfo>();
  typeQNames=new ArrayList<QName>();
  userDefinedSchemaTypes=new HashMap<String,QName>();
  packageToNamespaceMappings=new HashMap<String,NamespaceInfo>();
  this.factoryMethods=new HashMap<String,JavaMethod>();
  this.namespaceResolver=new NamespaceResolver();
  this.xmlRootElements=new HashMap<String,ElementDeclaration>();
  xmlIdRefProps=new ArrayList<Property>();
  arrayClassesToGeneratedClasses=new HashMap<String,Class>();
  collectionClassesToGeneratedClasses=new HashMap<java.lang.reflect.Type,Class>();
  ArrayList<JavaClass> extraClasses=new ArrayList<JavaClass>();
  ArrayList<JavaClass> classesToProcess=new ArrayList<JavaClass>();
  for (  JavaClass javaClass : classes) {
    if (javaClass.isArray()) {
      if (!javaClass.getComponentType().isPrimitive()) {
        extraClasses.add(javaClass.getComponentType());
      }
      Class generatedClass=generateWrapperForArrayClass(javaClass);
      extraClasses.add(helper.getJavaClass(generatedClass));
      arrayClassesToGeneratedClasses.put(javaClass.getRawName(),generatedClass);
    }
 else     if (isCollectionType(javaClass)) {
      if (javaClass.hasActualTypeArguments()) {
        JavaClass componentClass=(JavaClass)javaClass.getActualTypeArguments().toArray()[0];
        if (!componentClass.isPrimitive()) {
          extraClasses.add(componentClass);
        }
        if (javaClassToType != null) {
          java.lang.reflect.Type theType=javaClassToType.get(javaClass);
          if (theType != null) {
            Class generatedClass=generateWrapperForArrayClass(javaClass);
            collectionClassesToGeneratedClasses.put(theType,generatedClass);
            extraClasses.add(helper.getJavaClass(generatedClass));
          }
        }
      }
    }
 else {
      processClass(javaClass,classesToProcess);
    }
  }
  for (  JavaClass javaClass : extraClasses) {
    processClass(javaClass,classesToProcess);
  }
  updateGlobalElements(classesToProcess);
  for (  JavaClass javaClass : classesToProcess) {
    if (javaClass == null) {
      continue;
    }
    createTypeInfoFor(javaClass);
  }
  checkForCallbackMethods();
  for (  Property property : xmlIdRefProps) {
    JavaClass typeClass=property.getType();
    if (typeClass.isArray()) {
      typeClass=typeClass.getComponentType();
    }
 else     if (isCollectionType(typeClass)) {
      typeClass=property.getGenericType();
    }
    TypeInfo tInfo=typeInfo.get(typeClass.getQualifiedName());
    if (tInfo != null && tInfo.getIDProperty() == null) {
      throw JAXBException.invalidIdRef(property.getPropertyName(),typeClass.getQualifiedName());
    }
  }
}

Fixed version (ground truth):
public void processClassesAndProperties(JavaClass[] classes){
  typeInfoClasses=new ArrayList<JavaClass>();
  typeInfo=new HashMap<String,TypeInfo>();
  typeQNames=new ArrayList<QName>();
  userDefinedSchemaTypes=new HashMap<String,QName>();
  packageToNamespaceMappings=new HashMap<String,NamespaceInfo>();
  this.factoryMethods=new HashMap<String,JavaMethod>();
  this.namespaceResolver=new NamespaceResolver();
  this.xmlRootElements=new HashMap<String,ElementDeclaration>();
  xmlIdRefProps=new ArrayList<Property>();
  arrayClassesToGeneratedClasses=new HashMap<String,Class>();
  collectionClassesToGeneratedClasses=new HashMap<java.lang.reflect.Type,Class>();
  generatedClassesToArrayClasses=new HashMap<Class,JavaClass>();
  generatedClassesToCollectionClasses=new HashMap<Class,java.lang.reflect.Type>();
  ArrayList<JavaClass> extraClasses=new ArrayList<JavaClass>();
  ArrayList<JavaClass> classesToProcess=new ArrayList<JavaClass>();
  for (  JavaClass javaClass : classes) {
    if (javaClass.isArray()) {
      if (!javaClass.getComponentType().isPrimitive()) {
        extraClasses.add(javaClass.getComponentType());
      }
      Class generatedClass=generateWrapperForArrayClass(javaClass);
      extraClasses.add(helper.getJavaClass(generatedClass));
      arrayClassesToGeneratedClasses.put(javaClass.getRawName(),generatedClass);
      generatedClassesToArrayClasses.put(generatedClass,javaClass);
    }
 else     if (isCollectionType(javaClass)) {
      if (javaClass.hasActualTypeArguments()) {
        JavaClass componentClass=(JavaClass)javaClass.getActualTypeArguments().toArray()[0];
        if (!componentClass.isPrimitive()) {
          extraClasses.add(componentClass);
        }
        if (javaClassToType != null) {
          java.lang.reflect.Type theType=javaClassToType.get(javaClass);
          if (theType != null) {
            Class generatedClass=generateWrapperForArrayClass(javaClass);
            collectionClassesToGeneratedClasses.put(theType,generatedClass);
            generatedClassesToCollectionClasses.put(generatedClass,theType);
            extraClasses.add(helper.getJavaClass(generatedClass));
          }
        }
      }
    }
 else {
      processClass(javaClass,classesToProcess);
    }
  }
  for (  JavaClass javaClass : extraClasses) {
    processClass(javaClass,classesToProcess);
  }
  updateGlobalElements(classesToProcess);
  for (  JavaClass javaClass : classesToProcess) {
    if (javaClass == null) {
      continue;
    }
    createTypeInfoFor(javaClass);
  }
  checkForCallbackMethods();
  for (  Property property : xmlIdRefProps) {
    JavaClass typeClass=property.getType();
    if (typeClass.isArray()) {
      typeClass=typeClass.getComponentType();
    }
 else     if (isCollectionType(typeClass)) {
      typeClass=property.getGenericType();
    }
    TypeInfo tInfo=typeInfo.get(typeClass.getQualifiedName());
    if (tInfo != null && tInfo.getIDProperty() == null) {
      throw JAXBException.invalidIdRef(property.getPropertyName(),typeClass.getQualifiedName());
    }
  }
}