Program: 37163
Project: 37163
Buggy source:
/** 
 * Given the name of the field, return the corresponding FieldDoc.
 * @param config the current configuration of the doclet.
 * @param tag the value tag.
 * @param name the name of the field to search for.  The name should be in<qualified class name>#<field name> format. If the class name is omitted, it is assumed that the field is in the current class.
 * @return the corresponding FieldDoc. If the name is null or empty string,return field that the value tag was used in.
 * @throws DocletAbortException if the value tag does not specify a name toa value field and it is not used within the comments of a valid field.
 */
private FieldDoc getFieldDoc(Configuration config,Tag tag,String name){
  if (name == null || name.length() == 0) {
    if (tag.holder() instanceof FieldDoc) {
      return (FieldDoc)tag.holder();
    }
 else {
      throw new DocletAbortException();
    }
  }
  StringTokenizer st=new StringTokenizer(name,"String_Node_Str");
  String memberName=null;
  ClassDoc cd=null;
  if (st.countTokens() == 1) {
    Doc holder=tag.holder();
    if (holder instanceof MemberDoc) {
      cd=((MemberDoc)holder).containingClass();
    }
 else     if (holder instanceof ClassDoc) {
      cd=(ClassDoc)holder;
    }
    memberName=st.nextToken();
  }
 else {
    cd=config.root.classNamed(st.nextToken());
    memberName=st.nextToken();
  }
  if (cd == null) {
    return null;
  }
  FieldDoc[] fields=cd.fields();
  for (int i=0; i < fields.length; i++) {
    if (fields[i].name().equals(memberName)) {
      return fields[i];
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Given the name of the field, return the corresponding FieldDoc.
 * @param config the current configuration of the doclet.
 * @param tag the value tag.
 * @param name the name of the field to search for.  The name should be in{@code <qualified class name>#<field name>} format. If the class name is omitted,it is assumed that the field is in the current class.
 * @return the corresponding FieldDoc. If the name is null or empty string,return field that the value tag was used in.
 * @throws DocletAbortException if the value tag does not specify a name toa value field and it is not used within the comments of a valid field.
 */
private FieldDoc getFieldDoc(Configuration config,Tag tag,String name){
  if (name == null || name.length() == 0) {
    if (tag.holder() instanceof FieldDoc) {
      return (FieldDoc)tag.holder();
    }
 else {
      throw new DocletAbortException();
    }
  }
  StringTokenizer st=new StringTokenizer(name,"String_Node_Str");
  String memberName=null;
  ClassDoc cd=null;
  if (st.countTokens() == 1) {
    Doc holder=tag.holder();
    if (holder instanceof MemberDoc) {
      cd=((MemberDoc)holder).containingClass();
    }
 else     if (holder instanceof ClassDoc) {
      cd=(ClassDoc)holder;
    }
    memberName=st.nextToken();
  }
 else {
    cd=config.root.classNamed(st.nextToken());
    memberName=st.nextToken();
  }
  if (cd == null) {
    return null;
  }
  FieldDoc[] fields=cd.fields();
  for (int i=0; i < fields.length; i++) {
    if (fields[i].name().equals(memberName)) {
      return fields[i];
    }
  }
  return null;
}