nus-yam/ex-repair huggingface dataset:
Program: 37201
Project: 37201
Buggy source:
/** 
 * Construct a tree that represents the closest outer instance <C.this> such that the given symbol is a member of C.
 * @param pos           The source code position to be used for the tree.
 * @param sym           The accessed symbol.
 * @param preciseMatch  should we accept a type that is a subtype ofsym's owner, even if it doesn't contain sym due to hiding, overriding, or non-inheritance due to protection?
 */
JCExpression makeOwnerThis(DiagnosticPosition pos,Symbol sym,boolean preciseMatch){
  Symbol c=sym.owner;
  if (preciseMatch ? sym.isMemberOf(currentClass,types) : currentClass.isSubClass(sym.owner,types)) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOwnerThisN(pos,sym,preciseMatch);
  }
}

Fixed version (ground truth):
/** 
 * Construct a tree that represents the closest outer instance  {@code C.this} such that the given symbol is a member of C.
 * @param pos           The source code position to be used for the tree.
 * @param sym           The accessed symbol.
 * @param preciseMatch  should we accept a type that is a subtype ofsym's owner, even if it doesn't contain sym due to hiding, overriding, or non-inheritance due to protection?
 */
JCExpression makeOwnerThis(DiagnosticPosition pos,Symbol sym,boolean preciseMatch){
  Symbol c=sym.owner;
  if (preciseMatch ? sym.isMemberOf(currentClass,types) : currentClass.isSubClass(sym.owner,types)) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOwnerThisN(pos,sym,preciseMatch);
  }
}
Program: 37202
Project: 37202
Buggy source:
/** 
 * Construct a tree that represents the outer instance <C.this>. Never pick the current `this'.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeOuterThis(DiagnosticPosition pos,TypeSymbol c){
  List<VarSymbol> ots=outerThisStack;
  if (ots.isEmpty()) {
    log.error(pos,"String_Node_Str",c);
    Assert.error();
    return makeNull();
  }
  VarSymbol ot=ots.head;
  JCExpression tree=access(make.at(pos).Ident(ot));
  TypeSymbol otc=ot.type.tsym;
  while (otc != c) {
    do {
      ots=ots.tail;
      if (ots.isEmpty()) {
        log.error(pos,"String_Node_Str",c);
        Assert.error();
        return tree;
      }
      ot=ots.head;
    }
 while (ot.owner != otc);
    if (otc.owner.kind != PCK && !otc.hasOuterInstance()) {
      chk.earlyRefError(pos,c);
      Assert.error();
      return makeNull();
    }
    tree=access(make.at(pos).Select(tree,ot));
    otc=ot.type.tsym;
  }
  return tree;
}

Fixed version (ground truth):
/** 
 * Construct a tree that represents the outer instance  {@code C.this}. Never pick the current `this'.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeOuterThis(DiagnosticPosition pos,TypeSymbol c){
  List<VarSymbol> ots=outerThisStack;
  if (ots.isEmpty()) {
    log.error(pos,"String_Node_Str",c);
    Assert.error();
    return makeNull();
  }
  VarSymbol ot=ots.head;
  JCExpression tree=access(make.at(pos).Ident(ot));
  TypeSymbol otc=ot.type.tsym;
  while (otc != c) {
    do {
      ots=ots.tail;
      if (ots.isEmpty()) {
        log.error(pos,"String_Node_Str",c);
        Assert.error();
        return tree;
      }
      ot=ots.head;
    }
 while (ot.owner != otc);
    if (otc.owner.kind != PCK && !otc.hasOuterInstance()) {
      chk.earlyRefError(pos,c);
      Assert.error();
      return makeNull();
    }
    tree=access(make.at(pos).Select(tree,ot));
    otc=ot.type.tsym;
  }
  return tree;
}
Program: 37203
Project: 37203
Buggy source:
/** 
 * Return tree simulating the assignment <this.this$n = this$n>.
 */
JCStatement initOuterThis(int pos){
  VarSymbol rhs=outerThisStack.head;
  Assert.check(rhs.owner.kind == MTH);
  VarSymbol lhs=outerThisStack.tail.head;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}

Fixed version (ground truth):
/** 
 * Return tree simulating the assignment   {@code this.this$n = this$n}.
 */
JCStatement initOuterThis(int pos){
  VarSymbol rhs=outerThisStack.head;
  Assert.check(rhs.owner.kind == MTH);
  VarSymbol lhs=outerThisStack.tail.head;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}
Program: 37204
Project: 37204
Buggy source:
/** 
 * Construct a tree simulating the expression <C.this>.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeThis(DiagnosticPosition pos,TypeSymbol c){
  if (currentClass == c) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOuterThis(pos,c);
  }
}

Fixed version (ground truth):
/** 
 * Construct a tree simulating the expression   {@code C.this}.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeThis(DiagnosticPosition pos,TypeSymbol c){
  if (currentClass == c) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOuterThis(pos,c);
  }
}
Program: 37206
Project: 37206
Buggy source:
/** 
 * Return tree simulating the assignment <this.name = name>, where name is the name of a free variable.
 */
JCStatement initField(int pos,Name name){
  Scope.Entry e=proxies.lookup(name);
  Symbol rhs=e.sym;
  Assert.check(rhs.owner.kind == MTH);
  Symbol lhs=e.next().sym;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}

Fixed version (ground truth):
/** 
 * Return tree simulating the assignment   {@code this.name = name}, where name is the name of a free variable.
 */
JCStatement initField(int pos,Name name){
  Scope.Entry e=proxies.lookup(name);
  Symbol rhs=e.sym;
  Assert.check(rhs.owner.kind == MTH);
  Symbol lhs=e.next().sym;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}
Program: 37207
Project: 37207
Buggy source:
/** 
 * A name designates an operator if it consists of a non-empty sequence of operator symbols +-~!/*%&|^<>=
 */
boolean isOperator(Name name){
  int i=0;
  while (i < name.getByteLength() && "String_Node_Str".indexOf(name.getByteAt(i)) >= 0)   i++;
  return i > 0 && i == name.getByteLength();
}

Fixed version (ground truth):
/** 
 * A name designates an operator if it consists of a non-empty sequence of operator symbols   {@literal +-~!/*%&|^<>= }
 */
boolean isOperator(Name name){
  int i=0;
  while (i < name.getByteLength() && "String_Node_Str".indexOf(name.getByteAt(i)) >= 0)   i++;
  return i > 0 && i == name.getByteLength();
}
Program: 37208
Project: 37208
Buggy source:
/** 
 * This method scans all the constructor symbol in a given class scope - assuming that the original scope contains a constructor of the kind: Foo(X x, Y y), where X,Y are class type-variables declared in Foo, a method check is executed against the modified constructor type: <X,Y>Foo<X,Y>(X x, Y y). This is crucial in order to enable diamond inference. The inferred return type of the synthetic constructor IS the inferred type for the diamond operator.
 */
private Symbol findDiamond(Env<AttrContext> env,Type site,List<Type> argtypes,List<Type> typeargtypes,boolean allowBoxing,boolean useVarargs){
  Symbol bestSoFar=methodNotFound;
  for (Scope.Entry e=site.tsym.members().lookup(names.init); e.scope != null; e=e.next()) {
    if (e.sym.kind == MTH && (e.sym.flags_field & SYNTHETIC) == 0) {
      List<Type> oldParams=e.sym.type.tag == FORALL ? ((ForAll)e.sym.type).tvars : List.<Type>nil();
      Type constrType=new ForAll(site.tsym.type.getTypeArguments().appendList(oldParams),types.createMethodTypeWithReturn(e.sym.type.asMethodType(),site));
      bestSoFar=selectBest(env,site,argtypes,typeargtypes,new MethodSymbol(e.sym.flags(),names.init,constrType,site.tsym),bestSoFar,allowBoxing,useVarargs,false);
    }
  }
  return bestSoFar;
}

Fixed version (ground truth):
/** 
 * This method scans all the constructor symbol in a given class scope - assuming that the original scope contains a constructor of the kind:  {@code Foo(X x, Y y)}, where X,Y are class type-variables declared in Foo, a method check is executed against the modified constructor type:  {@code <X,Y>Foo<X,Y>(X x, Y y)}. This is crucial in order to enable diamond inference. The inferred return type of the synthetic constructor IS the inferred type for the diamond operator.
 */
private Symbol findDiamond(Env<AttrContext> env,Type site,List<Type> argtypes,List<Type> typeargtypes,boolean allowBoxing,boolean useVarargs){
  Symbol bestSoFar=methodNotFound;
  for (Scope.Entry e=site.tsym.members().lookup(names.init); e.scope != null; e=e.next()) {
    if (e.sym.kind == MTH && (e.sym.flags_field & SYNTHETIC) == 0) {
      List<Type> oldParams=e.sym.type.tag == FORALL ? ((ForAll)e.sym.type).tvars : List.<Type>nil();
      Type constrType=new ForAll(site.tsym.type.getTypeArguments().appendList(oldParams),types.createMethodTypeWithReturn(e.sym.type.asMethodType(),site));
      bestSoFar=selectBest(env,site,argtypes,typeargtypes,new MethodSymbol(e.sym.flags(),names.init,constrType,site.tsym),bestSoFar,allowBoxing,useVarargs,false);
    }
  }
  return bestSoFar;
}
Program: 37209
Project: 37209
Buggy source:
/** 
 * Source file positions in CRT are integers in the format: line-number << LINESHIFT + column-number
 */
private int encodePosition(int pos,Position.LineMap lineMap,Log log){
  int line=lineMap.getLineNumber(pos);
  int col=lineMap.getColumnNumber(pos);
  int new_pos=Position.encodePosition(line,col);
  if (crtDebug) {
    System.out.println("String_Node_Str" + line + "String_Node_Str"+ col+ "String_Node_Str"+ new_pos);
  }
  if (new_pos == Position.NOPOS)   log.warning(pos,"String_Node_Str",line);
  return new_pos;
}

Fixed version (ground truth):
/** 
 * Source file positions in CRT are integers in the format:  {@literal line-number << LINESHIFT + column-number }
 */
private int encodePosition(int pos,Position.LineMap lineMap,Log log){
  int line=lineMap.getLineNumber(pos);
  int col=lineMap.getColumnNumber(pos);
  int new_pos=Position.encodePosition(line,col);
  if (crtDebug) {
    System.out.println("String_Node_Str" + line + "String_Node_Str"+ col+ "String_Node_Str"+ new_pos);
  }
  if (new_pos == Position.NOPOS)   log.warning(pos,"String_Node_Str",line);
  return new_pos;
}
Program: 37210
Project: 37210
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: 37211
Project: 37211
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: 37212
Project: 37212
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: 37213
Project: 37213
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: 37214
Project: 37214
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: 37215
Project: 37215
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: 37216
Project: 37216
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: 37217
Project: 37217
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: 37219
Project: 37219
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: 37220
Project: 37220
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);
}
Program: 37222
Project: 37222
Buggy source:
/** 
 * Construct a tree that represents the closest outer instance <C.this> such that the given symbol is a member of C.
 * @param pos           The source code position to be used for the tree.
 * @param sym           The accessed symbol.
 * @param preciseMatch  should we accept a type that is a subtype ofsym's owner, even if it doesn't contain sym due to hiding, overriding, or non-inheritance due to protection?
 */
JCExpression makeOwnerThis(DiagnosticPosition pos,Symbol sym,boolean preciseMatch){
  Symbol c=sym.owner;
  if (preciseMatch ? sym.isMemberOf(currentClass,types) : currentClass.isSubClass(sym.owner,types)) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOwnerThisN(pos,sym,preciseMatch);
  }
}

Fixed version (ground truth):
/** 
 * Construct a tree that represents the closest outer instance  {@code C.this} such that the given symbol is a member of C.
 * @param pos           The source code position to be used for the tree.
 * @param sym           The accessed symbol.
 * @param preciseMatch  should we accept a type that is a subtype ofsym's owner, even if it doesn't contain sym due to hiding, overriding, or non-inheritance due to protection?
 */
JCExpression makeOwnerThis(DiagnosticPosition pos,Symbol sym,boolean preciseMatch){
  Symbol c=sym.owner;
  if (preciseMatch ? sym.isMemberOf(currentClass,types) : currentClass.isSubClass(sym.owner,types)) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOwnerThisN(pos,sym,preciseMatch);
  }
}
Program: 37223
Project: 37223
Buggy source:
/** 
 * Construct a tree that represents the outer instance <C.this>. Never pick the current `this'.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeOuterThis(DiagnosticPosition pos,TypeSymbol c){
  List<VarSymbol> ots=outerThisStack;
  if (ots.isEmpty()) {
    log.error(pos,"String_Node_Str",c);
    Assert.error();
    return makeNull();
  }
  VarSymbol ot=ots.head;
  JCExpression tree=access(make.at(pos).Ident(ot));
  TypeSymbol otc=ot.type.tsym;
  while (otc != c) {
    do {
      ots=ots.tail;
      if (ots.isEmpty()) {
        log.error(pos,"String_Node_Str",c);
        Assert.error();
        return tree;
      }
      ot=ots.head;
    }
 while (ot.owner != otc);
    if (otc.owner.kind != PCK && !otc.hasOuterInstance()) {
      chk.earlyRefError(pos,c);
      Assert.error();
      return makeNull();
    }
    tree=access(make.at(pos).Select(tree,ot));
    otc=ot.type.tsym;
  }
  return tree;
}

Fixed version (ground truth):
/** 
 * Construct a tree that represents the outer instance  {@code C.this}. Never pick the current `this'.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeOuterThis(DiagnosticPosition pos,TypeSymbol c){
  List<VarSymbol> ots=outerThisStack;
  if (ots.isEmpty()) {
    log.error(pos,"String_Node_Str",c);
    Assert.error();
    return makeNull();
  }
  VarSymbol ot=ots.head;
  JCExpression tree=access(make.at(pos).Ident(ot));
  TypeSymbol otc=ot.type.tsym;
  while (otc != c) {
    do {
      ots=ots.tail;
      if (ots.isEmpty()) {
        log.error(pos,"String_Node_Str",c);
        Assert.error();
        return tree;
      }
      ot=ots.head;
    }
 while (ot.owner != otc);
    if (otc.owner.kind != PCK && !otc.hasOuterInstance()) {
      chk.earlyRefError(pos,c);
      Assert.error();
      return makeNull();
    }
    tree=access(make.at(pos).Select(tree,ot));
    otc=ot.type.tsym;
  }
  return tree;
}
Program: 37224
Project: 37224
Buggy source:
/** 
 * Return tree simulating the assignment <this.this$n = this$n>.
 */
JCStatement initOuterThis(int pos){
  VarSymbol rhs=outerThisStack.head;
  Assert.check(rhs.owner.kind == MTH);
  VarSymbol lhs=outerThisStack.tail.head;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}

Fixed version (ground truth):
/** 
 * Return tree simulating the assignment   {@code this.this$n = this$n}.
 */
JCStatement initOuterThis(int pos){
  VarSymbol rhs=outerThisStack.head;
  Assert.check(rhs.owner.kind == MTH);
  VarSymbol lhs=outerThisStack.tail.head;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}
Program: 37225
Project: 37225
Buggy source:
/** 
 * Construct a tree simulating the expression <C.this>.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeThis(DiagnosticPosition pos,TypeSymbol c){
  if (currentClass == c) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOuterThis(pos,c);
  }
}

Fixed version (ground truth):
/** 
 * Construct a tree simulating the expression   {@code C.this}.
 * @param pos           The source code position to be used for the tree.
 * @param c             The qualifier class.
 */
JCExpression makeThis(DiagnosticPosition pos,TypeSymbol c){
  if (currentClass == c) {
    return make.at(pos).This(c.erasure(types));
  }
 else {
    return makeOuterThis(pos,c);
  }
}
Program: 37227
Project: 37227
Buggy source:
/** 
 * Return tree simulating the assignment <this.name = name>, where name is the name of a free variable.
 */
JCStatement initField(int pos,Name name){
  Scope.Entry e=proxies.lookup(name);
  Symbol rhs=e.sym;
  Assert.check(rhs.owner.kind == MTH);
  Symbol lhs=e.next().sym;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}

Fixed version (ground truth):
/** 
 * Return tree simulating the assignment   {@code this.name = name}, where name is the name of a free variable.
 */
JCStatement initField(int pos,Name name){
  Scope.Entry e=proxies.lookup(name);
  Symbol rhs=e.sym;
  Assert.check(rhs.owner.kind == MTH);
  Symbol lhs=e.next().sym;
  Assert.check(rhs.owner.owner == lhs.owner);
  make.at(pos);
  return make.Exec(make.Assign(make.Select(make.This(lhs.owner.erasure(types)),lhs),make.Ident(rhs)).setType(lhs.erasure(types)));
}
Program: 37228
Project: 37228
Buggy source:
/** 
 * A name designates an operator if it consists of a non-empty sequence of operator symbols +-~!/*%&|^<>=
 */
boolean isOperator(Name name){
  int i=0;
  while (i < name.getByteLength() && "String_Node_Str".indexOf(name.getByteAt(i)) >= 0)   i++;
  return i > 0 && i == name.getByteLength();
}

Fixed version (ground truth):
/** 
 * A name designates an operator if it consists of a non-empty sequence of operator symbols   {@literal +-~!/*%&|^<>= }
 */
boolean isOperator(Name name){
  int i=0;
  while (i < name.getByteLength() && "String_Node_Str".indexOf(name.getByteAt(i)) >= 0)   i++;
  return i > 0 && i == name.getByteLength();
}
Program: 37229
Project: 37229
Buggy source:
/** 
 * This method scans all the constructor symbol in a given class scope - assuming that the original scope contains a constructor of the kind: Foo(X x, Y y), where X,Y are class type-variables declared in Foo, a method check is executed against the modified constructor type: <X,Y>Foo<X,Y>(X x, Y y). This is crucial in order to enable diamond inference. The inferred return type of the synthetic constructor IS the inferred type for the diamond operator.
 */
private Symbol findDiamond(Env<AttrContext> env,Type site,List<Type> argtypes,List<Type> typeargtypes,boolean allowBoxing,boolean useVarargs){
  Symbol bestSoFar=methodNotFound;
  for (Scope.Entry e=site.tsym.members().lookup(names.init); e.scope != null; e=e.next()) {
    if (e.sym.kind == MTH && (e.sym.flags_field & SYNTHETIC) == 0) {
      List<Type> oldParams=e.sym.type.tag == FORALL ? ((ForAll)e.sym.type).tvars : List.<Type>nil();
      Type constrType=new ForAll(site.tsym.type.getTypeArguments().appendList(oldParams),types.createMethodTypeWithReturn(e.sym.type.asMethodType(),site));
      bestSoFar=selectBest(env,site,argtypes,typeargtypes,new MethodSymbol(e.sym.flags(),names.init,constrType,site.tsym),bestSoFar,allowBoxing,useVarargs,false);
    }
  }
  return bestSoFar;
}

Fixed version (ground truth):
/** 
 * This method scans all the constructor symbol in a given class scope - assuming that the original scope contains a constructor of the kind:  {@code Foo(X x, Y y)}, where X,Y are class type-variables declared in Foo, a method check is executed against the modified constructor type:  {@code <X,Y>Foo<X,Y>(X x, Y y)}. This is crucial in order to enable diamond inference. The inferred return type of the synthetic constructor IS the inferred type for the diamond operator.
 */
private Symbol findDiamond(Env<AttrContext> env,Type site,List<Type> argtypes,List<Type> typeargtypes,boolean allowBoxing,boolean useVarargs){
  Symbol bestSoFar=methodNotFound;
  for (Scope.Entry e=site.tsym.members().lookup(names.init); e.scope != null; e=e.next()) {
    if (e.sym.kind == MTH && (e.sym.flags_field & SYNTHETIC) == 0) {
      List<Type> oldParams=e.sym.type.tag == FORALL ? ((ForAll)e.sym.type).tvars : List.<Type>nil();
      Type constrType=new ForAll(site.tsym.type.getTypeArguments().appendList(oldParams),types.createMethodTypeWithReturn(e.sym.type.asMethodType(),site));
      bestSoFar=selectBest(env,site,argtypes,typeargtypes,new MethodSymbol(e.sym.flags(),names.init,constrType,site.tsym),bestSoFar,allowBoxing,useVarargs,false);
    }
  }
  return bestSoFar;
}
Program: 37230
Project: 37230
Buggy source:
/** 
 * Source file positions in CRT are integers in the format: line-number << LINESHIFT + column-number
 */
private int encodePosition(int pos,Position.LineMap lineMap,Log log){
  int line=lineMap.getLineNumber(pos);
  int col=lineMap.getColumnNumber(pos);
  int new_pos=Position.encodePosition(line,col);
  if (crtDebug) {
    System.out.println("String_Node_Str" + line + "String_Node_Str"+ col+ "String_Node_Str"+ new_pos);
  }
  if (new_pos == Position.NOPOS)   log.warning(pos,"String_Node_Str",line);
  return new_pos;
}

Fixed version (ground truth):
/** 
 * Source file positions in CRT are integers in the format:  {@literal line-number << LINESHIFT + column-number }
 */
private int encodePosition(int pos,Position.LineMap lineMap,Log log){
  int line=lineMap.getLineNumber(pos);
  int col=lineMap.getColumnNumber(pos);
  int new_pos=Position.encodePosition(line,col);
  if (crtDebug) {
    System.out.println("String_Node_Str" + line + "String_Node_Str"+ col+ "String_Node_Str"+ new_pos);
  }
  if (new_pos == Position.NOPOS)   log.warning(pos,"String_Node_Str",line);
  return new_pos;
}
Program: 37231
Project: 37231
Buggy source:
public synchronized int getNumDeactivated() throws RemoteException {
  return (num_deactivated);
}

Fixed version (ground truth):
public synchronized int getNumDeactivated() throws RemoteException {
  return num_deactivated;
}
Program: 37233
Project: 37233
Buggy source:
public void inc() throws RemoteException {
  incNumDeactivated();
}

Fixed version (ground truth):
public synchronized void inc() throws RemoteException {
  num_deactivated++;
}
Program: 37234
Project: 37234
Buggy source:
public synchronized int getNumDeactivated() throws RemoteException {
  return (num_deactivated);
}

Fixed version (ground truth):
public synchronized int getNumDeactivated() throws RemoteException {
  return num_deactivated;
}
Program: 37236
Project: 37236
Buggy source:
public void inc() throws RemoteException {
  incNumDeactivated();
}

Fixed version (ground truth):
public synchronized void inc() throws RemoteException {
  num_deactivated++;
}
Program: 37237
Project: 37237
Buggy source:
public String[] bases(String repId){
  String[] results=null;
  if (bases == null)   bases=new Hashtable();
 else   results=(String[])bases.get(repId);
  if (results == null && connectedCodeBase()) {
    results=delegate.bases(repId);
    if (results != null)     bases.put(repId,results);
  }
  return results;
}

Fixed version (ground truth):
public synchronized String[] bases(String repId){
  String[] results=null;
  if (bases == null)   bases=new Hashtable();
 else   results=(String[])bases.get(repId);
  if (results == null && connectedCodeBase()) {
    results=delegate.bases(repId);
    if (results != null)     bases.put(repId,results);
  }
  return results;
}
Program: 37238
Project: 37238
Buggy source:
public FullValueDescription[] metas(String[] repIds){
  FullValueDescription[] results=new FullValueDescription[repIds.length];
  for (int i=0; i < results.length; i++)   results[i]=meta(repIds[i]);
  return results;
}

Fixed version (ground truth):
public synchronized FullValueDescription[] metas(String[] repIds){
  FullValueDescription[] results=new FullValueDescription[repIds.length];
  for (int i=0; i < results.length; i++)   results[i]=meta(repIds[i]);
  return results;
}
Program: 37239
Project: 37239
Buggy source:
private boolean connectedCodeBase(){
  if (delegate != null)   return true;
  if (conn.getCodeBaseIOR() == null) {
    if (conn.getBroker().transportDebugFlag)     conn.dprint("String_Node_Str" + conn);
    return false;
  }
synchronized (this) {
    if (delegate != null)     return true;
    delegate=(CodeBase)CachedCodeBase.iorToCodeBaseObjMap.get(conn.getCodeBaseIOR());
    if (delegate != null)     return true;
    delegate=CodeBaseHelper.narrow(getObjectFromIOR());
    CachedCodeBase.iorToCodeBaseObjMap.put(conn.getCodeBaseIOR(),delegate);
  }
  return true;
}

Fixed version (ground truth):
private synchronized boolean connectedCodeBase(){
  if (delegate != null)   return true;
  if (conn.getCodeBaseIOR() == null) {
    if (conn.getBroker().transportDebugFlag)     conn.dprint("String_Node_Str" + conn);
    return false;
  }
synchronized (iorMapLock) {
    if (delegate != null)     return true;
    delegate=CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());
    if (delegate != null)     return true;
    delegate=CodeBaseHelper.narrow(getObjectFromIOR());
    CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(),delegate);
  }
  return true;
}
Program: 37240
Project: 37240
Buggy source:
public FullValueDescription meta(String repId){
  FullValueDescription result=null;
  if (fvds == null)   fvds=new Hashtable();
 else   result=(FullValueDescription)fvds.get(repId);
  if (result == null && connectedCodeBase()) {
    result=delegate.meta(repId);
    if (result != null)     fvds.put(repId,result);
  }
  return result;
}

Fixed version (ground truth):
public synchronized FullValueDescription meta(String repId){
  FullValueDescription result=null;
  if (fvds == null)   fvds=new Hashtable();
 else   result=(FullValueDescription)fvds.get(repId);
  if (result == null && connectedCodeBase()) {
    result=delegate.meta(repId);
    if (result != null)     fvds.put(repId,result);
  }
  return result;
}
Program: 37241
Project: 37241
Buggy source:
public String implementation(String repId){
  String urlResult=null;
  if (implementations == null)   implementations=new Hashtable();
 else   urlResult=(String)implementations.get(repId);
  if (urlResult == null && connectedCodeBase()) {
    urlResult=delegate.implementation(repId);
    if (urlResult != null)     implementations.put(repId,urlResult);
  }
  return urlResult;
}

Fixed version (ground truth):
public synchronized String implementation(String repId){
  String urlResult=null;
  if (implementations == null)   implementations=new Hashtable();
 else   urlResult=(String)implementations.get(repId);
  if (urlResult == null && connectedCodeBase()) {
    urlResult=delegate.implementation(repId);
    if (urlResult != null)     implementations.put(repId,urlResult);
  }
  return urlResult;
}
Program: 37242
Project: 37242
Buggy source:
public String[] implementations(String[] repIds){
  String[] urlResults=new String[repIds.length];
  for (int i=0; i < urlResults.length; i++)   urlResults[i]=implementation(repIds[i]);
  return urlResults;
}

Fixed version (ground truth):
public synchronized String[] implementations(String[] repIds){
  String[] urlResults=new String[repIds.length];
  for (int i=0; i < urlResults.length; i++)   urlResults[i]=implementation(repIds[i]);
  return urlResults;
}
Program: 37243
Project: 37243
Buggy source:
public String[] bases(String repId){
  String[] results=null;
  if (bases == null)   bases=new Hashtable();
 else   results=(String[])bases.get(repId);
  if (results == null && connectedCodeBase()) {
    results=delegate.bases(repId);
    if (results != null)     bases.put(repId,results);
  }
  return results;
}

Fixed version (ground truth):
public synchronized String[] bases(String repId){
  String[] results=null;
  if (bases == null)   bases=new Hashtable();
 else   results=(String[])bases.get(repId);
  if (results == null && connectedCodeBase()) {
    results=delegate.bases(repId);
    if (results != null)     bases.put(repId,results);
  }
  return results;
}
Program: 37244
Project: 37244
Buggy source:
public FullValueDescription[] metas(String[] repIds){
  FullValueDescription[] results=new FullValueDescription[repIds.length];
  for (int i=0; i < results.length; i++)   results[i]=meta(repIds[i]);
  return results;
}

Fixed version (ground truth):
public synchronized FullValueDescription[] metas(String[] repIds){
  FullValueDescription[] results=new FullValueDescription[repIds.length];
  for (int i=0; i < results.length; i++)   results[i]=meta(repIds[i]);
  return results;
}
Program: 37245
Project: 37245
Buggy source:
private boolean connectedCodeBase(){
  if (delegate != null)   return true;
  if (conn.getCodeBaseIOR() == null) {
    if (conn.getBroker().transportDebugFlag)     conn.dprint("String_Node_Str" + conn);
    return false;
  }
synchronized (this) {
    if (delegate != null)     return true;
    delegate=(CodeBase)CachedCodeBase.iorToCodeBaseObjMap.get(conn.getCodeBaseIOR());
    if (delegate != null)     return true;
    delegate=CodeBaseHelper.narrow(getObjectFromIOR());
    CachedCodeBase.iorToCodeBaseObjMap.put(conn.getCodeBaseIOR(),delegate);
  }
  return true;
}

Fixed version (ground truth):
private synchronized boolean connectedCodeBase(){
  if (delegate != null)   return true;
  if (conn.getCodeBaseIOR() == null) {
    if (conn.getBroker().transportDebugFlag)     conn.dprint("String_Node_Str" + conn);
    return false;
  }
synchronized (iorMapLock) {
    if (delegate != null)     return true;
    delegate=CachedCodeBase.iorMap.get(conn.getCodeBaseIOR());
    if (delegate != null)     return true;
    delegate=CodeBaseHelper.narrow(getObjectFromIOR());
    CachedCodeBase.iorMap.put(conn.getCodeBaseIOR(),delegate);
  }
  return true;
}
Program: 37246
Project: 37246
Buggy source:
public FullValueDescription meta(String repId){
  FullValueDescription result=null;
  if (fvds == null)   fvds=new Hashtable();
 else   result=(FullValueDescription)fvds.get(repId);
  if (result == null && connectedCodeBase()) {
    result=delegate.meta(repId);
    if (result != null)     fvds.put(repId,result);
  }
  return result;
}

Fixed version (ground truth):
public synchronized FullValueDescription meta(String repId){
  FullValueDescription result=null;
  if (fvds == null)   fvds=new Hashtable();
 else   result=(FullValueDescription)fvds.get(repId);
  if (result == null && connectedCodeBase()) {
    result=delegate.meta(repId);
    if (result != null)     fvds.put(repId,result);
  }
  return result;
}
Program: 37247
Project: 37247
Buggy source:
public String implementation(String repId){
  String urlResult=null;
  if (implementations == null)   implementations=new Hashtable();
 else   urlResult=(String)implementations.get(repId);
  if (urlResult == null && connectedCodeBase()) {
    urlResult=delegate.implementation(repId);
    if (urlResult != null)     implementations.put(repId,urlResult);
  }
  return urlResult;
}

Fixed version (ground truth):
public synchronized String implementation(String repId){
  String urlResult=null;
  if (implementations == null)   implementations=new Hashtable();
 else   urlResult=(String)implementations.get(repId);
  if (urlResult == null && connectedCodeBase()) {
    urlResult=delegate.implementation(repId);
    if (urlResult != null)     implementations.put(repId,urlResult);
  }
  return urlResult;
}
Program: 37248
Project: 37248
Buggy source:
public String[] implementations(String[] repIds){
  String[] urlResults=new String[repIds.length];
  for (int i=0; i < urlResults.length; i++)   urlResults[i]=implementation(repIds[i]);
  return urlResults;
}

Fixed version (ground truth):
public synchronized String[] implementations(String[] repIds){
  String[] urlResults=new String[repIds.length];
  for (int i=0; i < urlResults.length; i++)   urlResults[i]=implementation(repIds[i]);
  return urlResults;
}
Program: 37249
Project: 37249
Buggy source:
private static void executeCommandForPid(String pid,String command) throws AttachNotSupportedException, IOException, UnsupportedEncodingException {
  VirtualMachine vm=VirtualMachine.attach(pid);
  HotSpotVirtualMachine hvm=(HotSpotVirtualMachine)vm;
  try (InputStream in=hvm.executeJCmd(command)){
    byte b[]=new byte[256];
    int n;
    do {
      n=in.read(b);
      if (n > 0) {
        String s=new String(b,0,n,"String_Node_Str");
        System.out.print(s);
      }
    }
 while (n > 0);
  }
   vm.detach();
}

Fixed version (ground truth):
private static void executeCommandForPid(String pid,String command) throws AttachNotSupportedException, IOException, UnsupportedEncodingException {
  VirtualMachine vm=VirtualMachine.attach(pid);
  HotSpotVirtualMachine hvm=(HotSpotVirtualMachine)vm;
  String lines[]=command.split("String_Node_Str");
  for (  String line : lines) {
    try (InputStream in=hvm.executeJCmd(line)){
      byte b[]=new byte[256];
      int n;
      do {
        n=in.read(b);
        if (n > 0) {
          String s=new String(b,0,n,"String_Node_Str");
          System.out.print(s);
        }
      }
 while (n > 0);
    }
   }
  vm.detach();
}
Program: 37250
Project: 37250
Buggy source:
private static void executeCommandForPid(String pid,String command) throws AttachNotSupportedException, IOException, UnsupportedEncodingException {
  VirtualMachine vm=VirtualMachine.attach(pid);
  HotSpotVirtualMachine hvm=(HotSpotVirtualMachine)vm;
  try (InputStream in=hvm.executeJCmd(command)){
    byte b[]=new byte[256];
    int n;
    do {
      n=in.read(b);
      if (n > 0) {
        String s=new String(b,0,n,"String_Node_Str");
        System.out.print(s);
      }
    }
 while (n > 0);
  }
   vm.detach();
}

Fixed version (ground truth):
private static void executeCommandForPid(String pid,String command) throws AttachNotSupportedException, IOException, UnsupportedEncodingException {
  VirtualMachine vm=VirtualMachine.attach(pid);
  HotSpotVirtualMachine hvm=(HotSpotVirtualMachine)vm;
  String lines[]=command.split("String_Node_Str");
  for (  String line : lines) {
    try (InputStream in=hvm.executeJCmd(line)){
      byte b[]=new byte[256];
      int n;
      do {
        n=in.read(b);
        if (n > 0) {
          String s=new String(b,0,n,"String_Node_Str");
          System.out.print(s);
        }
      }
 while (n > 0);
    }
   }
  vm.detach();
}
Program: 37251
Project: 37251
Buggy source:
protected void close(){
  if (fd != null || fd1 != null) {
    datagramSocketClose();
    fd=null;
    fd1=null;
  }
}

Fixed version (ground truth):
protected void close(){
  if (fd != null || fd1 != null) {
    datagramSocketClose();
    ResourceManager.afterUdpClose();
    fd=null;
    fd1=null;
  }
}
Program: 37252
Project: 37252
Buggy source:
protected void close(){
  if (fd != null || fd1 != null) {
    datagramSocketClose();
    fd=null;
    fd1=null;
  }
}

Fixed version (ground truth):
protected void close(){
  if (fd != null || fd1 != null) {
    datagramSocketClose();
    ResourceManager.afterUdpClose();
    fd=null;
    fd1=null;
  }
}
Program: 37253
Project: 37253
Buggy source:
public Log make(){
  return Bark.instance(context);
}

Fixed version (ground truth):
public Log make(Context c){
  return Bark.instance(c);
}
Program: 37254
Project: 37254
Buggy source:
/** 
 * Preregisters factories to create and use a Bark object for use as both a Log and a Bark.
 */
public static void preRegister(final Context context){
  context.put(barkKey,new Context.Factory<Bark>(){
    public Bark make(){
      return new Bark(context);
    }
  }
);
  context.put(Log.logKey,new Context.Factory<Log>(){
    public Log make(){
      return Bark.instance(context);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Preregisters factories to create and use a Bark object for use as both a Log and a Bark.
 */
public static void preRegister(Context context){
  context.put(barkKey,new Context.Factory<Bark>(){
    public Bark make(    Context c){
      return new Bark(c);
    }
  }
);
  context.put(Log.logKey,new Context.Factory<Log>(){
    public Log make(    Context c){
      return Bark.instance(c);
    }
  }
);
}
Program: 37255
Project: 37255
Buggy source:
/** 
 * Register that a compilation is about to start.
 */
void beginContext(final Context context){
  if (compilationInProgress)   throw new IllegalStateException("String_Node_Str");
  compilationInProgress=true;
  final JavaFileManager givenFileManager=context.get(JavaFileManager.class);
  context.put(JavaFileManager.class,(JavaFileManager)null);
  context.put(JavaFileManager.class,new Context.Factory<JavaFileManager>(){
    public JavaFileManager make(){
      if (givenFileManager != null) {
        context.put(JavaFileManager.class,givenFileManager);
        return givenFileManager;
      }
 else {
        return new JavacFileManager(context,true,null);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Register that a compilation is about to start.
 */
void beginContext(Context context){
  if (compilationInProgress)   throw new IllegalStateException("String_Node_Str");
  compilationInProgress=true;
  final JavaFileManager givenFileManager=context.get(JavaFileManager.class);
  context.put(JavaFileManager.class,(JavaFileManager)null);
  context.put(JavaFileManager.class,new Context.Factory<JavaFileManager>(){
    public JavaFileManager make(    Context c){
      if (givenFileManager != null) {
        c.put(JavaFileManager.class,givenFileManager);
        return givenFileManager;
      }
 else {
        return new JavacFileManager(c,true,null);
      }
    }
  }
);
}
Program: 37256
Project: 37256
Buggy source:
public JavaFileManager make(){
  if (givenFileManager != null) {
    context.put(JavaFileManager.class,givenFileManager);
    return givenFileManager;
  }
 else {
    return new JavacFileManager(context,true,null);
  }
}

Fixed version (ground truth):
public JavaFileManager make(Context c){
  if (givenFileManager != null) {
    c.put(JavaFileManager.class,givenFileManager);
    return givenFileManager;
  }
 else {
    return new JavacFileManager(c,true,null);
  }
}
Program: 37257
Project: 37257
Buggy source:
public FSInfo make(){
  FSInfo instance=new CacheFSInfo();
  context.put(FSInfo.class,instance);
  return instance;
}

Fixed version (ground truth):
public FSInfo make(Context c){
  FSInfo instance=new CacheFSInfo();
  c.put(FSInfo.class,instance);
  return instance;
}