nus-yam/ex-repair huggingface dataset:
Program: 37148
Project: 37148
Buggy source:
/** 
 * Add the inherited summary link for the member.
 * @param classDoc the classDoc that we should link to
 * @param member the member being linked to
 * @param linksTree the content tree to which the link will be added
 */
protected void addInheritedSummaryLink(ClassDoc cd,ProgramElementDoc member,Content linksTree){
  linksTree.addContent(new RawHtml(writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER,cd,(MemberDoc)member,member.name(),false)));
}

Fixed version (ground truth):
/** 
 * Add the inherited summary link for the member.
 * @param cd the classDoc that we should link to
 * @param member the member being linked to
 * @param linksTree the content tree to which the link will be added
 */
protected void addInheritedSummaryLink(ClassDoc cd,ProgramElementDoc member,Content linksTree){
  linksTree.addContent(new RawHtml(writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER,cd,(MemberDoc)member,member.name(),false)));
}
Program: 37149
Project: 37149
Buggy source:
/** 
 * Add the summary link for the member.
 * @param context the id of the context where the link will be printed
 * @param classDoc the classDoc that we should link to
 * @param member the member being linked to
 * @param tdSummary the content tree to which the link will be added
 */
protected void addSummaryLink(int context,ClassDoc cd,ProgramElementDoc member,Content tdSummary){
  ExecutableMemberDoc emd=(ExecutableMemberDoc)member;
  String name=emd.name();
  Content strong=HtmlTree.STRONG(new RawHtml(writer.getDocLink(context,cd,(MemberDoc)emd,name,false)));
  Content code=HtmlTree.CODE(strong);
  writer.displayLength=name.length();
  addParameters(emd,false,code);
  tdSummary.addContent(code);
}

Fixed version (ground truth):
/** 
 * Add the summary link for the member.
 * @param context the id of the context where the link will be printed
 * @param cd the classDoc that we should link to
 * @param member the member being linked to
 * @param tdSummary the content tree to which the link will be added
 */
protected void addSummaryLink(int context,ClassDoc cd,ProgramElementDoc member,Content tdSummary){
  ExecutableMemberDoc emd=(ExecutableMemberDoc)member;
  String name=emd.name();
  Content strong=HtmlTree.STRONG(new RawHtml(writer.getDocLink(context,cd,(MemberDoc)emd,name,false)));
  Content code=HtmlTree.CODE(strong);
  writer.displayLength=name.length();
  addParameters(emd,false,code);
  tdSummary.addContent(code);
}
Program: 37150
Project: 37150
Buggy source:
/** 
 * Add the comment for the given member.
 * @param member the member being documented.
 * @param contentTree the content tree to which the comment will be added.
 */
protected void addComment(ProgramElementDoc member,Content htmltree){
  if (member.inlineTags().length > 0) {
    writer.addInlineComment(member,htmltree);
  }
}

Fixed version (ground truth):
/** 
 * Add the comment for the given member.
 * @param member the member being documented.
 * @param htmltree the content tree to which the comment will be added.
 */
protected void addComment(ProgramElementDoc member,Content htmltree){
  if (member.inlineTags().length > 0) {
    writer.addInlineComment(member,htmltree);
  }
}
Program: 37151
Project: 37151
Buggy source:
/** 
 * Constructor. Initialises resource for the  {@link com.sun.tools.doclets.MessageRetriever}.
 */
private ConfigurationImpl(){
  standardmessage=new MessageRetriever(this,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Constructor. Initializes resource for the  {@link com.sun.tools.doclets.internal.toolkit.util.MessageRetriever MessageRetriever}.
 */
private ConfigurationImpl(){
  standardmessage=new MessageRetriever(this,"String_Node_Str");
}
Program: 37152
Project: 37152
Buggy source:
/** 
 * Add the anchor.
 * @param builder the deprecated list builder
 * @param type the type of list being documented
 * @param contentTree the content tree to which the anchor will be added
 */
private void addAnchor(DeprecatedAPIListBuilder builder,int type,Content htmlTree){
  if (builder.hasDocumentation(type)) {
    htmlTree.addContent(getMarkerAnchor(ANCHORS[type]));
  }
}

Fixed version (ground truth):
/** 
 * Add the anchor.
 * @param builder the deprecated list builder
 * @param type the type of list being documented
 * @param htmlTree the content tree to which the anchor will be added
 */
private void addAnchor(DeprecatedAPIListBuilder builder,int type,Content htmlTree){
  if (builder.hasDocumentation(type)) {
    htmlTree.addContent(getMarkerAnchor(ANCHORS[type]));
  }
}
Program: 37153
Project: 37153
Buggy source:
/** 
 * Returns a package name label.
 * @param parsedName the package name
 * @return the package name content
 */
public Content getPackageLabel(String packageName){
  return new StringContent(packageName);
}

Fixed version (ground truth):
/** 
 * Returns a package name label.
 * @param packageName the package name
 * @return the package name content
 */
public Content getPackageLabel(String packageName){
  return new StringContent(packageName);
}
Program: 37154
Project: 37154
Buggy source:
/** 
 * Add the member header.
 * @param fieldsType the class document to be listed
 * @param fieldTypeStr the string for the filed type to be documented
 * @param fieldDimensions the dimensions of the field string to be added
 * @param firldName name of the field to be added
 * @param contentTree the content tree to which the member header will be added
 */
public void addMemberHeader(ClassDoc fieldType,String fieldTypeStr,String fieldDimensions,String fieldName,Content contentTree){
  Content nameContent=new RawHtml(fieldName);
  Content heading=HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING,nameContent);
  contentTree.addContent(heading);
  Content pre=new HtmlTree(HtmlTag.PRE);
  if (fieldType == null) {
    pre.addContent(fieldTypeStr);
  }
 else {
    Content fieldContent=new RawHtml(writer.getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_SERIAL_MEMBER,fieldType)));
    pre.addContent(fieldContent);
  }
  pre.addContent(fieldDimensions + "String_Node_Str");
  pre.addContent(fieldName);
  contentTree.addContent(pre);
}

Fixed version (ground truth):
/** 
 * Add the member header.
 * @param fieldType the class document to be listed
 * @param fieldTypeStr the string for the field type to be documented
 * @param fieldDimensions the dimensions of the field string to be added
 * @param fieldName name of the field to be added
 * @param contentTree the content tree to which the member header will be added
 */
public void addMemberHeader(ClassDoc fieldType,String fieldTypeStr,String fieldDimensions,String fieldName,Content contentTree){
  Content nameContent=new RawHtml(fieldName);
  Content heading=HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING,nameContent);
  contentTree.addContent(heading);
  Content pre=new HtmlTree(HtmlTag.PRE);
  if (fieldType == null) {
    pre.addContent(fieldTypeStr);
  }
 else {
    Content fieldContent=new RawHtml(writer.getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_SERIAL_MEMBER,fieldType)));
    pre.addContent(fieldContent);
  }
  pre.addContent(fieldDimensions + "String_Node_Str");
  pre.addContent(fieldName);
  contentTree.addContent(pre);
}
Program: 37155
Project: 37155
Buggy source:
/** 
 * Return path to the given file name in the given package. So if the name passed is "Object.html" and the name of the package is "java.lang", and if the relative path is "../.." then returned string will be "../../java/lang/Object.html"
 * @param linkInfo the information about the link.
 * @param fileName the file name, to which path string is.
 */
private String pathString(LinkInfoImpl linkInfo){
  if (linkInfo.context == LinkInfoImpl.PACKAGE_FRAME) {
    return linkInfo.classDoc.name() + "String_Node_Str";
  }
  StringBuffer buf=new StringBuffer(m_writer.relativePath);
  buf.append(DirectoryManager.getPathToPackage(linkInfo.classDoc.containingPackage(),linkInfo.classDoc.name() + "String_Node_Str"));
  return buf.toString();
}

Fixed version (ground truth):
/** 
 * Return path to the given file name in the given package. So if the name passed is "Object.html" and the name of the package is "java.lang", and if the relative path is "../.." then returned string will be "../../java/lang/Object.html"
 * @param linkInfo the information about the link.
 */
private String pathString(LinkInfoImpl linkInfo){
  if (linkInfo.context == LinkInfoImpl.PACKAGE_FRAME) {
    return linkInfo.classDoc.name() + "String_Node_Str";
  }
  StringBuffer buf=new StringBuffer(m_writer.relativePath);
  buf.append(DirectoryManager.getPathToPackage(linkInfo.classDoc.containingPackage(),linkInfo.classDoc.name() + "String_Node_Str"));
  return buf.toString();
}
Program: 37156
Project: 37156
Buggy source:
/** 
 * Adds the lower navigation bar and the bottom text (from the -bottom option) at the bottom of page.
 * @param the documentation tree to which the navigation bar footer will be added
 */
protected void addNavigationBarFooter(Content body){
  addNavLinks(false,body);
  addBottom(body);
}

Fixed version (ground truth):
/** 
 * Adds the lower navigation bar and the bottom text (from the -bottom option) at the bottom of page.
 * @param body the documentation tree to which the navigation bar footer will be added
 */
protected void addNavigationBarFooter(Content body){
  addNavLinks(false,body);
  addBottom(body);
}
Program: 37158
Project: 37158
Buggy source:
/** 
 * Get the enum constants documentation tree header.
 * @param enumConstant the enum constant being documented
 * @param enumConstantDetailsTree the content tree representing enum constant details
 * @return content tree for the enum constant documentation header
 */
public Content getEnumConstantsTreeHeader(FieldDoc enumConstant,Content enumConstantsDetailsTree);

Fixed version (ground truth):
/** 
 * Get the enum constants documentation tree header.
 * @param enumConstant the enum constant being documented
 * @param enumConstantsDetailsTree the content tree representing enum constant details
 * @return content tree for the enum constant documentation header
 */
public Content getEnumConstantsTreeHeader(FieldDoc enumConstant,Content enumConstantsDetailsTree);
Program: 37159
Project: 37159
Buggy source:
/** 
 * Return the list of visible constant fields for the given classdoc.
 * @param cd the classdoc to examine.
 * @return the list of visible constant fields for the given classdoc.
 */
protected List<FieldDoc> members(){
  List<ProgramElementDoc> l=visibleMemberMapFields.getLeafClassMembers(configuration);
  l.addAll(visibleMemberMapEnumConst.getLeafClassMembers(configuration));
  Iterator<ProgramElementDoc> iter;
  if (l != null) {
    iter=l.iterator();
  }
 else {
    return null;
  }
  List<FieldDoc> inclList=new LinkedList<FieldDoc>();
  FieldDoc member;
  while (iter.hasNext()) {
    member=(FieldDoc)iter.next();
    if (member.constantValue() != null) {
      inclList.add(member);
    }
  }
  return inclList;
}

Fixed version (ground truth):
/** 
 * Return the list of visible constant fields for the given classdoc.
 * @return the list of visible constant fields for the given classdoc.
 */
protected List<FieldDoc> members(){
  List<ProgramElementDoc> l=visibleMemberMapFields.getLeafClassMembers(configuration);
  l.addAll(visibleMemberMapEnumConst.getLeafClassMembers(configuration));
  Iterator<ProgramElementDoc> iter;
  if (l != null) {
    iter=l.iterator();
  }
 else {
    return null;
  }
  List<FieldDoc> inclList=new LinkedList<FieldDoc>();
  FieldDoc member;
  while (iter.hasNext()) {
    member=(FieldDoc)iter.next();
    if (member.constantValue() != null) {
      inclList.add(member);
    }
  }
  return inclList;
}
Program: 37160
Project: 37160
Buggy source:
/** 
 * Returns a list of methods that will be documented for the given class. This information can be used for doclet specific documentation generation.
 * @param classDoc the {@link ClassDoc} we want to check.
 * @param type the type of members to return.
 * @return a list of methods that will be documented.
 * @see VisibleMemberMap
 */
public List<ProgramElementDoc> members(int type){
  return visibleMemberMaps[type].getLeafClassMembers(configuration);
}

Fixed version (ground truth):
/** 
 * Returns a list of methods that will be documented for the given class. This information can be used for doclet specific documentation generation.
 * @param type the type of members to return.
 * @return a list of methods that will be documented.
 * @see VisibleMemberMap
 */
public List<ProgramElementDoc> members(int type){
  return visibleMemberMaps[type].getLeafClassMembers(configuration);
}
Program: 37162
Project: 37162
Buggy source:
/** 
 * Given an array of <code>ParamTag</code>s,return its string representation. Try to inherit the param tags that are missing.
 * @param doc               the doc that holds the param tags.
 * @param writer            the TagletWriter that will write this tag.
 * @param formalParameters  The array of parmeters (from type or executablemember) to check.
 * @return the TagletOutput representation of these <code>ParamTag</code>s.
 */
private TagletOutput getTagletOutput(boolean isNonTypeParams,Doc holder,TagletWriter writer,Object[] formalParameters,ParamTag[] paramTags){
  TagletOutput result=writer.getOutputInstance();
  Set<String> alreadyDocumented=new HashSet<String>();
  if (paramTags.length > 0) {
    result.appendOutput(processParamTags(isNonTypeParams,paramTags,getRankMap(formalParameters),writer,alreadyDocumented));
  }
  if (alreadyDocumented.size() != formalParameters.length) {
    result.appendOutput(getInheritedTagletOutput(isNonTypeParams,holder,writer,formalParameters,alreadyDocumented));
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Given an array of <code>ParamTag</code>s,return its string representation. Try to inherit the param tags that are missing.
 * @param holder            the doc that holds the param tags.
 * @param writer            the TagletWriter that will write this tag.
 * @param formalParameters  The array of parmeters (from type or executablemember) to check.
 * @return the TagletOutput representation of these <code>ParamTag</code>s.
 */
private TagletOutput getTagletOutput(boolean isNonTypeParams,Doc holder,TagletWriter writer,Object[] formalParameters,ParamTag[] paramTags){
  TagletOutput result=writer.getOutputInstance();
  Set<String> alreadyDocumented=new HashSet<String>();
  if (paramTags.length > 0) {
    result.appendOutput(processParamTags(isNonTypeParams,paramTags,getRankMap(formalParameters),writer,alreadyDocumented));
  }
  if (alreadyDocumented.size() != formalParameters.length) {
    result.appendOutput(getInheritedTagletOutput(isNonTypeParams,holder,writer,formalParameters,alreadyDocumented));
  }
  return result;
}
Program: 37164
Project: 37164
Buggy source:
/** 
 * Return the list of deprecated Doc objects of a given type.
 * @param the constant representing the type of list being returned.
 */
public List<Doc> getList(int type){
  return deprecatedLists.get(type);
}

Fixed version (ground truth):
/** 
 * Return the list of deprecated Doc objects of a given type.
 * @param type the constant representing the type of list being returned.
 */
public List<Doc> getList(int type){
  return deprecatedLists.get(type);
}
Program: 37165
Project: 37165
Buggy source:
/** 
 * Get the Extern Item object associated with this package name.
 * @param pkgname Package name.
 */
private Item findPackageItem(String pkgName){
  if (packageToItemMap == null) {
    return null;
  }
  return packageToItemMap.get(pkgName);
}

Fixed version (ground truth):
/** 
 * Get the Extern Item object associated with this package name.
 * @param pkgName Package name.
 */
private Item findPackageItem(String pkgName){
  if (packageToItemMap == null) {
    return null;
  }
  return packageToItemMap.get(pkgName);
}
Program: 37166
Project: 37166
Buggy source:
/** 
 * Constructor to build a Extern Item object and map it with the package name. If the same package name is found in the map, then the first mapped Item object or offline location will be retained.
 * @param packagename Package name found in the "package-list" file.
 * @param path        URL or Directory path from where the "package-list"file is picked.
 * @param relative    True if path is URL, false if directory path.
 */
Item(String packageName,String path,boolean relative){
  this.packageName=packageName;
  this.path=path;
  this.relative=relative;
  if (packageToItemMap == null) {
    packageToItemMap=new HashMap<String,Item>();
  }
  if (!packageToItemMap.containsKey(packageName)) {
    packageToItemMap.put(packageName,this);
  }
}

Fixed version (ground truth):
/** 
 * Constructor to build a Extern Item object and map it with the package name. If the same package name is found in the map, then the first mapped Item object or offline location will be retained.
 * @param packageName Package name found in the "package-list" file.
 * @param path        URL or Directory path from where the "package-list"file is picked.
 * @param relative    True if path is URL, false if directory path.
 */
Item(String packageName,String path,boolean relative){
  this.packageName=packageName;
  this.path=path;
  this.relative=relative;
  if (packageToItemMap == null) {
    packageToItemMap=new HashMap<String,Item>();
  }
  if (!packageToItemMap.containsKey(packageName)) {
    packageToItemMap.put(packageName,this);
  }
}
Program: 37167
Project: 37167
Buggy source:
/** 
 * Return the package private members inherited by the class.  Only return if parent is package private and not documented.
 * @param configuation the current configuration of the doclet.
 * @return the package private members inherited by the class.
 */
private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration){
  List<ProgramElementDoc> results=new ArrayList<ProgramElementDoc>();
  for (Iterator<ClassDoc> iter=visibleClasses.iterator(); iter.hasNext(); ) {
    ClassDoc currentClass=iter.next();
    if (currentClass != classdoc && currentClass.isPackagePrivate() && !Util.isLinkable(currentClass,configuration)) {
      results.addAll(getMembersFor(currentClass));
    }
  }
  return results;
}

Fixed version (ground truth):
/** 
 * Return the package private members inherited by the class.  Only return if parent is package private and not documented.
 * @param configuration the current configuration of the doclet.
 * @return the package private members inherited by the class.
 */
private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration){
  List<ProgramElementDoc> results=new ArrayList<ProgramElementDoc>();
  for (Iterator<ClassDoc> iter=visibleClasses.iterator(); iter.hasNext(); ) {
    ClassDoc currentClass=iter.next();
    if (currentClass != classdoc && currentClass.isPackagePrivate() && !Util.isLinkable(currentClass,configuration)) {
      results.addAll(getMembersFor(currentClass));
    }
  }
  return results;
}
Program: 37168
Project: 37168
Buggy source:
/** 
 * Return the visible members of the class being mapped.  Also append at the end of the list members that are inherited by inaccessible parents. We document these members in the child because the parent is not documented.
 * @param configuation the current configuration of the doclet.
 */
public List<ProgramElementDoc> getLeafClassMembers(Configuration configuration){
  List<ProgramElementDoc> result=getMembersFor(classdoc);
  result.addAll(getInheritedPackagePrivateMethods(configuration));
  return result;
}

Fixed version (ground truth):
/** 
 * Return the visible members of the class being mapped.  Also append at the end of the list members that are inherited by inaccessible parents. We document these members in the child because the parent is not documented.
 * @param configuration the current configuration of the doclet.
 */
public List<ProgramElementDoc> getLeafClassMembers(Configuration configuration){
  List<ProgramElementDoc> result=getMembersFor(classdoc);
  result.addAll(getInheritedPackagePrivateMethods(configuration));
  return result;
}
Program: 37169
Project: 37169
Buggy source:
/** 
 * Configure the set of diagnostic parts that should be displayed by the formatter.
 * @param options options to set
 */
public void setVisible(Set<DiagnosticPart> visibleParts);

Fixed version (ground truth):
/** 
 * Configure the set of diagnostic parts that should be displayed by the formatter.
 * @param visibleParts the parts to be set
 */
public void setVisible(Set<DiagnosticPart> visibleParts);
Program: 37170
Project: 37170
Buggy source:
/** 
 * Constructor used by service provider mechanism.  The recommended way to obtain an instance of this class is by using   {@link #create} or theservice provider mechanism.
 * @see javax.tools.JavaCompilerTool
 * @see javax.tools.ToolProvider
 * @see #create
 */
@Deprecated public JavacTool(){
}

Fixed version (ground truth):
/** 
 * Constructor used by service provider mechanism.  The recommended way to obtain an instance of this class is by using   {@link #create} or theservice provider mechanism.
 * @see javax.tools.JavaCompiler
 * @see javax.tools.ToolProvider
 * @see #create
 */
@Deprecated public JavacTool(){
}
Program: 37171
Project: 37171
Buggy source:
public Iterator<TypeSymbol> iterator(){
  return new Iterator<TypeSymbol>(){
    List<TypeSymbol> seen=List.nil();
    TypeSymbol currentSym=getSymbol(intype);
    public boolean hasNext(){
      return currentSym != null;
    }
    public TypeSymbol next(){
      TypeSymbol prevSym=currentSym;
      currentSym=getSymbol(types.supertype(currentSym.type));
      return prevSym;
    }
    public void remove(){
      throw new UnsupportedOperationException("String_Node_Str");
    }
    TypeSymbol getSymbol(    Type intype){
      if (intype.tag != CLASS && intype.tag != TYPEVAR) {
        return null;
      }
      while (intype.tag == TYPEVAR)       intype=intype.getUpperBound();
      if (seen.contains(intype.tsym)) {
        return null;
      }
      seen=seen.prepend(intype.tsym);
      return intype.tsym;
    }
  }
;
}

Fixed version (ground truth):
public Iterator<TypeSymbol> iterator(){
  return new Iterator<TypeSymbol>(){
    List<TypeSymbol> seen=List.nil();
    TypeSymbol currentSym=symbolFor(intype);
    TypeSymbol prevSym=null;
    public boolean hasNext(){
      if (currentSym == syms.noSymbol) {
        currentSym=symbolFor(types.supertype(prevSym.type));
      }
      return currentSym != null;
    }
    public TypeSymbol next(){
      prevSym=currentSym;
      currentSym=syms.noSymbol;
      Assert.check(prevSym != null || prevSym != syms.noSymbol);
      return prevSym;
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
    TypeSymbol symbolFor(    Type t){
      if (t.tag != CLASS && t.tag != TYPEVAR) {
        return null;
      }
      while (t.tag == TYPEVAR)       t=t.getUpperBound();
      if (seen.contains(t.tsym)) {
        return null;
      }
      seen=seen.prepend(t.tsym);
      return t.tsym;
    }
  }
;
}
Program: 37172
Project: 37172
Buggy source:
public boolean hasNext(){
  return currentSym != null;
}

Fixed version (ground truth):
public boolean hasNext(){
  if (currentSym == syms.noSymbol) {
    currentSym=symbolFor(types.supertype(prevSym.type));
  }
  return currentSym != null;
}
Program: 37173
Project: 37173
Buggy source:
public TypeSymbol next(){
  TypeSymbol prevSym=currentSym;
  currentSym=getSymbol(types.supertype(currentSym.type));
  return prevSym;
}

Fixed version (ground truth):
public TypeSymbol next(){
  prevSym=currentSym;
  currentSym=syms.noSymbol;
  Assert.check(prevSym != null || prevSym != syms.noSymbol);
  return prevSym;
}
Program: 37174
Project: 37174
Buggy source:
public void remove(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
public void remove(){
  throw new UnsupportedOperationException();
}
Program: 37175
Project: 37175
Buggy source:
/** 
 * Return an Iterable object to scan the superclasses of a given type. It's crucial that the scan is done lazily, as we don't want to accidentally access more supertypes than strictly needed (as this could trigger completion errors if some of the not-needed supertypes are missing/ill-formed).
 */
Iterable<TypeSymbol> superclasses(final Type intype){
  return new Iterable<TypeSymbol>(){
    public Iterator<TypeSymbol> iterator(){
      return new Iterator<TypeSymbol>(){
        List<TypeSymbol> seen=List.nil();
        TypeSymbol currentSym=getSymbol(intype);
        public boolean hasNext(){
          return currentSym != null;
        }
        public TypeSymbol next(){
          TypeSymbol prevSym=currentSym;
          currentSym=getSymbol(types.supertype(currentSym.type));
          return prevSym;
        }
        public void remove(){
          throw new UnsupportedOperationException("String_Node_Str");
        }
        TypeSymbol getSymbol(        Type intype){
          if (intype.tag != CLASS && intype.tag != TYPEVAR) {
            return null;
          }
          while (intype.tag == TYPEVAR)           intype=intype.getUpperBound();
          if (seen.contains(intype.tsym)) {
            return null;
          }
          seen=seen.prepend(intype.tsym);
          return intype.tsym;
        }
      }
;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Return an Iterable object to scan the superclasses of a given type. It's crucial that the scan is done lazily, as we don't want to accidentally access more supertypes than strictly needed (as this could trigger completion errors if some of the not-needed supertypes are missing/ill-formed).
 */
Iterable<TypeSymbol> superclasses(final Type intype){
  return new Iterable<TypeSymbol>(){
    public Iterator<TypeSymbol> iterator(){
      return new Iterator<TypeSymbol>(){
        List<TypeSymbol> seen=List.nil();
        TypeSymbol currentSym=symbolFor(intype);
        TypeSymbol prevSym=null;
        public boolean hasNext(){
          if (currentSym == syms.noSymbol) {
            currentSym=symbolFor(types.supertype(prevSym.type));
          }
          return currentSym != null;
        }
        public TypeSymbol next(){
          prevSym=currentSym;
          currentSym=syms.noSymbol;
          Assert.check(prevSym != null || prevSym != syms.noSymbol);
          return prevSym;
        }
        public void remove(){
          throw new UnsupportedOperationException();
        }
        TypeSymbol symbolFor(        Type t){
          if (t.tag != CLASS && t.tag != TYPEVAR) {
            return null;
          }
          while (t.tag == TYPEVAR)           t=t.getUpperBound();
          if (seen.contains(t.tsym)) {
            return null;
          }
          seen=seen.prepend(t.tsym);
          return t.tsym;
        }
      }
;
    }
  }
;
}
Program: 37176
Project: 37176
Buggy source:
private Symbol findMethod(Env<AttrContext> env,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes,Type intype,Symbol bestSoFar,boolean allowBoxing,boolean useVarargs,boolean operator){
  boolean abstractOk=true;
  List<Type> itypes=List.nil();
  for (  TypeSymbol s : superclasses(intype)) {
    bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,s.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
    abstractOk&=excludeAbstractsFilter.accepts(s);
    if (abstractOk) {
      for (      Type itype : types.interfaces(s.type)) {
        itypes=types.union(types.closure(itype),itypes);
      }
    }
    if (name == names.init)     break;
  }
  Symbol concrete=bestSoFar.kind < ERR && (bestSoFar.flags() & ABSTRACT) == 0 ? bestSoFar : methodNotFound;
  if (name != names.init) {
    for (    Type itype : itypes) {
      if (!itype.isInterface())       continue;
      bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,itype.tsym.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
      if (concrete != bestSoFar && concrete.kind < ERR && bestSoFar.kind < ERR && types.isSubSignature(concrete.type,bestSoFar.type)) {
        bestSoFar=concrete;
      }
    }
  }
  return bestSoFar;
}

Fixed version (ground truth):
private Symbol findMethod(Env<AttrContext> env,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes,Type intype,Symbol bestSoFar,boolean allowBoxing,boolean useVarargs,boolean operator){
  boolean abstractOk=true;
  List<Type> itypes=List.nil();
  for (  TypeSymbol s : superclasses(intype)) {
    bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,s.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
    abstractOk&=(s.flags() & (ABSTRACT | INTERFACE | ENUM)) != 0;
    if (abstractOk) {
      for (      Type itype : types.interfaces(s.type)) {
        itypes=types.union(types.closure(itype),itypes);
      }
    }
    if (name == names.init)     break;
  }
  Symbol concrete=bestSoFar.kind < ERR && (bestSoFar.flags() & ABSTRACT) == 0 ? bestSoFar : methodNotFound;
  if (name != names.init) {
    for (    Type itype : itypes) {
      if (!itype.isInterface())       continue;
      bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,itype.tsym.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
      if (concrete != bestSoFar && concrete.kind < ERR && bestSoFar.kind < ERR && types.isSubSignature(concrete.type,bestSoFar.type)) {
        bestSoFar=concrete;
      }
    }
  }
  return bestSoFar;
}
Program: 37177
Project: 37177
Buggy source:
public boolean accepts(Name n){
  return n == names.init;
}

Fixed version (ground truth):
public boolean accepts(Name n){
  return n == n.table.names.init;
}
Program: 37178
Project: 37178
Buggy source:
public MethodHandle(int refKind,Symbol refSym,Names names){
  this.refKind=refKind;
  this.refSym=refSym;
  this.names=names;
  checkConsistent();
}

Fixed version (ground truth):
public MethodHandle(int refKind,Symbol refSym){
  this.refKind=refKind;
  this.refSym=refSym;
  checkConsistent();
}
Program: 37180
Project: 37180
Buggy source:
public Iterator<TypeSymbol> iterator(){
  return new Iterator<TypeSymbol>(){
    List<TypeSymbol> seen=List.nil();
    TypeSymbol currentSym=getSymbol(intype);
    public boolean hasNext(){
      return currentSym != null;
    }
    public TypeSymbol next(){
      TypeSymbol prevSym=currentSym;
      currentSym=getSymbol(types.supertype(currentSym.type));
      return prevSym;
    }
    public void remove(){
      throw new UnsupportedOperationException("String_Node_Str");
    }
    TypeSymbol getSymbol(    Type intype){
      if (intype.tag != CLASS && intype.tag != TYPEVAR) {
        return null;
      }
      while (intype.tag == TYPEVAR)       intype=intype.getUpperBound();
      if (seen.contains(intype.tsym)) {
        return null;
      }
      seen=seen.prepend(intype.tsym);
      return intype.tsym;
    }
  }
;
}

Fixed version (ground truth):
public Iterator<TypeSymbol> iterator(){
  return new Iterator<TypeSymbol>(){
    List<TypeSymbol> seen=List.nil();
    TypeSymbol currentSym=symbolFor(intype);
    TypeSymbol prevSym=null;
    public boolean hasNext(){
      if (currentSym == syms.noSymbol) {
        currentSym=symbolFor(types.supertype(prevSym.type));
      }
      return currentSym != null;
    }
    public TypeSymbol next(){
      prevSym=currentSym;
      currentSym=syms.noSymbol;
      Assert.check(prevSym != null || prevSym != syms.noSymbol);
      return prevSym;
    }
    public void remove(){
      throw new UnsupportedOperationException();
    }
    TypeSymbol symbolFor(    Type t){
      if (t.tag != CLASS && t.tag != TYPEVAR) {
        return null;
      }
      while (t.tag == TYPEVAR)       t=t.getUpperBound();
      if (seen.contains(t.tsym)) {
        return null;
      }
      seen=seen.prepend(t.tsym);
      return t.tsym;
    }
  }
;
}
Program: 37181
Project: 37181
Buggy source:
public boolean hasNext(){
  return currentSym != null;
}

Fixed version (ground truth):
public boolean hasNext(){
  if (currentSym == syms.noSymbol) {
    currentSym=symbolFor(types.supertype(prevSym.type));
  }
  return currentSym != null;
}
Program: 37182
Project: 37182
Buggy source:
public TypeSymbol next(){
  TypeSymbol prevSym=currentSym;
  currentSym=getSymbol(types.supertype(currentSym.type));
  return prevSym;
}

Fixed version (ground truth):
public TypeSymbol next(){
  prevSym=currentSym;
  currentSym=syms.noSymbol;
  Assert.check(prevSym != null || prevSym != syms.noSymbol);
  return prevSym;
}
Program: 37183
Project: 37183
Buggy source:
public void remove(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
public void remove(){
  throw new UnsupportedOperationException();
}
Program: 37184
Project: 37184
Buggy source:
/** 
 * Return an Iterable object to scan the superclasses of a given type. It's crucial that the scan is done lazily, as we don't want to accidentally access more supertypes than strictly needed (as this could trigger completion errors if some of the not-needed supertypes are missing/ill-formed).
 */
Iterable<TypeSymbol> superclasses(final Type intype){
  return new Iterable<TypeSymbol>(){
    public Iterator<TypeSymbol> iterator(){
      return new Iterator<TypeSymbol>(){
        List<TypeSymbol> seen=List.nil();
        TypeSymbol currentSym=getSymbol(intype);
        public boolean hasNext(){
          return currentSym != null;
        }
        public TypeSymbol next(){
          TypeSymbol prevSym=currentSym;
          currentSym=getSymbol(types.supertype(currentSym.type));
          return prevSym;
        }
        public void remove(){
          throw new UnsupportedOperationException("String_Node_Str");
        }
        TypeSymbol getSymbol(        Type intype){
          if (intype.tag != CLASS && intype.tag != TYPEVAR) {
            return null;
          }
          while (intype.tag == TYPEVAR)           intype=intype.getUpperBound();
          if (seen.contains(intype.tsym)) {
            return null;
          }
          seen=seen.prepend(intype.tsym);
          return intype.tsym;
        }
      }
;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Return an Iterable object to scan the superclasses of a given type. It's crucial that the scan is done lazily, as we don't want to accidentally access more supertypes than strictly needed (as this could trigger completion errors if some of the not-needed supertypes are missing/ill-formed).
 */
Iterable<TypeSymbol> superclasses(final Type intype){
  return new Iterable<TypeSymbol>(){
    public Iterator<TypeSymbol> iterator(){
      return new Iterator<TypeSymbol>(){
        List<TypeSymbol> seen=List.nil();
        TypeSymbol currentSym=symbolFor(intype);
        TypeSymbol prevSym=null;
        public boolean hasNext(){
          if (currentSym == syms.noSymbol) {
            currentSym=symbolFor(types.supertype(prevSym.type));
          }
          return currentSym != null;
        }
        public TypeSymbol next(){
          prevSym=currentSym;
          currentSym=syms.noSymbol;
          Assert.check(prevSym != null || prevSym != syms.noSymbol);
          return prevSym;
        }
        public void remove(){
          throw new UnsupportedOperationException();
        }
        TypeSymbol symbolFor(        Type t){
          if (t.tag != CLASS && t.tag != TYPEVAR) {
            return null;
          }
          while (t.tag == TYPEVAR)           t=t.getUpperBound();
          if (seen.contains(t.tsym)) {
            return null;
          }
          seen=seen.prepend(t.tsym);
          return t.tsym;
        }
      }
;
    }
  }
;
}
Program: 37185
Project: 37185
Buggy source:
private Symbol findMethod(Env<AttrContext> env,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes,Type intype,Symbol bestSoFar,boolean allowBoxing,boolean useVarargs,boolean operator){
  boolean abstractOk=true;
  List<Type> itypes=List.nil();
  for (  TypeSymbol s : superclasses(intype)) {
    bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,s.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
    abstractOk&=excludeAbstractsFilter.accepts(s);
    if (abstractOk) {
      for (      Type itype : types.interfaces(s.type)) {
        itypes=types.union(types.closure(itype),itypes);
      }
    }
    if (name == names.init)     break;
  }
  Symbol concrete=bestSoFar.kind < ERR && (bestSoFar.flags() & ABSTRACT) == 0 ? bestSoFar : methodNotFound;
  if (name != names.init) {
    for (    Type itype : itypes) {
      if (!itype.isInterface())       continue;
      bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,itype.tsym.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
      if (concrete != bestSoFar && concrete.kind < ERR && bestSoFar.kind < ERR && types.isSubSignature(concrete.type,bestSoFar.type)) {
        bestSoFar=concrete;
      }
    }
  }
  return bestSoFar;
}

Fixed version (ground truth):
private Symbol findMethod(Env<AttrContext> env,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes,Type intype,Symbol bestSoFar,boolean allowBoxing,boolean useVarargs,boolean operator){
  boolean abstractOk=true;
  List<Type> itypes=List.nil();
  for (  TypeSymbol s : superclasses(intype)) {
    bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,s.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
    abstractOk&=(s.flags() & (ABSTRACT | INTERFACE | ENUM)) != 0;
    if (abstractOk) {
      for (      Type itype : types.interfaces(s.type)) {
        itypes=types.union(types.closure(itype),itypes);
      }
    }
    if (name == names.init)     break;
  }
  Symbol concrete=bestSoFar.kind < ERR && (bestSoFar.flags() & ABSTRACT) == 0 ? bestSoFar : methodNotFound;
  if (name != names.init) {
    for (    Type itype : itypes) {
      if (!itype.isInterface())       continue;
      bestSoFar=lookupMethod(env,site,name,argtypes,typeargtypes,itype.tsym.members(),bestSoFar,allowBoxing,useVarargs,operator,true);
      if (concrete != bestSoFar && concrete.kind < ERR && bestSoFar.kind < ERR && types.isSubSignature(concrete.type,bestSoFar.type)) {
        bestSoFar=concrete;
      }
    }
  }
  return bestSoFar;
}
Program: 37186
Project: 37186
Buggy source:
public boolean accepts(Name n){
  return n == names.init;
}

Fixed version (ground truth):
public boolean accepts(Name n){
  return n == n.table.names.init;
}
Program: 37187
Project: 37187
Buggy source:
public MethodHandle(int refKind,Symbol refSym,Names names){
  this.refKind=refKind;
  this.refSym=refSym;
  this.names=names;
  checkConsistent();
}

Fixed version (ground truth):
public MethodHandle(int refKind,Symbol refSym){
  this.refKind=refKind;
  this.refSym=refSym;
  checkConsistent();
}
Program: 37189
Project: 37189
Buggy source:
/** 
 * Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {&#64link <i>reference</i>} tags)  but not block tags. Each section of plain text is represented as a   {@link Tag}of   {@linkplain Tag#kind() kind} "Text".Inline tags are represented as a  {@link SeeTag} of kind "@see"and name "@link". <p> If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): &quot;This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.&quot;, in addition a line will be terminated by block HTML tags: &lt;p&gt;  &lt;/p&gt;  &lt;h1&gt; &lt;h2&gt;  &lt;h3&gt; &lt;h4&gt;  &lt;h5&gt;  &lt;h6&gt; &lt;hr&gt;  &lt;pre&gt;  or &lt;/pre&gt;. If the locale is not English, the sentence end will be determined by {@link BreakIterator#getSentenceInstance(Locale)}.
 * @return an array of {@link Tag}s representing the first sentence of the comment
 */
Tag[] firstSentenceTags();

Fixed version (ground truth):
/** 
 * Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {&#64;link <i>reference</i>} tags)  but not block tags. Each section of plain text is represented as a   {@link Tag}of   {@linkplain Tag#kind() kind} "Text".Inline tags are represented as a  {@link SeeTag} of kind "@see"and name "@link". <p> If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): &quot;This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.&quot;, in addition a line will be terminated by block HTML tags: &lt;p&gt;  &lt;/p&gt;  &lt;h1&gt; &lt;h2&gt;  &lt;h3&gt; &lt;h4&gt;  &lt;h5&gt;  &lt;h6&gt; &lt;hr&gt;  &lt;pre&gt;  or &lt;/pre&gt;. If the locale is not English, the sentence end will be determined by {@link BreakIterator#getSentenceInstance(Locale)}.
 * @return an array of {@link Tag}s representing the first sentence of the comment
 */
Tag[] firstSentenceTags();
Program: 37190
Project: 37190
Buggy source:
/** 
 * Return comment as an array of tags. Includes inline tags (i.e. {&#64link <i>reference</i>} tags)  but not block tags. Each section of plain text is represented as a   {@link Tag}of   {@linkplain Tag#kind() kind} "Text".Inline tags are represented as a  {@link SeeTag} of kind "@see"and name "@link".
 * @return an array of {@link Tag}s representing the comment
 */
Tag[] inlineTags();

Fixed version (ground truth):
/** 
 * Return comment as an array of tags. Includes inline tags (i.e. {&#64;link <i>reference</i>} tags)  but not block tags. Each section of plain text is represented as a   {@link Tag}of   {@linkplain Tag#kind() kind} "Text".Inline tags are represented as a  {@link SeeTag} of kind "@see"and name "@link".
 * @return an array of {@link Tag}s representing the comment
 */
Tag[] inlineTags();
Program: 37191
Project: 37191
Buggy source:
/** 
 * Return the param tags in this method, excluding the type parameter tags.
 * @return an array of ParamTag containing all <code>&#64param</code> tagscorresponding to the parameters of this method.
 */
ParamTag[] paramTags();

Fixed version (ground truth):
/** 
 * Return the param tags in this method, excluding the type parameter tags.
 * @return an array of ParamTag containing all <code>&#64;param</code> tagscorresponding to the parameters of this method.
 */
ParamTag[] paramTags();
Program: 37192
Project: 37192
Buggy source:
/** 
 * Return the type parameter tags in this method.
 * @return an array of ParamTag containing all <code>&#64param</code> tagscorresponding to the type parameters of this method.
 * @since 1.5
 */
ParamTag[] typeParamTags();

Fixed version (ground truth):
/** 
 * Return the type parameter tags in this method.
 * @return an array of ParamTag containing all <code>&#64;param</code> tagscorresponding to the type parameters of this method.
 * @since 1.5
 */
ParamTag[] typeParamTags();
Program: 37193
Project: 37193
Buggy source:
/** 
 * Return the throws tags in this method.
 * @return an array of ThrowTag containing all <code>&#64exception</code>and <code>&#64throws</code> tags.
 */
ThrowsTag[] throwsTags();

Fixed version (ground truth):
/** 
 * Return the throws tags in this method.
 * @return an array of ThrowTag containing all <code>&#64;exception</code>and <code>&#64;throws</code> tags.
 */
ThrowsTag[] throwsTags();
Program: 37194
Project: 37194
Buggy source:
/** 
 * Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {&#64link <i>reference</i>} tags)  but not block tags. Each section of plain text is represented as a   {@link Tag}of kind "Text". Inline tags are represented as a   {@link SeeTag} of kind "@link".If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): &quot;This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.&quot;, in addition a line will be terminated by paragraph and section terminating HTML tags: &lt;p&gt;  &lt;/p&gt;  &lt;h1&gt; &lt;h2&gt;  &lt;h3&gt; &lt;h4&gt;  &lt;h5&gt;  &lt;h6&gt; &lt;hr&gt;  &lt;pre&gt;  or &lt;/pre&gt;. If the locale is not English, the sentence end will be determined by {@link BreakIterator#getSentenceInstance(Locale)}.
 * @return an array of {@link Tag} objects representing thefirst sentence of the comment
 */
Tag[] firstSentenceTags();

Fixed version (ground truth):
/** 
 * Return the first sentence of the comment as an array of tags. Includes inline tags (i.e. {&#64;link <i>reference</i>} tags)  but not block tags. Each section of plain text is represented as a   {@link Tag}of kind "Text". Inline tags are represented as a   {@link SeeTag} of kind "@link".If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): &quot;This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.&quot;, in addition a line will be terminated by paragraph and section terminating HTML tags: &lt;p&gt;  &lt;/p&gt;  &lt;h1&gt; &lt;h2&gt;  &lt;h3&gt; &lt;h4&gt;  &lt;h5&gt;  &lt;h6&gt; &lt;hr&gt;  &lt;pre&gt;  or &lt;/pre&gt;. If the locale is not English, the sentence end will be determined by {@link BreakIterator#getSentenceInstance(Locale)}.
 * @return an array of {@link Tag} objects representing thefirst sentence of the comment
 */
Tag[] firstSentenceTags();
Program: 37195
Project: 37195
Buggy source:
/** 
 * Find the start position of a line.
 * @param line line number (beginning at 1)
 * @return     position of first character in line
 * @throws IndexOutOfBoundsException if <tt>lineNumber < 1</tt> if <tt>lineNumber > no. of lines</tt>
 */
long getStartPosition(long line);

Fixed version (ground truth):
/** 
 * Find the start position of a line.
 * @param line line number (beginning at 1)
 * @return     position of first character in line
 * @throws IndexOutOfBoundsException if  {@code lineNumber < 1}if   {@code lineNumber > no. of lines}
 */
long getStartPosition(long line);
Program: 37196
Project: 37196
Buggy source:
/** 
 * Print the heading in Html &lt;H2> format.
 * @param str The Header string.
 */
public void printIndexHeading(String str){
  h2();
  print(str);
  h2End();
}

Fixed version (ground truth):
/** 
 * Print the heading in Html   {@literal <H2>} format.
 * @param str The Header string.
 */
public void printIndexHeading(String str){
  h2();
  print(str);
  h2End();
}
Program: 37198
Project: 37198
Buggy source:
/** 
 * Handles the &lt;ClassDoc> tag.
 * @param node the XML element that specifies which components to document
 * @param contentTree the content tree to which the documentation will be added
 */
public void buildClassDoc(XMLNode node,Content contentTree) throws Exception {
  String key;
  if (isInterface) {
    key="String_Node_Str";
  }
 else   if (isEnum) {
    key="String_Node_Str";
  }
 else {
    key="String_Node_Str";
  }
  contentTree=writer.getHeader(configuration.getText(key) + "String_Node_Str" + classDoc.name());
  Content classContentTree=writer.getClassContentHeader();
  buildChildren(node,classContentTree);
  contentTree.addContent(classContentTree);
  writer.addFooter(contentTree);
  writer.printDocument(contentTree);
  writer.close();
  copyDocFiles();
}

Fixed version (ground truth):
/** 
 * Handles the   {@literal <ClassDoc>} tag.
 * @param node the XML element that specifies which components to document
 * @param contentTree the content tree to which the documentation will be added
 */
public void buildClassDoc(XMLNode node,Content contentTree) throws Exception {
  String key;
  if (isInterface) {
    key="String_Node_Str";
  }
 else   if (isEnum) {
    key="String_Node_Str";
  }
 else {
    key="String_Node_Str";
  }
  contentTree=writer.getHeader(configuration.getText(key) + "String_Node_Str" + classDoc.name());
  Content classContentTree=writer.getClassContentHeader();
  buildChildren(node,classContentTree);
  contentTree.addContent(classContentTree);
  writer.addFooter(contentTree);
  writer.printDocument(contentTree);
  writer.close();
  copyDocFiles();
}
Program: 37199
Project: 37199
Buggy source:
/** 
 * Enter a binary operation, as above but with two opcodes, which get encoded as (opcode1 << ByteCodeTags.preShift) + opcode2.
 * @param opcode1     First opcode.
 * @param opcode2     Second opcode.
 */
private void enterBinop(String name,Type left,Type right,Type res,int opcode1,int opcode2){
  enterBinop(name,left,right,res,(opcode1 << ByteCodes.preShift) | opcode2);
}

Fixed version (ground truth):
/** 
 * Enter a binary operation, as above but with two opcodes, which get encoded as  {@code (opcode1 << ByteCodeTags.preShift) + opcode2 }.
 * @param opcode1     First opcode.
 * @param opcode2     Second opcode.
 */
private void enterBinop(String name,Type left,Type right,Type res,int opcode1,int opcode2){
  enterBinop(name,left,right,res,(opcode1 << ByteCodes.preShift) | opcode2);
}