Program: 64126
Project: 64126
Buggy source:
/** 
 * Return the "actual" type from a parameterized type.  For example, if this <code>JavaClass</code> represents <code>List&lt;Employee</code>, this method will return the <code>Employee</code> <code>JavaClass</code>.
 * @return a <code>Collection</code> containing the actual type's <code>JavaClass</code>.
 */
public Collection<JavaClass> getActualTypeArguments(){
  JTypeVar[] typeParams=xjcClass.typeParams();
  if (null == typeParams || 0 == typeParams.length) {
    return new ArrayList<JavaClass>(0);
  }
  try {
    ArrayList<JavaClass> typeArguments=new ArrayList<JavaClass>(1);
    JTypeVar var=typeParams[typeParams.length - 1];
    JClass xjcBoundClass=(JClass)PrivilegedAccessHelper.getValueFromField(JTYPEVAR_BOUND,var);
    JType basis=null;
    try {
      Field basisField=PrivilegedAccessHelper.getDeclaredField(xjcBoundClass.getClass(),"String_Node_Str",true);
      basis=(JClass)PrivilegedAccessHelper.getValueFromField(basisField,xjcBoundClass);
    }
 catch (    Exception e) {
    }
    JavaClass boundClass;
    if (basis != null) {
      boundClass=this.javaModel.getClass(basis.fullName());
    }
 else     if (javaModel != null) {
      boundClass=this.javaModel.getClass(xjcBoundClass.fullName());
    }
 else {
      JDefinedClass c=jCodeModel._getClass(xjcBoundClass.fullName());
      boundClass=new XJCJavaClassImpl(c,jCodeModel,dynamicClassLoader);
    }
    typeArguments.add(boundClass);
    return typeArguments;
  }
 catch (  Exception e) {
    return new ArrayList<JavaClass>(0);
  }
}

Fixed version (ground truth):
/** 
 * Return the "actual" type from a parameterized type.  For example, if this <code>JavaClass</code> represents <code>List&lt;Employee</code>, this method will return the <code>Employee</code> <code>JavaClass</code>.
 * @return a <code>Collection</code> containing the actual type's <code>JavaClass</code>.
 */
public Collection<JavaClass> getActualTypeArguments(){
  JTypeVar[] typeParams=xjcClass.typeParams();
  if (null == typeParams || 0 == typeParams.length) {
    if (arg != null) {
      java.util.List<JavaClass> theList=new ArrayList<JavaClass>(1);
      theList.add(arg);
      return theList;
    }
 else {
      return new ArrayList<JavaClass>(0);
    }
  }
  try {
    ArrayList<JavaClass> typeArguments=new ArrayList<JavaClass>(1);
    JTypeVar var=typeParams[typeParams.length - 1];
    JClass xjcBoundClass=(JClass)PrivilegedAccessHelper.getValueFromField(JTYPEVAR_BOUND,var);
    JType basis=null;
    try {
      Field basisField=PrivilegedAccessHelper.getDeclaredField(xjcBoundClass.getClass(),"String_Node_Str",true);
      basis=(JClass)PrivilegedAccessHelper.getValueFromField(basisField,xjcBoundClass);
    }
 catch (    Exception e) {
    }
    JavaClass boundClass;
    if (basis != null) {
      boundClass=this.javaModel.getClass(basis.fullName());
    }
 else     if (javaModel != null) {
      boundClass=this.javaModel.getClass(xjcBoundClass.fullName());
    }
 else {
      JDefinedClass c=jCodeModel._getClass(xjcBoundClass.fullName());
      boundClass=new XJCJavaClassImpl(c,jCodeModel,dynamicClassLoader);
    }
    typeArguments.add(boundClass);
    return typeArguments;
  }
 catch (  Exception e) {
    return new ArrayList<JavaClass>(0);
  }
}