Program: 67670
Project: 67670
Buggy source:
public SchemaTypeInfo addClass(JavaClass javaClass){
  if (javaClass == null) {
    return null;
  }
 else   if (helper.isAnnotationPresent(javaClass,XmlTransient.class)) {
    return null;
  }
  if (typeInfo == null) {
    this.typeInfoClasses=new ArrayList<JavaClass>();
    this.typeInfo=new HashMap<String,TypeInfo>();
    this.typeInfoByQName=new HashMap<QName,TypeInfo>();
    this.userDefinedSchemaTypes=new HashMap<String,QName>();
    this.packageToNamespaceMappings=new HashMap<String,NamespaceInfo>();
    this.namespaceResolver=new NamespaceResolver();
  }
  TypeInfo info=createTypeInfoFor(javaClass);
  NamespaceInfo namespaceInfo;
  JavaPackage pack=javaClass.getPackage();
  namespaceInfo=this.packageToNamespaceMappings.get(pack.getQualifiedName());
  SchemaTypeInfo schemaInfo=new SchemaTypeInfo();
  schemaInfo.setSchemaTypeName(new QName(info.getClassNamespace(),info.getSchemaTypeName()));
  if (helper.isAnnotationPresent(javaClass,XmlRootElement.class)) {
    XmlRootElement rootElemAnnotation=(XmlRootElement)helper.getAnnotation(javaClass,XmlRootElement.class);
    String elementName=rootElemAnnotation.name();
    if (elementName.equals("String_Node_Str") || elementName.equals("String_Node_Str")) {
      if (javaClass.getName().indexOf("String_Node_Str") != -1) {
        elementName=Introspector.decapitalize(javaClass.getName().substring(javaClass.getName().lastIndexOf('$') + 1));
      }
 else {
        elementName=Introspector.decapitalize(javaClass.getName().substring(javaClass.getName().lastIndexOf('.') + 1));
      }
      if (elementName.length() >= 3) {
        int idx=elementName.length() - 1;
        char ch=elementName.charAt(idx - 1);
        if (Character.isDigit(ch)) {
          char lastCh=Character.toUpperCase(elementName.charAt(idx));
          elementName=elementName.substring(0,idx) + lastCh;
        }
      }
    }
    String rootNamespace=rootElemAnnotation.namespace();
    QName rootElemName=null;
    if (rootNamespace.equals("String_Node_Str")) {
      rootElemName=new QName(namespaceInfo.getNamespace(),elementName);
    }
 else {
      rootElemName=new QName(rootNamespace,elementName);
    }
    schemaInfo.getGlobalElementDeclarations().add(rootElemName);
    ElementDeclaration declaration=new ElementDeclaration(rootElemName,javaClass,javaClass.getRawName(),false);
    this.globalElements.put(rootElemName,declaration);
  }
  return schemaInfo;
}

Fixed version (ground truth):
public SchemaTypeInfo addClass(JavaClass javaClass){
  if (javaClass == null) {
    return null;
  }
 else   if (helper.isAnnotationPresent(javaClass,XmlTransient.class)) {
    return null;
  }
  if (typeInfo == null) {
    this.typeInfoClasses=new ArrayList<JavaClass>();
    this.typeInfo=new HashMap<String,TypeInfo>();
    this.typeQNames=new ArrayList<QName>();
    this.userDefinedSchemaTypes=new HashMap<String,QName>();
    this.packageToNamespaceMappings=new HashMap<String,NamespaceInfo>();
    this.namespaceResolver=new NamespaceResolver();
  }
  TypeInfo info=createTypeInfoFor(javaClass);
  NamespaceInfo namespaceInfo;
  JavaPackage pack=javaClass.getPackage();
  namespaceInfo=this.packageToNamespaceMappings.get(pack.getQualifiedName());
  SchemaTypeInfo schemaInfo=new SchemaTypeInfo();
  schemaInfo.setSchemaTypeName(new QName(info.getClassNamespace(),info.getSchemaTypeName()));
  if (helper.isAnnotationPresent(javaClass,XmlRootElement.class)) {
    XmlRootElement rootElemAnnotation=(XmlRootElement)helper.getAnnotation(javaClass,XmlRootElement.class);
    String elementName=rootElemAnnotation.name();
    if (elementName.equals("String_Node_Str") || elementName.equals("String_Node_Str")) {
      if (javaClass.getName().indexOf("String_Node_Str") != -1) {
        elementName=Introspector.decapitalize(javaClass.getName().substring(javaClass.getName().lastIndexOf('$') + 1));
      }
 else {
        elementName=Introspector.decapitalize(javaClass.getName().substring(javaClass.getName().lastIndexOf('.') + 1));
      }
      if (elementName.length() >= 3) {
        int idx=elementName.length() - 1;
        char ch=elementName.charAt(idx - 1);
        if (Character.isDigit(ch)) {
          char lastCh=Character.toUpperCase(elementName.charAt(idx));
          elementName=elementName.substring(0,idx) + lastCh;
        }
      }
    }
    String rootNamespace=rootElemAnnotation.namespace();
    QName rootElemName=null;
    if (rootNamespace.equals("String_Node_Str")) {
      rootElemName=new QName(namespaceInfo.getNamespace(),elementName);
    }
 else {
      rootElemName=new QName(rootNamespace,elementName);
    }
    schemaInfo.getGlobalElementDeclarations().add(rootElemName);
    ElementDeclaration declaration=new ElementDeclaration(rootElemName,javaClass,javaClass.getRawName(),false);
    this.globalElements.put(rootElemName,declaration);
  }
  return schemaInfo;
}