Program: 63651
Project: 63651
Buggy source:
/** 
 * INTERNAL: Complete building TypeInfo objects for a given set of JavaClass instances. This method assumes that init, preBuildTypeInfo, and postBuildTypeInfo have been called.
 * @param allClasses
 * @return
 */
private Map<String,TypeInfo> buildTypeInfo(JavaClass[] allClasses){
  for (  JavaClass javaClass : allClasses) {
    if (javaClass == null) {
      continue;
    }
    TypeInfo info=typeInfo.get(javaClass.getQualifiedName());
    if (info == null || info.isPostBuilt()) {
      continue;
    }
    info.setPostBuilt(true);
    processFactoryMethods(javaClass,info);
    PackageInfo packageInfo=getPackageInfoForPackage(javaClass);
    XMLNameTransformer transformer=info.getXmlNameTransformer();
    if (transformer == TypeInfo.DEFAULT_NAME_TRANSFORMER) {
      XMLNameTransformer nsInfoXmlNameTransformer=packageInfo.getXmlNameTransformer();
      if (nsInfoXmlNameTransformer != null) {
        info.setXmlNameTransformer(nsInfoXmlNameTransformer);
      }
 else       if (helper.isAnnotationPresent(javaClass,XmlNameTransformer.class)) {
        XmlNameTransformer nameTranformer=(XmlNameTransformer)helper.getAnnotation(javaClass,XmlNameTransformer.class);
        Class nameTransformerClass=nameTranformer.value();
        try {
          info.setXmlNameTransformer((XMLNameTransformer)nameTransformerClass.newInstance());
        }
 catch (        InstantiationException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
catch (        IllegalAccessException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
      }
 else       if (helper.isAnnotationPresent(javaClass.getPackage(),XmlNameTransformer.class)) {
        XmlNameTransformer nameTranformer=(XmlNameTransformer)helper.getAnnotation(javaClass.getPackage(),XmlNameTransformer.class);
        Class nameTransformerClass=nameTranformer.value();
        try {
          info.setXmlNameTransformer((XMLNameTransformer)nameTransformerClass.newInstance());
        }
 catch (        InstantiationException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
catch (        IllegalAccessException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
      }
    }
    postProcessXmlAccessorType(info,packageInfo);
    postProcessXmlType(javaClass,info,packageInfo);
    if (info.isEnumerationType()) {
      addEnumTypeInfo(javaClass,((EnumTypeInfo)info));
      continue;
    }
    processTypeQName(javaClass,info,packageInfo.getNamespaceInfo());
    JavaClass superClass=(JavaClass)javaClass.getSuperclass();
    if (shouldGenerateTypeInfo(superClass)) {
      JavaClass[] jClassArray=new JavaClass[]{superClass};
      buildNewTypeInfo(jClassArray);
    }
    processPropertiesSuperClass(javaClass,info);
    info.setProperties(getPropertiesForClass(javaClass,info));
    processTypeInfoProperties(javaClass,info);
    postProcessXmlAccessorOrder(info,packageInfo);
    validatePropOrderForInfo(info);
  }
  return typeInfo;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Complete building TypeInfo objects for a given set of JavaClass instances. This method assumes that init, preBuildTypeInfo, and postBuildTypeInfo have been called.
 * @param allClasses
 * @return
 */
private Map<String,TypeInfo> buildTypeInfo(JavaClass[] allClasses){
  for (  JavaClass javaClass : allClasses) {
    if (javaClass == null) {
      continue;
    }
    TypeInfo info=typeInfo.get(javaClass.getQualifiedName());
    if (info == null || info.isPostBuilt()) {
      continue;
    }
    info.setPostBuilt(true);
    processFactoryMethods(javaClass,info);
    PackageInfo packageInfo=getPackageInfoForPackage(javaClass);
    XMLNameTransformer transformer=info.getXmlNameTransformer();
    if (transformer == TypeInfo.DEFAULT_NAME_TRANSFORMER) {
      XMLNameTransformer nsInfoXmlNameTransformer=packageInfo.getXmlNameTransformer();
      if (nsInfoXmlNameTransformer != null) {
        info.setXmlNameTransformer(nsInfoXmlNameTransformer);
      }
 else       if (helper.isAnnotationPresent(javaClass,XmlNameTransformer.class)) {
        XmlNameTransformer nameTranformer=(XmlNameTransformer)helper.getAnnotation(javaClass,XmlNameTransformer.class);
        Class nameTransformerClass=nameTranformer.value();
        try {
          info.setXmlNameTransformer((XMLNameTransformer)nameTransformerClass.newInstance());
        }
 catch (        InstantiationException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
catch (        IllegalAccessException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
      }
 else       if (helper.isAnnotationPresent(javaClass.getPackage(),XmlNameTransformer.class)) {
        XmlNameTransformer nameTranformer=(XmlNameTransformer)helper.getAnnotation(javaClass.getPackage(),XmlNameTransformer.class);
        Class nameTransformerClass=nameTranformer.value();
        try {
          info.setXmlNameTransformer((XMLNameTransformer)nameTransformerClass.newInstance());
        }
 catch (        InstantiationException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
catch (        IllegalAccessException ex) {
          throw JAXBException.exceptionWithNameTransformerClass(nameTransformerClass.getName(),ex);
        }
      }
    }
    postProcessXmlAccessorType(info,packageInfo);
    postProcessXmlType(javaClass,info,packageInfo);
    if (info.isEnumerationType()) {
      addEnumTypeInfo(javaClass,((EnumTypeInfo)info));
      continue;
    }
    processTypeQName(javaClass,info,packageInfo.getNamespaceInfo());
    JavaClass superClass=(JavaClass)javaClass.getSuperclass();
    if (shouldGenerateTypeInfo(superClass) && typeInfo.get(superClass.getQualifiedName()) == null) {
      JavaClass[] jClassArray=new JavaClass[]{superClass};
      buildNewTypeInfo(jClassArray);
    }
    processPropertiesSuperClass(javaClass,info);
    info.setProperties(getPropertiesForClass(javaClass,info));
    processTypeInfoProperties(javaClass,info);
    postProcessXmlAccessorOrder(info,packageInfo);
    validatePropOrderForInfo(info);
  }
  return typeInfo;
}