nus-yam/ex-repair huggingface dataset:
Program: 37081
Project: 37081
Buggy source:
@Override public RegExpMatcher match(final String str){
  if (pattern == null) {
    return null;
  }
  RegExpMatcher matcher=this.matcher;
  if (matcher == null || matcher.getInput() != str) {
    matcher=new DefaultMatcher(str);
    this.matcher=matcher;
  }
  return matcher;
}

Fixed version (ground truth):
@Override public RegExpMatcher match(final String str){
  if (pattern == null) {
    return null;
  }
  RegExpMatcher currentMatcher=this.matcher;
  if (currentMatcher == null || matcher.getInput() != str) {
    currentMatcher=new DefaultMatcher(str);
    this.matcher=currentMatcher;
  }
  return currentMatcher;
}
Program: 37082
Project: 37082
Buggy source:
@Override public RegExpMatcher match(final String input){
  if (regex == null) {
    return null;
  }
  RegExpMatcher matcher=this.matcher;
  if (matcher == null || input != matcher.getInput()) {
    matcher=new JoniMatcher(input);
    this.matcher=matcher;
  }
  return matcher;
}

Fixed version (ground truth):
@Override public RegExpMatcher match(final String input){
  if (regex == null) {
    return null;
  }
  RegExpMatcher currentMatcher=this.matcher;
  if (currentMatcher == null || input != currentMatcher.getInput()) {
    currentMatcher=new JoniMatcher(input);
    this.matcher=currentMatcher;
  }
  return currentMatcher;
}
Program: 37083
Project: 37083
Buggy source:
/** 
 * Throw a regexp parser exception.
 * @param key the message key
 * @param str string argument
 * @throws jdk.nashorn.internal.runtime.ParserException
 */
protected static void throwParserException(final String key,final String str) throws ParserException {
  throw new ParserException(ECMAErrors.getMessage("String_Node_Str" + key,str));
}

Fixed version (ground truth):
/** 
 * Throw a regexp parser exception.
 * @param key the message key
 * @param str string argument
 * @throws jdk.nashorn.internal.runtime.ParserException unconditionally
 */
protected static void throwParserException(final String key,final String str) throws ParserException {
  throw new ParserException(ECMAErrors.getMessage("String_Node_Str" + key,str));
}
Program: 37084
Project: 37084
Buggy source:
/** 
 * Creates a Regular expression from the given   {@code pattern} and {@code flags} strings.
 * @param pattern RegExp pattern string
 * @param flags RegExp flags string
 * @throws ParserException if flags is invalid or pattern string has syntax error.
 */
protected RegExp compile(final String pattern,final String flags) throws ParserException {
  return new DefaultRegExp(pattern,flags);
}

Fixed version (ground truth):
/** 
 * Creates a Regular expression from the given   {@code pattern} and {@code flags} strings.
 * @param pattern RegExp pattern string
 * @param flags   RegExp flags string
 * @return new RegExp
 * @throws ParserException if flags is invalid or pattern string has syntax error.
 */
protected RegExp compile(final String pattern,final String flags) throws ParserException {
  return new DefaultRegExp(pattern,flags);
}
Program: 37085
Project: 37085
Buggy source:
/** 
 * Compile a regexp with the given   {@code source} and {@code flags}.
 * @param pattern RegExp pattern string
 * @param flags  flag string
 * @throws ParserException if invalid source or flags
 */
public static RegExp create(final String pattern,final String flags){
  return instance.compile(pattern,flags);
}

Fixed version (ground truth):
/** 
 * Compile a regexp with the given   {@code source} and {@code flags}.
 * @param pattern RegExp pattern string
 * @param flags   flag string
 * @return new RegExp
 * @throws ParserException if invalid source or flags
 */
public static RegExp create(final String pattern,final String flags){
  return instance.compile(pattern,flags);
}
Program: 37086
Project: 37086
Buggy source:
/** 
 * Get the group with the given index or the empty string if group index is not valid.
 * @param index the group index
 * @return the group or ""
 */
public Object getGroup(int index){
  return index >= 0 && index < groups.length ? groups[index] : "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Get the group with the given index or the empty string if group index is not valid.
 * @param groupIndex the group index
 * @return the group or ""
 */
public Object getGroup(final int groupIndex){
  return groupIndex >= 0 && groupIndex < groups.length ? groups[groupIndex] : "String_Node_Str";
}
Program: 37087
Project: 37087
Buggy source:
public static boolean isDynamicMethod(final Object obj){
  return obj instanceof DynamicMethod;
}

Fixed version (ground truth):
/** 
 * Returns true if the object is a Dynalink Java dynamic method.
 * @param obj the object we want to test for being a dynamic method
 * @return true if it is a dynamic method, false otherwise.
 */
public static boolean isDynamicMethod(final Object obj){
  return obj instanceof DynamicMethod;
}
Program: 37088
Project: 37088
Buggy source:
public static boolean isDynamicMethod(final Object obj){
  return obj instanceof DynamicMethod;
}

Fixed version (ground truth):
/** 
 * Returns true if the object is a Dynalink Java dynamic method.
 * @param obj the object we want to test for being a dynamic method
 * @return true if it is a dynamic method, false otherwise.
 */
public static boolean isDynamicMethod(final Object obj){
  return obj instanceof DynamicMethod;
}
Program: 37093
Project: 37093
Buggy source:
@Override public Symbol access(Name name,TypeSymbol location){
  return types.createErrorType(name,location,syms.errSymbol.type).tsym;
}

Fixed version (ground truth):
@Override protected Symbol access(Name name,TypeSymbol location){
  return ambiguousSyms.last();
}
Program: 37095
Project: 37095
Buggy source:
AmbiguityError(Symbol sym1,Symbol sym2){
  super(AMBIGUOUS,sym1,"String_Node_Str");
  this.sym2=sym2;
}

Fixed version (ground truth):
AmbiguityError(Symbol sym1,Symbol sym2){
  super(AMBIGUOUS,"String_Node_Str");
  ambiguousSyms=flatten(sym2).appendList(flatten(sym1));
}
Program: 37096
Project: 37096
Buggy source:
@Override JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,DiagnosticPosition pos,Symbol location,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes){
  AmbiguityError pair=this;
  while (true) {
    if (pair.sym.kind == AMBIGUOUS)     pair=(AmbiguityError)pair.sym;
 else     if (pair.sym2.kind == AMBIGUOUS)     pair=(AmbiguityError)pair.sym2;
 else     break;
  }
  Name sname=pair.sym.name;
  if (sname == names.init)   sname=pair.sym.owner.name;
  return diags.create(dkind,log.currentSource(),pos,"String_Node_Str",sname,kindName(pair.sym),pair.sym,pair.sym.location(site,types),kindName(pair.sym2),pair.sym2,pair.sym2.location(site,types));
}

Fixed version (ground truth):
@Override JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,DiagnosticPosition pos,Symbol location,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes){
  List<Symbol> diagSyms=ambiguousSyms.reverse();
  Symbol s1=diagSyms.head;
  Symbol s2=diagSyms.tail.head;
  Name sname=s1.name;
  if (sname == names.init)   sname=s1.owner.name;
  return diags.create(dkind,log.currentSource(),pos,"String_Node_Str",sname,kindName(s1),s1,s1.location(site,types),kindName(s2),s2,s2.location(site,types));
}
Program: 37097
Project: 37097
Buggy source:
@Override public boolean exists(){
  return false;
}

Fixed version (ground truth):
@Override public boolean exists(){
  return true;
}
Program: 37098
Project: 37098
Buggy source:
@Override public Symbol access(Name name,TypeSymbol location){
  return types.createErrorType(name,location,syms.errSymbol.type).tsym;
}

Fixed version (ground truth):
@Override protected Symbol access(Name name,TypeSymbol location){
  return ambiguousSyms.last();
}
Program: 37100
Project: 37100
Buggy source:
AmbiguityError(Symbol sym1,Symbol sym2){
  super(AMBIGUOUS,sym1,"String_Node_Str");
  this.sym2=sym2;
}

Fixed version (ground truth):
AmbiguityError(Symbol sym1,Symbol sym2){
  super(AMBIGUOUS,"String_Node_Str");
  ambiguousSyms=flatten(sym2).appendList(flatten(sym1));
}
Program: 37101
Project: 37101
Buggy source:
@Override JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,DiagnosticPosition pos,Symbol location,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes){
  AmbiguityError pair=this;
  while (true) {
    if (pair.sym.kind == AMBIGUOUS)     pair=(AmbiguityError)pair.sym;
 else     if (pair.sym2.kind == AMBIGUOUS)     pair=(AmbiguityError)pair.sym2;
 else     break;
  }
  Name sname=pair.sym.name;
  if (sname == names.init)   sname=pair.sym.owner.name;
  return diags.create(dkind,log.currentSource(),pos,"String_Node_Str",sname,kindName(pair.sym),pair.sym,pair.sym.location(site,types),kindName(pair.sym2),pair.sym2,pair.sym2.location(site,types));
}

Fixed version (ground truth):
@Override JCDiagnostic getDiagnostic(JCDiagnostic.DiagnosticType dkind,DiagnosticPosition pos,Symbol location,Type site,Name name,List<Type> argtypes,List<Type> typeargtypes){
  List<Symbol> diagSyms=ambiguousSyms.reverse();
  Symbol s1=diagSyms.head;
  Symbol s2=diagSyms.tail.head;
  Name sname=s1.name;
  if (sname == names.init)   sname=s1.owner.name;
  return diags.create(dkind,log.currentSource(),pos,"String_Node_Str",sname,kindName(s1),s1,s1.location(site,types),kindName(s2),s2,s2.location(site,types));
}
Program: 37102
Project: 37102
Buggy source:
@Override public boolean exists(){
  return false;
}

Fixed version (ground truth):
@Override public boolean exists(){
  return true;
}
Program: 37103
Project: 37103
Buggy source:
/** 
 * Construct the SplitIndexWriter. Uses path to this file and relative path from this file.
 * @param path       Path to the file which is getting generated.
 * @param filename   Name of the file which is getting genrated.
 * @param relpath    Relative path from this file to the current directory.
 * @param indexbuilder Unicode based Index from {@link IndexBuilder}
 */
public SplitIndexWriter(ConfigurationImpl configuration,DocPath path,IndexBuilder indexbuilder,int prev,int next) throws IOException {
  super(configuration,path,indexbuilder);
  this.prev=prev;
  this.next=next;
}

Fixed version (ground truth):
/** 
 * Construct the SplitIndexWriter. Uses path to this file and relative path from this file.
 * @param path       Path to the file which is getting generated.
 * @param indexbuilder Unicode based Index from {@link IndexBuilder}
 */
public SplitIndexWriter(ConfigurationImpl configuration,DocPath path,IndexBuilder indexbuilder,int prev,int next) throws IOException {
  super(configuration,path,indexbuilder);
  this.prev=prev;
  this.next=next;
}
Program: 37105
Project: 37105
Buggy source:
/** 
 * @inheritDoc 
 */
@Override public int hashCode(){
  return path.hashCode();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public int hashCode(){
  return path.hashCode();
}
Program: 37106
Project: 37106
Buggy source:
/** 
 * @inheritDoc 
 */
@Override public boolean equals(Object other){
  return (other instanceof DocPath) && path.equals(((DocPath)other).path);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public boolean equals(Object other){
  return (other instanceof DocPath) && path.equals(((DocPath)other).path);
}
Program: 37107
Project: 37107
Buggy source:
/** 
 * Find the specified directory in the source path.
 * @param name Name of the directory to be searched for in the source path.
 * @return File Return the directory if found else return null.
 */
public File getDirectory(DocPath p){
  for (int i=0; i < sourcePath.length; i++) {
    File directoryNeeded=new File(sourcePath[i],p.getPath());
    if (directoryNeeded.isDirectory()) {
      return directoryNeeded;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find the specified directory in the source path.
 * @param p Name of the directory to be searched for in the source path.
 * @return File Return the directory if found else return null.
 */
public File getDirectory(DocPath p){
  for (int i=0; i < sourcePath.length; i++) {
    File directoryNeeded=new File(sourcePath[i],p.getPath());
    if (directoryNeeded.isDirectory()) {
      return directoryNeeded;
    }
  }
  return null;
}
Program: 37108
Project: 37108
Buggy source:
/** 
 * Create the directory path for the file to be generated, construct FileOutputStream and OutputStreamWriter depending upon docencoding.
 * @param path The directory path to be created for this file.
 * @param filename File Name to which the PrintWriter will do the Output.
 * @param docencoding Encoding to be used for this file.
 * @exception IOException Exception raised by the FileWriter is passed onto next level.
 * @exception UnsupportedEncodingException Exception raised by theOutputStreamWriter is passed on to next level.
 * @return Writer Writer for the file getting generated.
 * @see java.io.FileOutputStream
 * @see java.io.OutputStreamWriter
 */
public static Writer genWriter(Configuration configuration,DocPath path) throws IOException, UnsupportedEncodingException {
  File file=path.resolveAgainst(configuration.destDirName);
  createDirectory(configuration,file.getParentFile());
  FileOutputStream fos=new FileOutputStream(file);
  if (configuration.docencoding == null) {
    return new BufferedWriter(new OutputStreamWriter(fos));
  }
 else {
    return new BufferedWriter(new OutputStreamWriter(fos,configuration.docencoding));
  }
}

Fixed version (ground truth):
/** 
 * Create the directory path for the file to be generated, construct FileOutputStream and OutputStreamWriter depending upon docencoding.
 * @param path The directory path to be created for this file.
 * @exception IOException Exception raised by the FileWriter is passed onto next level.
 * @exception UnsupportedEncodingException Exception raised by theOutputStreamWriter is passed on to next level.
 * @return Writer Writer for the file getting generated.
 * @see java.io.FileOutputStream
 * @see java.io.OutputStreamWriter
 */
public static Writer genWriter(Configuration configuration,DocPath path) throws IOException, UnsupportedEncodingException {
  File file=path.resolveAgainst(configuration.destDirName);
  createDirectory(configuration,file.getParentFile());
  FileOutputStream fos=new FileOutputStream(file);
  if (configuration.docencoding == null) {
    return new BufferedWriter(new OutputStreamWriter(fos));
  }
 else {
    return new BufferedWriter(new OutputStreamWriter(fos,configuration.docencoding));
  }
}
Program: 37109
Project: 37109
Buggy source:
/** 
 * Given a path string create all the directories in the path. For example, if the path string is "java/applet", the method will create directory "java" and then "java/applet" if they don't exist. The file separator string "/" is platform dependent system property.
 * @param path Directory path string.
 */
public static void createDirectory(Configuration configuration,File dir){
  if (dir == null) {
    return;
  }
  if (dir.exists()) {
    return;
  }
 else {
    if (dir.mkdirs()) {
      return;
    }
 else {
      configuration.message.error("String_Node_Str",dir.getPath());
      throw new DocletAbortException();
    }
  }
}

Fixed version (ground truth):
/** 
 * Given a path string create all the directories in the path. For example, if the path string is "java/applet", the method will create directory "java" and then "java/applet" if they don't exist. The file separator string "/" is platform dependent system property.
 * @param dir Directory path string.
 */
public static void createDirectory(Configuration configuration,File dir){
  if (dir == null) {
    return;
  }
  if (dir.exists()) {
    return;
  }
 else {
    if (dir.mkdirs()) {
      return;
    }
 else {
      configuration.message.error("String_Node_Str",dir.getPath());
      throw new DocletAbortException();
    }
  }
}
Program: 37110
Project: 37110
Buggy source:
/** 
 * Construct the SplitIndexWriter. Uses path to this file and relative path from this file.
 * @param path       Path to the file which is getting generated.
 * @param filename   Name of the file which is getting genrated.
 * @param relpath    Relative path from this file to the current directory.
 * @param indexbuilder Unicode based Index from {@link IndexBuilder}
 */
public SplitIndexWriter(ConfigurationImpl configuration,DocPath path,IndexBuilder indexbuilder,int prev,int next) throws IOException {
  super(configuration,path,indexbuilder);
  this.prev=prev;
  this.next=next;
}

Fixed version (ground truth):
/** 
 * Construct the SplitIndexWriter. Uses path to this file and relative path from this file.
 * @param path       Path to the file which is getting generated.
 * @param indexbuilder Unicode based Index from {@link IndexBuilder}
 */
public SplitIndexWriter(ConfigurationImpl configuration,DocPath path,IndexBuilder indexbuilder,int prev,int next) throws IOException {
  super(configuration,path,indexbuilder);
  this.prev=prev;
  this.next=next;
}
Program: 37112
Project: 37112
Buggy source:
/** 
 * @inheritDoc 
 */
@Override public int hashCode(){
  return path.hashCode();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public int hashCode(){
  return path.hashCode();
}
Program: 37113
Project: 37113
Buggy source:
/** 
 * @inheritDoc 
 */
@Override public boolean equals(Object other){
  return (other instanceof DocPath) && path.equals(((DocPath)other).path);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public boolean equals(Object other){
  return (other instanceof DocPath) && path.equals(((DocPath)other).path);
}
Program: 37114
Project: 37114
Buggy source:
/** 
 * Find the specified directory in the source path.
 * @param name Name of the directory to be searched for in the source path.
 * @return File Return the directory if found else return null.
 */
public File getDirectory(DocPath p){
  for (int i=0; i < sourcePath.length; i++) {
    File directoryNeeded=new File(sourcePath[i],p.getPath());
    if (directoryNeeded.isDirectory()) {
      return directoryNeeded;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Find the specified directory in the source path.
 * @param p Name of the directory to be searched for in the source path.
 * @return File Return the directory if found else return null.
 */
public File getDirectory(DocPath p){
  for (int i=0; i < sourcePath.length; i++) {
    File directoryNeeded=new File(sourcePath[i],p.getPath());
    if (directoryNeeded.isDirectory()) {
      return directoryNeeded;
    }
  }
  return null;
}
Program: 37115
Project: 37115
Buggy source:
/** 
 * Create the directory path for the file to be generated, construct FileOutputStream and OutputStreamWriter depending upon docencoding.
 * @param path The directory path to be created for this file.
 * @param filename File Name to which the PrintWriter will do the Output.
 * @param docencoding Encoding to be used for this file.
 * @exception IOException Exception raised by the FileWriter is passed onto next level.
 * @exception UnsupportedEncodingException Exception raised by theOutputStreamWriter is passed on to next level.
 * @return Writer Writer for the file getting generated.
 * @see java.io.FileOutputStream
 * @see java.io.OutputStreamWriter
 */
public static Writer genWriter(Configuration configuration,DocPath path) throws IOException, UnsupportedEncodingException {
  File file=path.resolveAgainst(configuration.destDirName);
  createDirectory(configuration,file.getParentFile());
  FileOutputStream fos=new FileOutputStream(file);
  if (configuration.docencoding == null) {
    return new BufferedWriter(new OutputStreamWriter(fos));
  }
 else {
    return new BufferedWriter(new OutputStreamWriter(fos,configuration.docencoding));
  }
}

Fixed version (ground truth):
/** 
 * Create the directory path for the file to be generated, construct FileOutputStream and OutputStreamWriter depending upon docencoding.
 * @param path The directory path to be created for this file.
 * @exception IOException Exception raised by the FileWriter is passed onto next level.
 * @exception UnsupportedEncodingException Exception raised by theOutputStreamWriter is passed on to next level.
 * @return Writer Writer for the file getting generated.
 * @see java.io.FileOutputStream
 * @see java.io.OutputStreamWriter
 */
public static Writer genWriter(Configuration configuration,DocPath path) throws IOException, UnsupportedEncodingException {
  File file=path.resolveAgainst(configuration.destDirName);
  createDirectory(configuration,file.getParentFile());
  FileOutputStream fos=new FileOutputStream(file);
  if (configuration.docencoding == null) {
    return new BufferedWriter(new OutputStreamWriter(fos));
  }
 else {
    return new BufferedWriter(new OutputStreamWriter(fos,configuration.docencoding));
  }
}
Program: 37116
Project: 37116
Buggy source:
/** 
 * Given a path string create all the directories in the path. For example, if the path string is "java/applet", the method will create directory "java" and then "java/applet" if they don't exist. The file separator string "/" is platform dependent system property.
 * @param path Directory path string.
 */
public static void createDirectory(Configuration configuration,File dir){
  if (dir == null) {
    return;
  }
  if (dir.exists()) {
    return;
  }
 else {
    if (dir.mkdirs()) {
      return;
    }
 else {
      configuration.message.error("String_Node_Str",dir.getPath());
      throw new DocletAbortException();
    }
  }
}

Fixed version (ground truth):
/** 
 * Given a path string create all the directories in the path. For example, if the path string is "java/applet", the method will create directory "java" and then "java/applet" if they don't exist. The file separator string "/" is platform dependent system property.
 * @param dir Directory path string.
 */
public static void createDirectory(Configuration configuration,File dir){
  if (dir == null) {
    return;
  }
  if (dir.exists()) {
    return;
  }
 else {
    if (dir.mkdirs()) {
      return;
    }
 else {
      configuration.message.error("String_Node_Str",dir.getPath());
      throw new DocletAbortException();
    }
  }
}
Program: 37117
Project: 37117
Buggy source:
/** 
 * Return the kind of this tag. similar or synonymous tags.  For most tags, <code>kind()&nbsp;==&nbsp;name()</code>; the following table lists those cases where there is more than one tag of a given kind: <p> <table border="1" cellpadding="4" cellspacing="0"> <tr><th><tt> kind()  </th>  <th><tt> name()      </th></tr> <tr><td><tt> @throws </td>  <td><tt> @throws     </td></tr> <tr><td><tt> @throws </td>  <td><tt> @exception  </td></tr> <tr><td><tt> @see    </td>  <td><tt> @see        </td></tr> <tr><td><tt> @see    </td>  <td><tt> @link       </td></tr> <tr><td><tt> @see    </td>  <td><tt> @linkplain  </td></tr> <tr><td><tt> @serial </td>  <td><tt> @serial     </td></tr> <tr><td><tt> @serial </td>  <td><tt> @serialData </td></tr> </table>
 */
String kind();

Fixed version (ground truth):
/** 
 * Return the kind of this tag. similar or synonymous tags.  For most tags, <code>kind()&nbsp;==&nbsp;name()</code>; the following table lists those cases where there is more than one tag of a given kind: <p> <table border="1" cellpadding="4" cellspacing="0"> <tr><th><tt> kind()  </tt></th>  <th><tt> name()      </tt></th></tr> <tr><td><tt> @throws </tt></td>  <td><tt> @throws     </tt></td></tr> <tr><td><tt> @throws </tt></td>  <td><tt> @exception  </tt></td></tr> <tr><td><tt> @see    </tt></td>  <td><tt> @see        </tt></td></tr> <tr><td><tt> @see    </tt></td>  <td><tt> @link       </tt></td></tr> <tr><td><tt> @see    </tt></td>  <td><tt> @linkplain  </tt></td></tr> <tr><td><tt> @serial </tt></td>  <td><tt> @serial     </tt></td></tr> <tr><td><tt> @serial </tt></td>  <td><tt> @serialData </tt></td></tr> </table>
 */
String kind();
Program: 37118
Project: 37118
Buggy source:
/** 
 * Get the ClassFile object for a specified class.
 * @param className the name of the class to be returned.
 * @return the ClassFile for the given class
 * @throws Dependencies #ClassFileNotFoundException if the classfile cannot be found
 */
public ClassFile getClassFile(String className) throws ClassFileNotFoundException ;

Fixed version (ground truth):
/** 
 * Get the ClassFile object for a specified class.
 * @param className the name of the class to be returned.
 * @return the ClassFile for the given class
 * @throws Dependencies.ClassFileNotFoundException if the classfile cannot befound
 */
public ClassFile getClassFile(String className) throws ClassFileNotFoundException ;
Program: 37119
Project: 37119
Buggy source:
/** 
 * See   {@link Kind#LOCAL_UBYTE}. 
 */
R visitLocalAndValue(Instruction instr,int index,int value,P p);

Fixed version (ground truth):
/** 
 * See   {@link Kind#LOCAL_BYTE}. 
 */
R visitLocalAndValue(Instruction instr,int index,int value,P p);
Program: 37121
Project: 37121
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: 37122
Project: 37122
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: 37123
Project: 37123
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: 37124
Project: 37124
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: 37125
Project: 37125
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: 37126
Project: 37126
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: 37127
Project: 37127
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: 37128
Project: 37128
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: 37129
Project: 37129
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: 37131
Project: 37131
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: 37132
Project: 37132
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: 37133
Project: 37133
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: 37135
Project: 37135
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: 37137
Project: 37137
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: 37138
Project: 37138
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: 37139
Project: 37139
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: 37140
Project: 37140
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: 37141
Project: 37141
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: 37142
Project: 37142
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: 37143
Project: 37143
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: 37144
Project: 37144
Buggy source:
/** 
 * Return the kind of this tag. similar or synonymous tags.  For most tags, <code>kind()&nbsp;==&nbsp;name()</code>; the following table lists those cases where there is more than one tag of a given kind: <p> <table border="1" cellpadding="4" cellspacing="0"> <tr><th><tt> kind()  </th>  <th><tt> name()      </th></tr> <tr><td><tt> @throws </td>  <td><tt> @throws     </td></tr> <tr><td><tt> @throws </td>  <td><tt> @exception  </td></tr> <tr><td><tt> @see    </td>  <td><tt> @see        </td></tr> <tr><td><tt> @see    </td>  <td><tt> @link       </td></tr> <tr><td><tt> @see    </td>  <td><tt> @linkplain  </td></tr> <tr><td><tt> @serial </td>  <td><tt> @serial     </td></tr> <tr><td><tt> @serial </td>  <td><tt> @serialData </td></tr> </table>
 */
String kind();

Fixed version (ground truth):
/** 
 * Return the kind of this tag. similar or synonymous tags.  For most tags, <code>kind()&nbsp;==&nbsp;name()</code>; the following table lists those cases where there is more than one tag of a given kind: <p> <table border="1" cellpadding="4" cellspacing="0"> <tr><th><tt> kind()  </tt></th>  <th><tt> name()      </tt></th></tr> <tr><td><tt> @throws </tt></td>  <td><tt> @throws     </tt></td></tr> <tr><td><tt> @throws </tt></td>  <td><tt> @exception  </tt></td></tr> <tr><td><tt> @see    </tt></td>  <td><tt> @see        </tt></td></tr> <tr><td><tt> @see    </tt></td>  <td><tt> @link       </tt></td></tr> <tr><td><tt> @see    </tt></td>  <td><tt> @linkplain  </tt></td></tr> <tr><td><tt> @serial </tt></td>  <td><tt> @serial     </tt></td></tr> <tr><td><tt> @serial </tt></td>  <td><tt> @serialData </tt></td></tr> </table>
 */
String kind();
Program: 37145
Project: 37145
Buggy source:
/** 
 * Get the ClassFile object for a specified class.
 * @param className the name of the class to be returned.
 * @return the ClassFile for the given class
 * @throws Dependencies #ClassFileNotFoundException if the classfile cannot be found
 */
public ClassFile getClassFile(String className) throws ClassFileNotFoundException ;

Fixed version (ground truth):
/** 
 * Get the ClassFile object for a specified class.
 * @param className the name of the class to be returned.
 * @return the ClassFile for the given class
 * @throws Dependencies.ClassFileNotFoundException if the classfile cannot befound
 */
public ClassFile getClassFile(String className) throws ClassFileNotFoundException ;
Program: 37146
Project: 37146
Buggy source:
/** 
 * See   {@link Kind#LOCAL_UBYTE}. 
 */
R visitLocalAndValue(Instruction instr,int index,int value,P p);

Fixed version (ground truth):
/** 
 * See   {@link Kind#LOCAL_BYTE}. 
 */
R visitLocalAndValue(Instruction instr,int index,int value,P p);