nus-yam/ex-repair huggingface dataset:
Program: 12859
Project: 12859
Buggy source:
public void removeMouseListener(EventHandler<MouseEvent> handler){
  appleScreen.removeEventHandler(MouseEvent.MOUSE_MOVED,handler);
  appleScreen.removeEventHandler(MouseEvent.MOUSE_PRESSED,handler);
  appleScreen.removeEventHandler(MouseEvent.MOUSE_RELEASED,handler);
}

Fixed version (ground truth):
public void removeMouseListener(EventHandler<MouseEvent> handler){
  appleScreen.removeEventHandler(MouseEvent.ANY,handler);
}
Program: 12860
Project: 12860
Buggy source:
public void addMouseListener(EventHandler<MouseEvent> handler){
  appleScreen.addEventHandler(MouseEvent.MOUSE_MOVED,handler);
  appleScreen.addEventHandler(MouseEvent.MOUSE_PRESSED,handler);
  appleScreen.addEventHandler(MouseEvent.MOUSE_RELEASED,handler);
}

Fixed version (ground truth):
public void addMouseListener(EventHandler<MouseEvent> handler){
  appleScreen.addEventHandler(MouseEvent.ANY,handler);
}
Program: 12861
Project: 12861
Buggy source:
private void processMouseEvent(MouseEvent event){
  if (event.getEventType() == MouseEvent.MOUSE_MOVED) {
    Node source=(Node)event.getSource();
    updateLocation(event.getSceneX(),event.getSceneY(),source.getBoundsInLocal());
    event.consume();
  }
 else   if (event.getEventType() == MouseEvent.MOUSE_PRESSED) {
    mousePressed(event);
    event.consume();
  }
 else   if (event.getEventType() == MouseEvent.MOUSE_RELEASED) {
    mouseReleased(event);
    event.consume();
  }
}

Fixed version (ground truth):
private void processMouseEvent(MouseEvent event){
  if (event.getEventType() == MouseEvent.MOUSE_MOVED || event.getEventType() == MouseEvent.MOUSE_DRAGGED) {
    Node source=(Node)event.getSource();
    updateLocation(event.getSceneX(),event.getSceneY(),source.getBoundsInLocal());
    event.consume();
  }
  if (event.getEventType() == MouseEvent.MOUSE_PRESSED || event.getEventType() == MouseEvent.MOUSE_DRAGGED) {
    mousePressed(event);
    event.consume();
  }
 else   if (event.getEventType() == MouseEvent.MOUSE_RELEASED) {
    mouseReleased(event);
    event.consume();
  }
}
Program: 12862
Project: 12862
Buggy source:
private void insertCard(Class<? extends Card> type,int slot) throws NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
  if (getMemory().getCard(slot) != null) {
    if (getMemory().getCard(slot).getClass().equals(type)) {
      return;
    }
    getMemory().removeCard(slot);
  }
  if (type != null) {
    try {
      Card card=type.getConstructor(Computer.class).newInstance(this);
      getMemory().addCard(card,slot);
    }
 catch (    InstantiationException|IllegalAccessException ex) {
      Logger.getLogger(Apple2e.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}

Fixed version (ground truth):
private void insertCard(Class<? extends Card> type,int slot) throws NoSuchMethodException, IllegalArgumentException, InvocationTargetException {
  if (getMemory().getCard(slot).isPresent()) {
    if (getMemory().getCard(slot).get().getClass().equals(type)) {
      return;
    }
    getMemory().removeCard(slot);
  }
  if (type != null) {
    try {
      Card card=type.getConstructor(Computer.class).newInstance(this);
      getMemory().addCard(card,slot);
    }
 catch (    InstantiationException|IllegalAccessException ex) {
      Logger.getLogger(Apple2e.class.getName()).log(Level.SEVERE,null,ex);
    }
  }
}
Program: 12863
Project: 12863
Buggy source:
private void putChild(String childName,ConfigNode newChild){
  removeChild(childName);
  int index=0;
  for (  ConfigNode node : children) {
    int compare=node.toString().compareToIgnoreCase(childName);
    if (compare >= 0) {
      break;
    }
 else {
      index++;
    }
  }
  children.add(index,newChild);
}

Fixed version (ground truth):
private void putChild(String id,ConfigNode newChild){
  removeChild(id);
  int index=0;
  for (  ConfigNode node : children) {
    int compare=node.toString().compareToIgnoreCase(id);
    if (compare >= 0) {
      break;
    }
 else {
      index++;
    }
  }
  children.add(index,newChild);
}
Program: 12865
Project: 12865
Buggy source:
public ConfigNode(ConfigNode parent,Reconfigurable subject){
  super();
  this.subject=subject;
  this.children=getChildren();
  this.parent=parent;
  if (this.parent != null) {
    this.root=this.parent.root != null ? this.parent.root : this.parent;
  }
  setValue(toString());
}

Fixed version (ground truth):
public ConfigNode(ConfigNode parent,Reconfigurable subject,String id){
  super();
  this.id=id;
  this.name=subject.getName();
  this.subject=subject;
  this.children=getChildren();
  this.parent=parent;
  if (this.parent != null) {
    this.root=this.parent.root != null ? this.parent.root : this.parent;
  }
  setValue(toString());
}
Program: 12866
Project: 12866
Buggy source:
@InvokableAction(name="String_Node_Str",description="String_Node_Str",category="String_Node_Str",alternatives="String_Node_Str",defaultKeyMapping="String_Node_Str") public static void loadSettings(){
{
    boolean successful=false;
    ObjectInputStream ois=null;
    FileInputStream fis=null;
    try {
      ois=new ObjectInputStream(new FileInputStream(getSettingsFile()));
      ConfigNode newRoot=(ConfigNode)ois.readObject();
      applyConfigTree(newRoot,BASE);
      successful=true;
    }
 catch (    FileNotFoundException ex) {
    }
catch (    ClassNotFoundException|IOException ex) {
      Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
    }
 finally {
      try {
        if (ois != null) {
          ois.close();
        }
        if (!successful) {
          applySettings(BASE);
        }
      }
 catch (      IOException ex) {
        Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
  }
}

Fixed version (ground truth):
@InvokableAction(name="String_Node_Str",description="String_Node_Str",category="String_Node_Str",alternatives="String_Node_Str",defaultKeyMapping="String_Node_Str") public static void loadSettings(){
{
    boolean successful=false;
    ObjectInputStream ois=null;
    try {
      ois=new ObjectInputStream(new FileInputStream(getSettingsFile()));
      ConfigNode newRoot=(ConfigNode)ois.readObject();
      applyConfigTree(newRoot,BASE);
      successful=true;
    }
 catch (    FileNotFoundException ex) {
    }
catch (    ClassNotFoundException|IOException ex) {
      Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
    }
 finally {
      try {
        if (ois != null) {
          ois.close();
        }
        if (!successful) {
          applySettings(BASE);
        }
      }
 catch (      IOException ex) {
        Logger.getLogger(Configuration.class.getName()).log(Level.SEVERE,null,ex);
      }
    }
  }
}
Program: 12867
Project: 12867
Buggy source:
private ConfigNode findChild(String childName){
  for (  ConfigNode node : children) {
    if (childName.equalsIgnoreCase(node.toString())) {
      return node;
    }
  }
  return null;
}

Fixed version (ground truth):
private ConfigNode findChild(String id){
  for (  ConfigNode node : children) {
    if (id.equalsIgnoreCase(node.id)) {
      return node;
    }
  }
  return null;
}
Program: 12868
Project: 12868
Buggy source:
@Override public String toString(){
  if (subject == null) {
    return "String_Node_Str";
  }
  return subject.getName();
}

Fixed version (ground truth):
@Override public String toString(){
  return name;
}
Program: 12869
Project: 12869
Buggy source:
public void addCard(Card c,int slot){
  cards[slot]=Optional.of(c);
  c.setSlot(slot);
  c.attach();
}

Fixed version (ground truth):
public void addCard(Card c,int slot){
  removeCard(slot);
  cards[slot]=Optional.of(c);
  c.setSlot(slot);
  c.attach();
}
Program: 12871
Project: 12871
Buggy source:
/** 
 * Return the serialField tags in this FieldDoc item.
 * @return an array of <tt>SerialFieldTag</tt> objects containingall  {@code @serialField} tags.
 */
SerialFieldTag[] serialFieldTags();

Fixed version (ground truth):
/** 
 * Return the serialField tags in this FieldDoc item.
 * @return an array of {@code SerialFieldTag} objects containingall  {@code @serialField} tags.
 */
SerialFieldTag[] serialFieldTags();
Program: 12872
Project: 12872
Buggy source:
/** 
 * Tests whether this method overrides another. The overridden method may be one declared in a superclass or a superinterface (unlike   {@link #overriddenMethod()}). <p> When a non-abstract method overrides an abstract one, it is also said to <i>implement</i> the other.
 * @param meth  the other method to examine
 * @return <tt>true</tt> if this method overrides the other
 * @since 1.5
 */
boolean overrides(MethodDoc meth);

Fixed version (ground truth):
/** 
 * Tests whether this method overrides another. The overridden method may be one declared in a superclass or a superinterface (unlike   {@link #overriddenMethod()}). <p> When a non-abstract method overrides an abstract one, it is also said to <i>implement</i> the other.
 * @param meth  the other method to examine
 * @return {@code true} if this method overrides the other
 * @since 1.5
 */
boolean overrides(MethodDoc meth);
Program: 12873
Project: 12873
Buggy source:
/** 
 * Return the kind of this tag. For most tags,  {@code kind() == name()}; the following table lists those cases where there is more than one tag of a given kind: <table border="1" cellpadding="4" cellspacing="0" summary="related tags"> <tr><th>  {@code kind()  }</th>  <th>  {@code name()      }</th></tr> <tr><td>  {@code @throws }</td>  <td>  {@code @throws     }</td></tr> <tr><td>  {@code @throws }</td>  <td>  {@code @exception  }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @see        }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @link       }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @linkplain  }</td></tr> <tr><td>  {@code @serial }</td>  <td>  {@code @serial     }</td></tr> <tr><td>  {@code @serial }</td>  <td>  {@code @serialData }</td></tr> </table>
 * @return the kind of this tag.
 */
String kind();

Fixed version (ground truth):
/** 
 * Return the kind of this tag. For most tags,  {@code kind() == name()}; the following table lists those cases where there is more than one tag of a given kind: <table border="1"> <caption>Related Tags</caption> <tr><th>  {@code kind()  }</th>  <th>  {@code name()      }</th></tr> <tr><td>  {@code @throws }</td>  <td>  {@code @throws     }</td></tr> <tr><td>  {@code @throws }</td>  <td>  {@code @exception  }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @see        }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @link       }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @linkplain  }</td></tr> <tr><td>  {@code @serial }</td>  <td>  {@code @serial     }</td></tr> <tr><td>  {@code @serial }</td>  <td>  {@code @serialData }</td></tr> </table>
 * @return the kind of this tag.
 */
String kind();
Program: 12874
Project: 12874
Buggy source:
/** 
 * Create and return the default parameter map for this  {@code ExecutionControlProvider}. The map can optionally be modified; Modified or unmodified it can be passed to  {@link #generate(jdk.jshell.spi.ExecutionEnv,java.util.Map) }. <table summary="Parameters"> <tr> <th>Parameter</th> <th>Description</th> <th>Constant Field</th> </tr> <tr> <td>remoteAgent</td> <td>the remote agent to launch</td> <td>  {@link #PARAM_REMOTE_AGENT}</td> </tr> <tr> <td>timeout</td> <td>milliseconds before connect timeout</td> <td>  {@link #PARAM_TIMEOUT}</td> </tr> <tr> <td>launch</td> <td>"true" for JDI controlled launch</td> <td>  {@link #PARAM_LAUNCH}</td> </tr> <tr> <td>hostname</td> <td>connect to the named of the local host ("" for discovered)</td> <td>  {@link #PARAM_HOST_NAME}</td> </tr> </table>
 * @return the default parameter map
 */
@Override public Map<String,String> defaultParameters(){
  Map<String,String> dp=new HashMap<>();
  dp.put(PARAM_REMOTE_AGENT,RemoteExecutionControl.class.getName());
  dp.put(PARAM_TIMEOUT,"String_Node_Str" + DEFAULT_TIMEOUT);
  dp.put(PARAM_HOST_NAME,"String_Node_Str");
  dp.put(PARAM_LAUNCH,"String_Node_Str");
  return dp;
}

Fixed version (ground truth):
/** 
 * Create and return the default parameter map for this  {@code ExecutionControlProvider}. The map can optionally be modified; Modified or unmodified it can be passed to  {@link #generate(jdk.jshell.spi.ExecutionEnv,java.util.Map) }. <table> <caption>Parameters</caption> <tr> <th>Parameter</th> <th>Description</th> <th>Constant Field</th> </tr> <tr> <td>remoteAgent</td> <td>the remote agent to launch</td> <td>  {@link #PARAM_REMOTE_AGENT}</td> </tr> <tr> <td>timeout</td> <td>milliseconds before connect timeout</td> <td>  {@link #PARAM_TIMEOUT}</td> </tr> <tr> <td>launch</td> <td>"true" for JDI controlled launch</td> <td>  {@link #PARAM_LAUNCH}</td> </tr> <tr> <td>hostname</td> <td>connect to the named of the local host ("" for discovered)</td> <td>  {@link #PARAM_HOST_NAME}</td> </tr> </table>
 * @return the default parameter map
 */
@Override public Map<String,String> defaultParameters(){
  Map<String,String> dp=new HashMap<>();
  dp.put(PARAM_REMOTE_AGENT,RemoteExecutionControl.class.getName());
  dp.put(PARAM_TIMEOUT,"String_Node_Str" + DEFAULT_TIMEOUT);
  dp.put(PARAM_HOST_NAME,"String_Node_Str");
  dp.put(PARAM_LAUNCH,"String_Node_Str");
  return dp;
}
Program: 12875
Project: 12875
Buggy source:
/** 
 * Returns the fields, methods, constructors, and member types that are directly declared in this class or interface. This includes any   {@linkplain Elements.Origin#MANDATED mandated} elements such as the (implicit) default constructorand the implicit  {@code values} and {@code valueOf} methods ofan enum type.
 * @apiNote As a particular instance of the {@linkplain javax.lang.model.element general accuracy requirements} and theordering behavior required of this interface, the list of enclosed elements will be returned in the natural order for the originating source of information about the type.  For example, if the information about the type is originating from a source file, the elements will be returned in source code order. (However, in that case the the ordering of elements, such as a default constructor, is not specified.)
 * @return the enclosed elements in proper order, or an empty list if none
 * @jls 8.8.9 Default Constructor
 * @jls 8.9.3 Enum Members
 */
@Override List<? extends Element> getEnclosedElements();

Fixed version (ground truth):
/** 
 * Returns the fields, methods, constructors, and member types that are directly declared in this class or interface. This includes any   {@linkplain Elements.Origin#MANDATED mandated} elements such as the (implicit) default constructorand the implicit  {@code values} and {@code valueOf} methods ofan enum type.
 * @apiNote As a particular instance of the {@linkplain javax.lang.model.element general accuracy requirements} and theordering behavior required of this interface, the list of enclosed elements will be returned in the natural order for the originating source of information about the type.  For example, if the information about the type is originating from a source file, the elements will be returned in source code order. (However, in that case the the ordering of  {@linkplain Elements.Origin#MANDATED implicitly declared} elements, such asdefault constructors, is not specified.)
 * @return the enclosed elements in proper order, or an empty list if none
 * @jls 8.8.9 Default Constructor
 * @jls 8.9.3 Enum Members
 */
@Override List<? extends Element> getEnclosedElements();
Program: 12876
Project: 12876
Buggy source:
/** 
 * If the processor class is annotated with   {@link SupportedAnnotationTypes}, return an unmodifiable set with the same set of strings as the annotation.  If the class is not so annotated, an empty set is returned. If the   {@link ProcessingEvironment#getSourceVersion sourceversion} does not support modules, in other words if it is lessthan or equal to  {@link SourceVersion#RELEASE_8 RELEASE_8}, then any leading   {@link Processor#getSupportedAnnotationTypes module prefixes} are stripped from the names.
 * @return the names of the annotation types supported by thisprocessor, or an empty set if none
 */
public Set<String> getSupportedAnnotationTypes(){
  SupportedAnnotationTypes sat=this.getClass().getAnnotation(SupportedAnnotationTypes.class);
  boolean initialized=isInitialized();
  if (sat == null) {
    if (initialized)     processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING,"String_Node_Str" + "String_Node_Str" + this.getClass().getName() + "String_Node_Str");
    return Collections.emptySet();
  }
 else {
    boolean stripModulePrefixes=initialized && processingEnv.getSourceVersion().compareTo(SourceVersion.RELEASE_8) <= 0;
    return arrayToSet(sat.value(),stripModulePrefixes);
  }
}

Fixed version (ground truth):
/** 
 * If the processor class is annotated with   {@link SupportedAnnotationTypes}, return an unmodifiable set with the same set of strings as the annotation.  If the class is not so annotated, an empty set is returned. If the   {@link ProcessingEnvironment#getSourceVersion sourceversion} does not support modules, in other words if it is lessthan or equal to  {@link SourceVersion#RELEASE_8 RELEASE_8}, then any leading   {@link Processor#getSupportedAnnotationTypes module prefixes} are stripped from the names.
 * @return the names of the annotation types supported by thisprocessor, or an empty set if none
 */
public Set<String> getSupportedAnnotationTypes(){
  SupportedAnnotationTypes sat=this.getClass().getAnnotation(SupportedAnnotationTypes.class);
  boolean initialized=isInitialized();
  if (sat == null) {
    if (initialized)     processingEnv.getMessager().printMessage(Diagnostic.Kind.WARNING,"String_Node_Str" + "String_Node_Str" + this.getClass().getName() + "String_Node_Str");
    return Collections.emptySet();
  }
 else {
    boolean stripModulePrefixes=initialized && processingEnv.getSourceVersion().compareTo(SourceVersion.RELEASE_8) <= 0;
    return arrayToSet(sat.value(),stripModulePrefixes);
  }
}
Program: 12878
Project: 12878
Buggy source:
@Override public void visitRequires(JCRequires tree){
  if (tree.directive != null) {
    chk.checkDeprecated(tree.moduleName.pos(),msym,tree.directive.module);
    msym.directives=msym.directives.prepend(tree.directive);
  }
}

Fixed version (ground truth):
@Override public void visitRequires(JCRequires tree){
  if (tree.directive != null && allModules().contains(tree.directive.module)) {
    chk.checkDeprecated(tree.moduleName.pos(),msym,tree.directive.module);
    msym.directives=msym.directives.prepend(tree.directive);
  }
}
Program: 12880
Project: 12880
Buggy source:
/** 
 * Returns the module of an element.  The module of a module is itself. If there is no module for the element, null is returned. One situation where there is no module for an element is if the environment does not include modules, such as an annotation processing environment configured for a   {@linkplain ProcessingEnvironment#getSourceVersion source version} without modules.      
 * @param type the element being examined
 * @return the module of an element
 * @since 9
 */
ModuleElement getModuleOf(Element type);

Fixed version (ground truth):
/** 
 * Returns the module of an element.  The module of a module is itself. If there is no module for the element, null is returned. One situation where there is no module for an element is if the environment does not include modules, such as an annotation processing environment configured for a   {@linkplain javax.annotation.processing.ProcessingEnvironment#getSourceVersion source version} without modules.
 * @param type the element being examined
 * @return the module of an element
 * @since 9
 */
ModuleElement getModuleOf(Element type);
Program: 12881
Project: 12881
Buggy source:
/** 
 * Returns a module element given its fully qualified name. If the named module cannot be found, null is returned. One situation where a module cannot be found is if the environment does not include modules, such as an annotation processing environment configured for a   {@linkplain ProcessingEnvironment#getSourceVersion source version} without modules.      
 * @param name  the name
 * @return the named module element, or {@code null} if it cannot be found
 * @since 9
 */
ModuleElement getModuleElement(CharSequence name);

Fixed version (ground truth):
/** 
 * Returns a module element given its fully qualified name. If the named module cannot be found, null is returned. One situation where a module cannot be found is if the environment does not include modules, such as an annotation processing environment configured for a   {@linkplain javax.annotation.processing.ProcessingEnvironment#getSourceVersion source version} without modules.
 * @param name  the name
 * @return the named module element, or {@code null} if it cannot be found
 * @since 9
 */
ModuleElement getModuleElement(CharSequence name);
Program: 12882
Project: 12882
Buggy source:
CaInfo scan(String s){
  try {
    Scanner scanner=scannerFactory.newScanner(s,false);
    Matched in=new Matched(scanner);
    Parser parser=new Parser(in,proc,s);
    Completeness stat=parser.parseUnit();
    int endPos=stat == Completeness.UNKNOWN ? s.length() : in.prevCT.endPos;
    return new CaInfo(stat,endPos);
  }
 catch (  SyntaxException ex) {
    return new CaInfo(error(),s.length());
  }
}

Fixed version (ground truth):
CaInfo scan(String s){
  try {
    Parser parser=new Parser(() -> new Matched(scannerFactory.newScanner(s,false)),() -> proc.taskFactory.new ParseTask(s));
    Completeness stat=parser.parseUnit();
    int endPos=stat == Completeness.UNKNOWN ? s.length() : parser.endPos();
    return new CaInfo(stat,endPos);
  }
 catch (  SyntaxException ex) {
    return new CaInfo(error(),s.length());
  }
}
Program: 12883
Project: 12883
Buggy source:
/** 
 * @return the next scanner token
 */
private CT nextCT(){
  TK prevTK=currentCT.kind;
  while (true) {
    db("String_Node_Str");
    CT ct;
switch (current.kind) {
case EOF:
      db("String_Node_Str");
    if (stack.isEmpty()) {
      ct=new CT(EOF,current);
    }
 else {
      TokenKind unmatched=stack.pop().kind;
      stack.clear();
      ct=new CT(UNMATCHED,current,"String_Node_Str" + unmatched);
    }
  break;
case LPAREN:
case LBRACE:
case LBRACKET:
stack.push(advance());
prevTK=SEMI;
continue;
case RPAREN:
ct=match(PARENS,TokenKind.LPAREN);
break;
case RBRACE:
ct=match(BRACES,TokenKind.LBRACE);
break;
case RBRACKET:
ct=match(BRACKETS,TokenKind.LBRACKET);
break;
default :
ct=new CT(TK.tokenKindToTK(current.kind),advance());
break;
}
if (ct.kind.isStart() && !prevTK.isOkToTerminate()) {
return new CT(ERROR,current,"String_Node_Str" + prevTK + "String_Node_Str"+ ct.kind+ "String_Node_Str");
}
if (stack.isEmpty() || ct.kind.isError()) {
return ct;
}
prevTK=ct.kind;
}
}

Fixed version (ground truth):
/** 
 * @return the next scanner token
 */
private CT nextCT(){
  TK prevTK=currentCT.kind;
  while (true) {
    db("String_Node_Str");
    CT ct;
switch (current.kind) {
case EOF:
      db("String_Node_Str");
    if (stack.isEmpty()) {
      ct=new CT(EOF,current);
    }
 else {
      TokenKind unmatched=stack.pop().kind;
      stack.clear();
      ct=new CT(UNMATCHED,current,"String_Node_Str" + unmatched);
    }
  break;
case LPAREN:
case LBRACE:
case LBRACKET:
stack.push(advance());
prevTK=SEMI;
continue;
case RPAREN:
ct=match(PARENS,TokenKind.LPAREN);
break;
case RBRACE:
ct=match(BRACES,TokenKind.LBRACE);
break;
case RBRACKET:
ct=match(BRACKETS,TokenKind.LBRACKET);
break;
default :
ct=new CT(TK.tokenKindToTK(prevTK,current.kind),advance());
break;
}
if (ct.kind.isStart() && !prevTK.isOkToTerminate()) {
return new CT(ERROR,current,"String_Node_Str" + prevTK + "String_Node_Str"+ ct.kind+ "String_Node_Str");
}
if (stack.isEmpty() || ct.kind.isError()) {
return ct;
}
prevTK=ct.kind;
}
}
Program: 12884
Project: 12884
Buggy source:
private static TK tokenKindToTK(TokenKind kind){
  TK tk=tokenKindToTKMap.get(kind);
  if (tk == null) {
    System.err.printf("String_Node_Str",TK.class.getCanonicalName(),TokenKind.class.getCanonicalName(),kind);
    throw new InternalError("String_Node_Str" + kind);
  }
  return tk;
}

Fixed version (ground truth):
private static TK tokenKindToTK(TK prev,TokenKind kind){
  TK tk=tokenKindToTKMap.get(kind);
  if (tk == null) {
    System.err.printf("String_Node_Str",TK.class.getCanonicalName(),TokenKind.class.getCanonicalName(),kind);
    throw new InternalError("String_Node_Str" + kind);
  }
  return tk.mapping != null ? tk.mapping.apply(prev) : tk;
}
Program: 12885
Project: 12885
Buggy source:
public Completeness disambiguateDeclarationVsExpression(){
  ParseTask pt=proc.taskFactory.new ParseTask(scannedInput);
  List<? extends Tree> units=pt.units();
  if (units.isEmpty()) {
    return error();
  }
  Tree unitTree=units.get(0);
switch (unitTree.getKind()) {
case EXPRESSION_STATEMENT:
    return parseExpressionOptionalSemi();
case LABELED_STATEMENT:
  if (shouldAbort(IDENTIFIER))   return checkResult;
if (shouldAbort(COLON)) return checkResult;
return parseStatement();
case VARIABLE:
case IMPORT:
case CLASS:
case ENUM:
case ANNOTATION_TYPE:
case INTERFACE:
case METHOD:
return parseDeclaration();
default :
return error();
}
}

Fixed version (ground truth):
public Completeness disambiguateDeclarationVsExpression(){
  ParseTask pt=parseFactory.get();
  List<? extends Tree> units=pt.units();
  if (units.isEmpty()) {
    return error();
  }
  Tree unitTree=units.get(0);
switch (unitTree.getKind()) {
case EXPRESSION_STATEMENT:
    return parseExpressionOptionalSemi();
case LABELED_STATEMENT:
  if (shouldAbort(IDENTIFIER))   return checkResult;
if (shouldAbort(COLON)) return checkResult;
return parseStatement();
case VARIABLE:
case IMPORT:
case CLASS:
case ENUM:
case ANNOTATION_TYPE:
case INTERFACE:
case METHOD:
return parseDeclaration();
default :
return error();
}
}
Program: 12886
Project: 12886
Buggy source:
public Completeness parseDeclaration(){
  boolean isImport=token.kind == IMPORT;
  while (token.kind.isDeclaration()) {
    nextToken();
  }
switch (token.kind) {
case EQ:
    nextToken();
  if (token.kind == BRACES) {
    nextToken();
    return lastly(SEMI);
  }
return parseExpressionStatement();
case BRACES:
case SEMI:
nextToken();
return Completeness.COMPLETE;
case UNMATCHED:
nextToken();
return Completeness.DEFINITELY_INCOMPLETE;
case EOF:
switch (in.prevCT.kind) {
case BRACES:
case SEMI:
return Completeness.COMPLETE;
case IDENTIFIER:
case BRACKETS:
return Completeness.COMPLETE_WITH_SEMI;
case STAR:
if (isImport) {
return Completeness.COMPLETE_WITH_SEMI;
}
 else {
return Completeness.DEFINITELY_INCOMPLETE;
}
default :
return Completeness.DEFINITELY_INCOMPLETE;
}
default :
return error();
}
}

Fixed version (ground truth):
public Completeness parseDeclaration(){
  boolean isImport=token.kind == IMPORT;
  while (token.kind.isDeclaration()) {
    nextToken();
  }
switch (token.kind) {
case EQ:
    nextToken();
  if (token.kind == BRACES) {
    nextToken();
    return lastly(SEMI);
  }
return parseExpressionStatement();
case BRACES:
case SEMI:
nextToken();
return Completeness.COMPLETE;
case UNMATCHED:
nextToken();
return Completeness.DEFINITELY_INCOMPLETE;
case EOF:
switch (in.prevCT.kind) {
case BRACES:
case SEMI:
return Completeness.COMPLETE;
case IDENTIFIER:
case BRACKETS:
return Completeness.COMPLETE_WITH_SEMI;
case DOTSTAR:
if (isImport) {
return Completeness.COMPLETE_WITH_SEMI;
}
 else {
return Completeness.UNKNOWN;
}
default :
return Completeness.DEFINITELY_INCOMPLETE;
}
default :
return error();
}
}
Program: 12887
Project: 12887
Buggy source:
Parser(Matched in,JShell proc,String scannedInput){
  this.in=in;
  nextToken();
  this.proc=proc;
  this.scannedInput=scannedInput;
}

Fixed version (ground truth):
Parser(Supplier<Matched> matchedFactory,Supplier<ParseTask> parseFactory){
  this.matchedFactory=matchedFactory;
  this.parseFactory=parseFactory;
  resetInput();
}
Program: 12888
Project: 12888
Buggy source:
void TK(TokenKind tokenKind,int b){
  this.tokenKind=tokenKind;
  this.belongs=b;
}

Fixed version (ground truth):
void TK(TokenKind tokenKind,int b){
  this.tokenKind=tokenKind;
  this.belongs=b;
  this.mapping=null;
}
Program: 12890
Project: 12890
Buggy source:
private JCBlock makeLambdaExpressionBody(JCExpression expr,JCMethodDecl lambdaMethodDecl){
  Type restype=lambdaMethodDecl.type.getReturnType();
  boolean isLambda_void=expr.type.hasTag(VOID);
  boolean isTarget_void=restype.hasTag(VOID);
  boolean isTarget_Void=types.isSameType(restype,types.boxedClass(syms.voidType).type);
  int prevPos=make.pos;
  try {
    if (isTarget_void) {
      JCStatement stat=make.at(expr).Exec(expr);
      return make.Block(0,List.<JCStatement>of(stat));
    }
 else     if (isLambda_void && isTarget_Void) {
      ListBuffer<JCStatement> stats=new ListBuffer<>();
      stats.append(make.at(expr).Exec(expr));
      stats.append(make.Return(make.Literal(BOT,null).setType(syms.botType)));
      return make.Block(0,stats.toList());
    }
 else {
      JCExpression retExpr=transTypes.coerce(attrEnv,expr,restype);
      return make.at(retExpr).Block(0,List.<JCStatement>of(make.Return(retExpr)));
    }
  }
  finally {
    make.at(prevPos);
  }
}

Fixed version (ground truth):
private JCBlock makeLambdaExpressionBody(JCExpression expr,JCMethodDecl lambdaMethodDecl){
  Type restype=lambdaMethodDecl.type.getReturnType();
  boolean isLambda_void=expr.type.hasTag(VOID);
  boolean isTarget_void=restype.hasTag(VOID);
  boolean isTarget_Void=types.isSameType(restype,types.boxedClass(syms.voidType).type);
  if (isTarget_void) {
    JCStatement stat=make.Exec(expr);
    return make.Block(0,List.<JCStatement>of(stat));
  }
 else   if (isLambda_void && isTarget_Void) {
    ListBuffer<JCStatement> stats=new ListBuffer<>();
    stats.append(make.Exec(expr));
    stats.append(make.Return(make.Literal(BOT,null).setType(syms.botType)));
    return make.Block(0,stats.toList());
  }
 else {
    JCExpression retExpr=transTypes.coerce(attrEnv,expr,restype);
    return make.at(retExpr).Block(0,List.<JCStatement>of(make.Return(retExpr)));
  }
}
Program: 12891
Project: 12891
Buggy source:
private KlassInfo(JCClassDecl clazz){
  this.clazz=clazz;
  appendedMethodList=new ListBuffer<>();
  deserializeCases=new HashMap<String,ListBuffer<JCStatement>>();
  MethodType type=new MethodType(List.of(syms.serializedLambdaType),syms.objectType,List.<Type>nil(),syms.methodClass);
  deserMethodSym=makePrivateSyntheticMethod(STATIC,names.deserializeLambda,type,clazz.sym);
  deserParamSym=new VarSymbol(FINAL,names.fromString("String_Node_Str"),syms.serializedLambdaType,deserMethodSym);
}

Fixed version (ground truth):
private KlassInfo(Symbol kSym){
  appendedMethodList=new ListBuffer<>();
  deserializeCases=new HashMap<String,ListBuffer<JCStatement>>();
  MethodType type=new MethodType(List.of(syms.serializedLambdaType),syms.objectType,List.<Type>nil(),syms.methodClass);
  deserMethodSym=makePrivateSyntheticMethod(STATIC,names.deserializeLambda,type,kSym);
  deserParamSym=new VarSymbol(FINAL,names.fromString("String_Node_Str"),syms.serializedLambdaType,deserMethodSym);
}
Program: 12892
Project: 12892
Buggy source:
/** 
 * Returns the names of the annotation types supported by this processor.  An element of the result may be the canonical (fully qualified) name of a supported annotation type. Alternately it may be of the form &quot;<tt><i>name</i>.*</tt>&quot; representing the set of all annotation types with canonical names beginning with &quot;<tt><i>name.</i></tt>&quot;.  Finally,   {@code "*"} by itself represents the set of all annotation types,including the empty set.  Note that a processor should not claim  {@code "*"} unless it is actually processing all files;claiming unnecessary annotations may cause a performance slowdown in some environments. <p>Each string returned in the set must be accepted by the following grammar: <blockquote> <dl> <dt><i>SupportedAnnotationTypeString:</i> <dd><i>TypeName</i> <i>DotStar</i><sub><i>opt</i></sub> <dd><tt>*</tt> <p> <dt><i>DotStar:</i> <dd><tt>.</tt> <tt>*</tt> </dl> </blockquote> where <i>TypeName</i> is as defined in <cite>The Java&trade; Language Specification</cite>.
 * @return the names of the annotation types supported by this processor
 * @see javax.annotation.processing.SupportedAnnotationTypes
 * @jls 3.8 Identifiers
 * @jls 6.5.5 Meaning of Type Names
 */
Set<String> getSupportedAnnotationTypes();

Fixed version (ground truth):
/** 
 * Returns the names of the annotation types supported by this processor.  An element of the result may be the canonical (fully qualified) name of a supported annotation type. Alternately it may be of the form &quot;<tt><i>name</i>.*</tt>&quot; representing the set of all annotation types with canonical names beginning with &quot;<tt><i>name.</i></tt>&quot;.  Finally,   {@code "*"} by itself represents the set of all annotation types,including the empty set.  Note that a processor should not claim  {@code "*"} unless it is actually processing all files;claiming unnecessary annotations may cause a performance slowdown in some environments. <p>Each string returned in the set must be accepted by the following grammar: <blockquote> <dl> <dt><i>SupportedAnnotationTypeString:</i> <dd><i>TypeName</i> <i>DotStar</i><sub><i>opt</i></sub> <dd><tt>*</tt> <dt><i>DotStar:</i> <dd><tt>.</tt> <tt>*</tt> </dl> </blockquote> where <i>TypeName</i> is as defined in <cite>The Java&trade; Language Specification</cite>.
 * @return the names of the annotation types supported by this processor
 * @see javax.annotation.processing.SupportedAnnotationTypes
 * @jls 3.8 Identifiers
 * @jls 6.5.5 Meaning of Type Names
 */
Set<String> getSupportedAnnotationTypes();
Program: 12893
Project: 12893
Buggy source:
/** 
 * Returns the options recognized by this processor.  An implementation of the processing tool must provide a way to pass processor-specific options distinctly from options passed to the tool itself, see   {@link ProcessingEnvironment#getOptions getOptions}. <p>Each string returned in the set must be a period separated sequence of   {@linkplain javax.lang.model.SourceVersion#isIdentifier identifiers}: <blockquote> <dl> <dt><i>SupportedOptionString:</i> <dd><i>Identifiers</i> <p> <dt><i>Identifiers:</i> <dd> <i>Identifier</i> <dd> <i>Identifier</i>   {@code .} <i>Identifiers</i><p> <dt><i>Identifier:</i> <dd>Syntactic identifier, including keywords and literals </dl> </blockquote> <p> A tool might use this information to determine if any options provided by a user are unrecognized by any processor, in which case it may wish to report a warning.
 * @return the options recognized by this processor or anempty collection if none
 * @see javax.annotation.processing.SupportedOptions
 */
Set<String> getSupportedOptions();

Fixed version (ground truth):
/** 
 * Returns the options recognized by this processor.  An implementation of the processing tool must provide a way to pass processor-specific options distinctly from options passed to the tool itself, see   {@link ProcessingEnvironment#getOptions getOptions}. <p>Each string returned in the set must be a period separated sequence of   {@linkplain javax.lang.model.SourceVersion#isIdentifier identifiers}: <blockquote> <dl> <dt><i>SupportedOptionString:</i> <dd><i>Identifiers</i> <dt><i>Identifiers:</i> <dd> <i>Identifier</i> <dd> <i>Identifier</i>   {@code .} <i>Identifiers</i><dt><i>Identifier:</i> <dd>Syntactic identifier, including keywords and literals </dl> </blockquote> <p> A tool might use this information to determine if any options provided by a user are unrecognized by any processor, in which case it may wish to report a warning.
 * @return the options recognized by this processor or anempty collection if none
 * @see javax.annotation.processing.SupportedOptions
 */
Set<String> getSupportedOptions();
Program: 12894
Project: 12894
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()  </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();

Fixed version (ground truth):
/** 
 * Return the kind of this tag. 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" summary="related tags"> <tr><th>  {@code kind()  }</th>  <th>  {@code name()      }</th></tr> <tr><td>  {@code @throws }</td>  <td>  {@code @throws     }</td></tr> <tr><td>  {@code @throws }</td>  <td>  {@code @exception  }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @see        }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @link       }</td></tr> <tr><td>  {@code @see    }</td>  <td>  {@code @linkplain  }</td></tr> <tr><td>  {@code @serial }</td>  <td>  {@code @serial     }</td></tr> <tr><td>  {@code @serial }</td>  <td>  {@code @serialData }</td></tr> </table>
 * @return the kind of this tag.
 */
String kind();
Program: 12895
Project: 12895
Buggy source:
/** 
 * Return the name of this tag.  The name is the string starting with "@" that is used in a doc comment, such as <code>@return</code>.  For inline tags, such as <code>{&#064;link}</code>, the curly brackets are not part of the name, so in this example the name would be simply <code>@link</code>.
 */
String name();

Fixed version (ground truth):
/** 
 * Return the name of this tag.  The name is the string starting with "@" that is used in a doc comment, such as <code>@return</code>.  For inline tags, such as <code>{&#064;link}</code>, the curly brackets are not part of the name, so in this example the name would be simply <code>@link</code>.
 * @return the name of this tag
 */
String name();
Program: 12896
Project: 12896
Buggy source:
/** 
 * Return the containing   {@link Doc} of this Tag element.
 */
Doc holder();

Fixed version (ground truth):
/** 
 * Return the containing   {@link Doc} of this Tag element.
 * @return the containing {@link Doc} of this Tag element
 */
Doc holder();
Program: 12897
Project: 12897
Buggy source:
/** 
 * Return the text of this tag, that is, portion beyond tag name.
 */
String text();

Fixed version (ground truth):
/** 
 * Return the text of this tag, that is, the portion beyond tag name.
 * @return the text of this tag
 */
String text();
Program: 12898
Project: 12898
Buggy source:
BasicLookupHelper(Name name,Type site,List<Type> argtypes,List<Type> typeargtypes){
  super(name,site,argtypes,typeargtypes,MethodResolutionPhase.VARARITY);
}

Fixed version (ground truth):
BasicLookupHelper(Name name,Type site,List<Type> argtypes,List<Type> typeargtypes,MethodResolutionPhase maxPhase){
  super(name,site,argtypes,typeargtypes,maxPhase);
}
Program: 12900
Project: 12900
Buggy source:
/** 
 * Resolve operator.
 * @param pos       The position to use for error reporting.
 * @param optag     The tag of the operation tree.
 * @param env       The environment current at the operation.
 * @param argtypes  The types of the operands.
 */
Symbol resolveOperator(DiagnosticPosition pos,JCTree.Tag optag,Env<AttrContext> env,List<Type> argtypes){
  MethodResolutionContext prevResolutionContext=currentResolutionContext;
  try {
    currentResolutionContext=new MethodResolutionContext();
    Name name=treeinfo.operatorName(optag);
    env.info.pendingResolutionPhase=currentResolutionContext.step=BASIC;
    Symbol sym=findMethod(env,syms.predefClass.type,name,argtypes,null,false,false,true);
    if (boxingEnabled && sym.kind >= WRONG_MTHS)     env.info.pendingResolutionPhase=currentResolutionContext.step=BOX;
    sym=findMethod(env,syms.predefClass.type,name,argtypes,null,true,false,true);
    return accessMethod(sym,pos,env.enclClass.sym.type,name,false,argtypes,null);
  }
  finally {
    currentResolutionContext=prevResolutionContext;
  }
}

Fixed version (ground truth):
/** 
 * Resolve operator.
 * @param pos       The position to use for error reporting.
 * @param optag     The tag of the operation tree.
 * @param env       The environment current at the operation.
 * @param argtypes  The types of the operands.
 */
Symbol resolveOperator(DiagnosticPosition pos,JCTree.Tag optag,Env<AttrContext> env,List<Type> argtypes){
  MethodResolutionContext prevResolutionContext=currentResolutionContext;
  try {
    currentResolutionContext=new MethodResolutionContext();
    Name name=treeinfo.operatorName(optag);
    return lookupMethod(env,pos,syms.predefClass,currentResolutionContext,new BasicLookupHelper(name,syms.predefClass.type,argtypes,null,BOX){
      @Override Symbol lookup(      Env<AttrContext> env,      MethodResolutionPhase phase){
        return findMethod(env,site,name,argtypes,typeargtypes,phase.isBoxingRequired(),phase.isVarargsRequired(),true);
      }
      @Override Symbol access(      Env<AttrContext> env,      DiagnosticPosition pos,      Symbol location,      Symbol sym){
        return accessMethod(sym,pos,env.enclClass.sym.type,name,false,argtypes,null);
      }
    }
);
  }
  finally {
    currentResolutionContext=prevResolutionContext;
  }
}
Program: 12901
Project: 12901
Buggy source:
String computeKey(Element e){
  StringBuilder buf=new StringBuilder();
  while (e != null) {
    buf.append(e.toString());
    e=e.getEnclosingElement();
  }
  buf.append(jfo.getName());
  return buf.toString();
}

Fixed version (ground truth):
String computeKey(Element e){
  StringBuilder buf=new StringBuilder();
  if (predefTranslationMap.containsKey(e.getSimpleName().toString())) {
    buf.append("String_Node_Str");
    String replacedName=predefTranslationMap.get(e.getSimpleName().toString());
    buf.append(e.toString().replace(e.getSimpleName().toString(),replacedName));
  }
 else   if (e.getSimpleName().toString().startsWith("String_Node_Str")) {
    buf.append("String_Node_Str");
    buf.append(e.toString());
  }
 else {
    while (e != null) {
      buf.append(e.toString());
      e=e.getEnclosingElement();
    }
    buf.append(jfo.getName());
  }
  return buf.toString();
}
Program: 12902
Project: 12902
Buggy source:
protected ResolveHarness(JavaFileObject jfo){
  this.jfo=jfo;
  this.diagProcessors=new DiagnosticProcessor[]{new VerboseResolutionNoteProcessor(),new VerboseDeferredInferenceNoteProcessor(),new ErrorProcessor()};
}

Fixed version (ground truth):
protected ResolveHarness(JavaFileObject jfo){
  this.jfo=jfo;
  this.diagProcessors=new DiagnosticProcessor[]{new VerboseResolutionNoteProcessor(),new VerboseDeferredInferenceNoteProcessor(),new ErrorProcessor()};
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
  predefTranslationMap.put("String_Node_Str","String_Node_Str");
}
Program: 12903
Project: 12903
Buggy source:
/** 
 * Convenience method equivalent to   {@code v.scan(e, null)}.
 * @return the result of scanning {@code e}.
 */
public final R scan(Element e){
  return scan(e,null);
}

Fixed version (ground truth):
/** 
 * Convenience method equivalent to   {@code v.scan(e, null)}.
 * @param e the element to scan
 * @return the result of scanning {@code e}.
 */
public final R scan(Element e){
  return scan(e,null);
}
Program: 12904
Project: 12904
Buggy source:
/** 
 * Return a name with the same sequence of characters as the argument.
 * @param cs the character sequence to return as a name
 */
Name getName(CharSequence cs);

Fixed version (ground truth):
/** 
 * Return a name with the same sequence of characters as the argument.
 * @param cs the character sequence to return as a name
 * @return a name with the same sequence of characters as the argument
 */
Name getName(CharSequence cs);
Program: 12905
Project: 12905
Buggy source:
/** 
 * Returns the element corresponding to a type. The type may be a   {@code DeclaredType} or {@code TypeVariable}. Returns   {@code null} if the type is not one with acorresponding element.
 * @return the element corresponding to the given type
 */
Element asElement(TypeMirror t);

Fixed version (ground truth):
/** 
 * Returns the element corresponding to a type. The type may be a   {@code DeclaredType} or {@code TypeVariable}. Returns   {@code null} if the type is not one with acorresponding element.
 * @param t the type to map to an element
 * @return the element corresponding to the given type
 */
Element asElement(TypeMirror t);
Program: 12906
Project: 12906
Buggy source:
private static List<Archive> init(){
  List<Archive> result=new ArrayList<Archive>();
  String javaHome=System.getProperty("String_Node_Str");
  List<File> files=new ArrayList<File>();
  File jre=new File(javaHome,"String_Node_Str");
  File lib=new File(javaHome,"String_Node_Str");
  try {
    if (jre.exists() && jre.isDirectory()) {
      result.addAll(addJarFiles(new File(jre,"String_Node_Str")));
      result.addAll(addJarFiles(lib));
    }
 else     if (lib.exists() && lib.isDirectory()) {
      File classes=new File(javaHome,"String_Node_Str");
      if (classes.exists() && classes.isDirectory()) {
        result.add(new Archive(classes,ClassFileReader.newInstance(classes)));
      }
      result.addAll(addJarFiles(lib));
    }
 else {
      throw new RuntimeException("String_Node_Str" + javaHome + "String_Node_Str");
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  return result;
}

Fixed version (ground truth):
private static List<Archive> init(){
  List<Archive> result=new ArrayList<Archive>();
  String javaHome=System.getProperty("String_Node_Str");
  File jre=new File(javaHome,"String_Node_Str");
  File lib=new File(javaHome,"String_Node_Str");
  try {
    if (jre.exists() && jre.isDirectory()) {
      result.addAll(addJarFiles(new File(jre,"String_Node_Str")));
      result.addAll(addJarFiles(lib));
    }
 else     if (lib.exists() && lib.isDirectory()) {
      File classes=new File(javaHome,"String_Node_Str");
      if (classes.exists() && classes.isDirectory()) {
        result.add(new Archive(classes,ClassFileReader.newInstance(classes)));
      }
      result.addAll(addJarFiles(lib));
    }
 else {
      throw new RuntimeException("String_Node_Str" + javaHome + "String_Node_Str");
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
  return result;
}
Program: 12909
Project: 12909
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: 12911
Project: 12911
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));
}