nus-yam/ex-repair huggingface dataset:
Program: 82999
Project: 82999
Buggy source:
@Override public boolean isSuperClassOf(IType type){
  return type.isArrayType() && this.getElementType().isSuperClassOf(type.getElementType());
}

Fixed version (ground truth):
@Override public boolean isSuperClassOf(IType type){
  if (!type.isArrayType()) {
    return false;
  }
  IType elementType=type.getElementType();
  return this.type.isSuperClassOf(elementType) && this.type.isPrimitive() == elementType.isPrimitive();
}
Program: 83000
Project: 83000
Buggy source:
public void set(Object type){
  if (type == LONG || type == DOUBLE) {
    Object o=this.stack[this.stackCount - 1];
    if (o != LONG && o != DOUBLE) {
      this.actualStackCount++;
    }
  }
  this.stack[this.stackCount - 1]=type;
}

Fixed version (ground truth):
public void set(Object type){
  if (type == null) {
    return;
  }
  if (type == LONG || type == DOUBLE) {
    Object o=this.stack[this.stackCount - 1];
    if (o != LONG && o != DOUBLE) {
      this.actualStackCount++;
    }
  }
  this.stack[this.stackCount - 1]=type;
}
Program: 83001
Project: 83001
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  this.resolveReceiver(markers,context);
  IValue v=this.resolveFieldAccess(markers,context);
  if (v != null) {
    return v;
  }
  Marker marker=I18n.createMarker(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo(I18n.getString("String_Node_Str",this.name.qualified));
  if (this.receiver != null) {
    marker.addInfo(I18n.getString("String_Node_Str",this.receiver.getType()));
  }
  markers.add(marker);
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  this.resolveReceiver(markers,context);
  IValue v=this.resolveFieldAccess(markers,context);
  if (v != null) {
    return v;
  }
  if (this.receiver != null && !this.receiver.isResolved()) {
    return this;
  }
  Marker marker=I18n.createMarker(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo(I18n.getString("String_Node_Str",this.name.qualified));
  if (this.receiver != null) {
    marker.addInfo(I18n.getString("String_Node_Str",this.receiver.getType()));
  }
  markers.add(marker);
  return this;
}
Program: 83002
Project: 83002
Buggy source:
@Override default IValue resolve(MarkerList markers,IContext context){
  int wildcards=this.wildcardCount();
  if (wildcards > 0) {
    return this.toLambda(markers,context,wildcards);
  }
  this.resolveReceiver(markers,context);
  this.resolveArguments(markers,context);
  IValue resolved=this.resolveCall(markers,context);
  if (resolved != null) {
    return resolved;
  }
  this.reportResolve(markers,context);
  return this;
}

Fixed version (ground truth):
@Override default IValue resolve(MarkerList markers,IContext context){
  int wildcards=this.wildcardCount();
  if (wildcards > 0) {
    return this.toLambda(markers,context,wildcards);
  }
  this.resolveReceiver(markers,context);
  this.resolveArguments(markers,context);
  IValue resolved=this.resolveCall(markers,context);
  if (resolved != null) {
    return resolved;
  }
  IValue receiver=this.getReceiver();
  if (receiver != null && !receiver.isResolved()) {
    return this;
  }
  if (!this.getArguments().isResolved()) {
    return this;
  }
  this.reportResolve(markers,context);
  return this;
}
Program: 83003
Project: 83003
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isArrayType()) {
    return this;
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.NIL_CONVERTIBLE_CLASS);
  if (annotation != null) {
    this.methodName=LiteralConversion.getMethodName(annotation);
    this.requiredType=type;
    return this;
  }
  markers.add(I18n.createMarker(this.position,"String_Node_Str",type));
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isArrayType()) {
    this.requiredType=type;
    this.methodName=Names.apply;
    return this;
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.NIL_CONVERTIBLE_CLASS);
  if (annotation != null) {
    this.methodName=LiteralConversion.getMethodName(annotation);
    this.requiredType=type;
    return this;
  }
  if (type != dyvil.tools.compiler.ast.type.Types.UNKNOWN) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",type));
  }
 else {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",type));
  }
  return this;
}
Program: 83004
Project: 83004
Buggy source:
@Override public void setValue(IValue value){
  REPLVariable field=new REPLVariable(this,ICodePosition.ORIGIN,null,Types.UNKNOWN,value,this.className,Modifiers.FINAL);
  this.memberClass=this.getREPLClass(field);
  value.resolveTypes(this.markers,this);
  value=value.resolve(this.markers,this);
  if (value.valueTag() == IValue.FIELD_ACCESS) {
    IDataMember f=((FieldAccess)value).getField();
    if (f instanceof REPLVariable) {
      ((REPLVariable)f).updateValue();
      System.out.println(f);
      return;
    }
  }
  IType type=value.getType();
  value=value.withType(type,type,this.markers,this);
  if (value == null) {
    throw new Error("String_Node_Str" + type);
  }
  type=value.getType();
  value.checkTypes(this.markers,this);
  value.check(this.markers,this);
  if (this.hasErrors()) {
    return;
  }
  for (int i=0; i < DyvilCompiler.constantFolding; i++) {
    value=value.foldConstants();
  }
  value=value.cleanup(this,this);
  field.setValue(value);
  field.setType(type);
  field.setName(this.getFieldName(type));
  this.compileVariable(field);
  if (type != Types.VOID) {
    this.fields.put(field.getName(),field);
    System.out.println(field.toString());
  }
}

Fixed version (ground truth):
@Override public void setValue(IValue value){
  REPLVariable field=new REPLVariable(this,ICodePosition.ORIGIN,null,Types.UNKNOWN,value,this.className,Modifiers.FINAL);
  this.memberClass=this.getREPLClass(field);
  value.resolveTypes(this.markers,this);
  value=value.resolve(this.markers,this);
  if (value.valueTag() == IValue.FIELD_ACCESS) {
    IDataMember f=((FieldAccess)value).getField();
    if (f instanceof REPLVariable) {
      ((REPLVariable)f).updateValue();
      System.out.println(f);
      return;
    }
  }
  IType type=value.getType();
  IValue typedValue=value.withType(type,type,this.markers,this);
  if (typedValue != null) {
    value=typedValue;
  }
  type=value.getType();
  value.checkTypes(this.markers,this);
  value.check(this.markers,this);
  if (this.hasErrors()) {
    return;
  }
  for (int i=0; i < DyvilCompiler.constantFolding; i++) {
    value=value.foldConstants();
  }
  value=value.cleanup(this,this);
  field.setValue(value);
  field.setType(type);
  field.setName(this.getFieldName(type));
  this.compileVariable(field);
  if (type != Types.VOID) {
    this.fields.put(field.getName(),field);
    System.out.println(field.toString());
  }
}
Program: 83005
Project: 83005
Buggy source:
private IValue typed(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IValue resolved=super.resolve(markers,context);
  this.resolved=true;
  IValue typed;
  if (resolved == this) {
    this.returnType=null;
    typed=super.withType(type,typeContext,markers,context);
  }
 else {
    typed=resolved.withType(type,typeContext,markers,context);
  }
  return typed;
}

Fixed version (ground truth):
private IValue typed(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IValue resolved=super.resolve(markers,context);
  this.resolved=true;
  IValue typed;
  if (resolved == this) {
    this.returnType=null;
    typed=super.withType(type,typeContext,markers,context);
  }
 else {
    typed=resolved.withType(type,typeContext,markers,context);
  }
  if (typed == null) {
    Util.createTypeError(markers,resolved,type,typeContext,"String_Node_Str");
    return resolved;
  }
  return typed;
}
Program: 83006
Project: 83006
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  dyvil.tools.asm.Label start=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label end=new dyvil.tools.asm.Label();
  writer.writeLabel(start);
  int count=writer.localCount();
  if (this.labels == null) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].writeStatement(writer);
    }
  }
 else {
    for (int i=0; i < this.valueCount; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables) {
    entry.getValue().writeLocal(writer,start,end);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  dyvil.tools.asm.Label start=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label end=new dyvil.tools.asm.Label();
  writer.writeLabel(start);
  int localCount=writer.localCount();
  if (this.labels == null) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].writeStatement(writer);
    }
  }
 else {
    for (int i=0; i < this.valueCount; i++) {
      Label label=this.labels[i];
      if (label != null) {
        writer.writeLabel(label.target);
      }
      this.values[i].writeStatement(writer);
    }
  }
  writer.resetLocals(localCount);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables) {
    entry.getValue().writeLocal(writer,start,end);
  }
}
Program: 83007
Project: 83007
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.valueCount <= 0) {
    return this;
  }
  IContext context1=new CombiningContext(this,context);
  int len=this.valueCount - 1;
  for (int i=0; i < len; i++) {
    IValue v1=this.values[i];
    IValue v2=v1.resolve(markers,context1);
    if (v1 != v2) {
      this.values[i]=v2;
    }
    if (v2.valueTag() == IValue.VARIABLE) {
      this.addVariable(v2);
    }
    v1=v2.withType(Types.VOID,Types.VOID,markers,context1);
    if (v1 == null) {
      Marker marker=I18n.createMarker(v2.getPosition(),"String_Node_Str");
      marker.addInfo(I18n.getString("String_Node_Str",v2.getType()));
      markers.add(marker);
    }
 else {
      this.values[i]=v1;
    }
  }
  this.values[len]=this.values[len].resolve(markers,context1);
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.valueCount <= 0) {
    return this;
  }
  IContext combinedContext=new CombiningContext(this,context);
  int len=this.valueCount - 1;
  for (int i=0; i < len; i++) {
    IValue resolved=this.values[i]=this.values[i].resolve(markers,combinedContext);
    if (resolved.valueTag() == IValue.VARIABLE) {
      this.addVariable(resolved);
    }
    IValue typed=resolved.withType(Types.VOID,Types.VOID,markers,combinedContext);
    if (typed == null) {
      Marker marker=I18n.createMarker(resolved.getPosition(),"String_Node_Str");
      marker.addInfo(I18n.getString("String_Node_Str",resolved.getType()));
      markers.add(marker);
    }
 else {
      this.values[i]=typed;
    }
  }
  this.values[len]=this.values[len].resolve(markers,combinedContext);
  return this;
}
Program: 83008
Project: 83008
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.valueCount > 0) {
    IValue v=this.values[this.valueCount - 1].withType(type,typeContext,markers,new CombiningContext(this,context));
    if (v != null) {
      this.values[this.valueCount - 1]=v;
      this.returnType=v.getType();
      return this;
    }
  }
  return type == Types.VOID ? this : null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.valueCount > 0) {
    IValue typed=this.values[this.valueCount - 1].withType(type,typeContext,markers,new CombiningContext(this,context));
    if (typed != null) {
      this.values[this.valueCount - 1]=typed;
      this.returnType=typed.getType();
      return this;
    }
  }
  return type == Types.VOID ? this : null;
}
Program: 83009
Project: 83009
Buggy source:
protected void addVariable(IValue value){
  if (this.variables == null) {
    this.variables=new IdentityHashMap();
  }
  Variable var=((FieldInitializer)value).variable;
  this.variables.put(var.getName(),var);
}

Fixed version (ground truth):
protected void addVariable(IValue value){
  if (this.variables == null) {
    this.variables=new IdentityHashMap<>();
  }
  Variable var=((FieldInitializer)value).variable;
  this.variables.put(var.getName(),var);
}
Program: 83010
Project: 83010
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  int len=this.valueCount - 1;
  if (len < 0) {
    return;
  }
  dyvil.tools.asm.Label start=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label end=new dyvil.tools.asm.Label();
  writer.writeLabel(start);
  int count=writer.localCount();
  if (this.labels == null) {
    for (int i=0; i < len; i++) {
      this.values[i].writeStatement(writer);
    }
    this.values[len].writeExpression(writer,this.returnType);
  }
 else {
    for (int i=0; i < len; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
    Label l=this.labels[len];
    if (l != null) {
      writer.writeLabel(l.target);
    }
    this.values[len].writeExpression(writer);
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables) {
    Variable var=entry.getValue();
    var.writeLocal(writer,start,end);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  int statementCount=this.valueCount - 1;
  if (statementCount < 0) {
    return;
  }
  dyvil.tools.asm.Label start=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label end=new dyvil.tools.asm.Label();
  writer.writeLabel(start);
  int localCount=writer.localCount();
  if (this.labels == null) {
    for (int i=0; i < statementCount; i++) {
      this.values[i].writeStatement(writer);
    }
    this.values[statementCount].writeExpression(writer,this.returnType);
  }
 else {
    for (int i=0; i < statementCount; i++) {
      Label label=this.labels[i];
      if (label != null) {
        writer.writeLabel(label.target);
      }
      this.values[i].writeStatement(writer);
    }
    Label label=this.labels[statementCount];
    if (label != null) {
      writer.writeLabel(label.target);
    }
    this.values[statementCount].writeExpression(writer);
  }
  writer.resetLocals(localCount);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables) {
    Variable var=entry.getValue();
    var.writeLocal(writer,start,end);
  }
}
Program: 83011
Project: 83011
Buggy source:
@Override public Iterator<IValue> iterator(){
  return new ArrayIterator(this.values,this.valueCount);
}

Fixed version (ground truth):
@Override public Iterator<IValue> iterator(){
  return new ArrayIterator<>(this.values,this.valueCount);
}
Program: 83012
Project: 83012
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  IContext context1=this.variables == null ? context : new CombiningContext(this,context);
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].checkTypes(markers,context1);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  IContext combinedContext=this.variables == null ? context : new CombiningContext(this,context);
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].checkTypes(markers,combinedContext);
  }
}
Program: 83013
Project: 83013
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.valueCount == 0) {
    buffer.append(Formatting.Expression.emptyExpression);
    return;
  }
  buffer.append('\n').append(prefix).append('{').append('\n');
  String prefix1=prefix + Formatting.Method.indent;
  ICodePosition prevPos=null;
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    buffer.append(prefix1);
    if (prevPos != null) {
      ICodePosition pos=value.getPosition();
      if (pos != null && pos.startLine() - prevPos.endLine() > 1) {
        buffer.append('\n').append(prefix1);
      }
      prevPos=pos;
    }
    if (this.labels != null) {
      Label l=this.labels[i];
      if (l != null) {
        buffer.append(l.name).append(Formatting.Expression.labelSeperator);
      }
    }
    value.toString(prefix1,buffer);
    buffer.append("String_Node_Str");
  }
  buffer.append(prefix).append('}');
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.valueCount == 0) {
    buffer.append(Formatting.Expression.emptyExpression);
    return;
  }
  buffer.append('\n').append(prefix).append('{').append('\n');
  String indentedPrefix=prefix + Formatting.Method.indent;
  int prevLine=0;
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    ICodePosition pos=value.getPosition();
    buffer.append(indentedPrefix);
    if (pos != null) {
      if (pos.startLine() - prevLine > 1) {
        buffer.append('\n').append(indentedPrefix);
      }
      prevLine=pos.endLine();
    }
    if (this.labels != null) {
      Label l=this.labels[i];
      if (l != null) {
        buffer.append(l.name).append(Formatting.Expression.labelSeperator);
      }
    }
    value.toString(indentedPrefix,buffer);
    buffer.append("String_Node_Str");
  }
  buffer.append(prefix).append('}');
}
Program: 83014
Project: 83014
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context,boolean using){
  if (this.parent != null) {
    this.parent.resolveTypes(markers,context,false);
    context=this.parent.getContext();
  }
  for (int i=0; i < this.importCount; i++) {
    this.imports[i].resolveTypes(markers,context,using);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context,boolean using){
  if (this.parent != null) {
    this.parent.resolveTypes(markers,context,false);
    context=this.parent.getContext();
    if (context == null) {
      return;
    }
  }
  for (int i=0; i < this.importCount; i++) {
    this.imports[i].resolveTypes(markers,context,using);
  }
}
Program: 83015
Project: 83015
Buggy source:
@Override public void getMethodMatches(MethodMatchList list,IValue instance,Name name,IArguments arguments){
  this.context.getMethodMatches(list,instance,name,arguments);
}

Fixed version (ground truth):
@Override public void getMethodMatches(MethodMatchList list,IValue instance,Name name,IArguments arguments){
  if (this.context == null) {
    return;
  }
  this.context.getMethodMatches(list,instance,name,arguments);
}
Program: 83016
Project: 83016
Buggy source:
@Override public IClass resolveClass(Name name){
  return this.context.resolveClass(name);
}

Fixed version (ground truth):
@Override public IClass resolveClass(Name name){
  if (this.context == null) {
    return null;
  }
  return this.context.resolveClass(name);
}
Program: 83017
Project: 83017
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context,boolean using){
  if (this.parent != null) {
    this.parent.resolveTypes(markers,context,false);
    context=this.parent.getContext();
  }
  if (using) {
    if (!(context instanceof IClass)) {
      markers.add(I18n.createMarker(this.position,"String_Node_Str"));
      return;
    }
    this.context=context;
    return;
  }
  if (!(context instanceof Package)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str"));
    return;
  }
  this.context=context;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context,boolean using){
  if (this.parent != null) {
    this.parent.resolveTypes(markers,context,false);
    context=this.parent.getContext();
    if (context == null) {
      return;
    }
  }
  if (using) {
    if (!(context instanceof IClass)) {
      markers.add(I18n.createMarker(this.position,"String_Node_Str"));
      return;
    }
    this.context=context;
    return;
  }
  if (!(context instanceof Package)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str"));
    return;
  }
  this.context=context;
}
Program: 83018
Project: 83018
Buggy source:
@Override public Package resolvePackage(Name name){
  return this.context.resolvePackage(name);
}

Fixed version (ground truth):
@Override public Package resolvePackage(Name name){
  if (this.context == null) {
    return null;
  }
  return this.context.resolvePackage(name);
}
Program: 83019
Project: 83019
Buggy source:
@Override public IDataMember resolveField(Name name){
  return this.context.resolveField(name);
}

Fixed version (ground truth):
@Override public IDataMember resolveField(Name name){
  if (this.context == null) {
    return null;
  }
  return this.context.resolveField(name);
}
Program: 83020
Project: 83020
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IMethod method=this.method;
  if (method == null) {
    method=IContext.resolveMethod(type,null,this.methodName,this.arguments);
    if (method == null) {
      StringBuilder builder=new StringBuilder();
      this.arguments.typesToString(builder);
      markers.add(I18n.createMarker(this.literal.getPosition(),"String_Node_Str",this.literal.getType(),type,builder));
      this.type=type;
      return null;
    }
    this.method=method;
  }
  GenericData data=method.getGenericData(null,null,this.arguments);
  method.checkArguments(markers,this.literal.getPosition(),context,null,this.arguments,data);
  this.type=method.getType().getConcreteType(data);
  if (!type.isSuperTypeOf(this.type)) {
    Marker m=I18n.createMarker(this.literal.getPosition(),"String_Node_Str");
    m.addInfo("String_Node_Str" + type.getConcreteType(typeContext));
    m.addInfo("String_Node_Str" + this.type);
    StringBuilder sb=new StringBuilder("String_Node_Str");
    Util.methodSignatureToString(method,sb);
    m.addInfo(sb.toString());
    markers.add(m);
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IMethod method=this.method;
  if (method == null) {
    method=IContext.resolveMethod(type,null,this.methodName,this.arguments);
    if (method == null) {
      StringBuilder builder=new StringBuilder();
      this.arguments.typesToString(builder);
      markers.add(I18n.createMarker(this.literal.getPosition(),"String_Node_Str",this.literal.getType(),type,builder));
      this.type=type;
      return null;
    }
    this.method=method;
  }
  GenericData data=method.getGenericData(null,null,this.arguments);
  method.checkArguments(markers,this.literal.getPosition(),context,null,this.arguments,data);
  this.type=method.getType().getConcreteType(data);
  IType concrete=type.getConcreteType(typeContext);
  if (!concrete.isSuperTypeOf(this.type)) {
    Marker m=I18n.createMarker(this.literal.getPosition(),"String_Node_Str");
    m.addInfo("String_Node_Str" + concrete);
    m.addInfo("String_Node_Str" + this.type);
    StringBuilder sb=new StringBuilder("String_Node_Str");
    Util.methodSignatureToString(method,sb);
    m.addInfo(sb.toString());
    markers.add(m);
  }
  return this;
}
Program: 83022
Project: 83022
Buggy source:
private void checkTypeVarsInferred(MarkerList markers,ICodePosition position,ITypeContext typeContext){
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable typeVar=this.generics[i];
    IType type=typeContext.resolveType(typeVar);
    if (type == null || type.typeTag() == IType.TYPE_VAR_TYPE && ((TypeVarType)type).typeVar == typeVar) {
      markers.add(I18n.createMarker(position,"String_Node_Str",this.name,typeVar.getName()));
      typeContext.addMapping(typeVar,Types.ANY);
    }
  }
}

Fixed version (ground truth):
private void checkTypeVarsInferred(MarkerList markers,ICodePosition position,ITypeContext typeContext){
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable typeVar=this.generics[i];
    IType type=typeContext.resolveType(typeVar);
    if (type == null || type.typeTag() == IType.TYPE_VAR_TYPE && ((TypeVarType)type).getTypeVariable() == typeVar) {
      markers.add(I18n.createMarker(position,"String_Node_Str",this.name,typeVar.getName()));
      typeContext.addMapping(typeVar,Types.ANY);
    }
  }
}
Program: 83024
Project: 83024
Buggy source:
private void checkOverride(MarkerList markers,IContext context){
  if (this.overrideMethods == null) {
    if ((this.modifiers & Modifiers.OVERRIDE) != 0) {
      markers.add(I18n.createMarker(this.position,"String_Node_Str",this.name));
    }
    return;
  }
  if ((this.modifiers & Modifiers.OVERRIDE) == 0) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",this.name));
  }
  for (  IMethod m : this.overrideMethods) {
    if (m.hasModifier(Modifiers.FINAL)) {
      markers.add(I18n.createMarker(this.position,"String_Node_Str",this.name));
    }
    IType type=m.getType();
    if (type != this.type && !type.isSuperTypeOf(this.type)) {
      Marker marker=I18n.createMarker(this.position,"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + type);
      markers.add(marker);
    }
  }
}

Fixed version (ground truth):
private void checkOverride(MarkerList markers,IContext context){
  if (this.overrideMethods == null) {
    if ((this.modifiers & Modifiers.OVERRIDE) != 0) {
      markers.add(I18n.createMarker(this.position,"String_Node_Str",this.name));
    }
    return;
  }
  if ((this.modifiers & Modifiers.OVERRIDE) == 0) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",this.name));
  }
  for (  IMethod m : this.overrideMethods) {
    if (m.hasModifier(Modifiers.FINAL)) {
      markers.add(I18n.createMarker(this.position,"String_Node_Str",this.name));
    }
    IType type=m.getType().getConcreteType(this.theClass.getType());
    if (type != this.type && !type.isSuperTypeOf(this.type)) {
      Marker marker=I18n.createMarker(this.position,"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + type);
      markers.add(marker);
    }
  }
}
Program: 83025
Project: 83025
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IContext context1=new CombiningContext(this,context);
  if (type.typeTag() == IType.LAMBDA) {
    LambdaType lt=(LambdaType)type;
    IType returnType=lt.getType();
    int parameterCount=lt.typeCount();
switch (parameterCount) {
case 0:
      super.resolve(markers,context1);
    this.resolved=true;
  return lt.wrapLambda(super.withType(returnType,typeContext,markers,context1),typeContext);
case 1:
this.implicitParameter=new MethodParameter(Names.$it,lt.getType(0));
super.resolve(markers,context1);
this.resolved=true;
IValue self=super.withType(returnType,typeContext,markers,context1);
if (self == null) {
return null;
}
returnType=this.getType();
LambdaExpression le=new LambdaExpression(null,this.implicitParameter);
le.setType(type);
le.setReturnType(returnType);
le.setMethod(lt.getFunctionalMethod());
le.setValue(self);
le.inferReturnType(type,typeContext,returnType);
return le;
}
return null;
}
super.resolve(markers,context1);
this.resolved=true;
return super.withType(type,typeContext,markers,context1);
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.resolved) {
    return this;
  }
  IContext context1=new CombiningContext(this,context);
  if (type.typeTag() == IType.LAMBDA) {
    LambdaType lt=(LambdaType)type;
    IType returnType=lt.getType();
    int parameterCount=lt.typeCount();
switch (parameterCount) {
case 0:
{
        IValue resolved=super.resolve(markers,context1);
        this.resolved=true;
        IValue typed;
        if (resolved == this) {
          typed=super.withType(returnType,typeContext,markers,context1);
        }
 else {
          typed=resolved.withType(returnType,typeContext,markers,context1);
        }
        return lt.wrapLambda(typed,typeContext);
      }
case 1:
{
      this.implicitParameter=new MethodParameter(Names.$it,lt.getType(0));
      IValue resolved=super.resolve(markers,context1);
      this.resolved=true;
      IValue typed=resolved.withType(returnType,typeContext,markers,context1);
      if (typed == null) {
        return null;
      }
      returnType=typed.getType();
      LambdaExpression le=new LambdaExpression(null,this.implicitParameter);
      le.setType(type);
      le.setReturnType(returnType);
      le.setMethod(lt.getFunctionalMethod());
      le.setValue(typed);
      le.inferReturnType(type,typeContext,returnType);
      return le;
    }
}
return null;
}
super.resolve(markers,context1);
this.resolved=true;
return super.withType(type,typeContext,markers,context1);
}
Program: 83026
Project: 83026
Buggy source:
@Override public IValue convertValue(IValue value,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.parameterCount != 0 || IObjectType.super.isSuperTypeOf(value.getType())) {
    return value.withType(this,typeContext,markers,context);
  }
  IValue value1=value.withType(this.returnType.getConcreteType(typeContext),typeContext,markers,context);
  if (value1 != null) {
    return this.wrapLambda(value,typeContext);
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue convertValue(IValue value,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.parameterCount != 0 || value.isType(this)) {
    return value.withType(this,typeContext,markers,context);
  }
  IValue value1=value.withType(this.returnType.getConcreteType(typeContext),typeContext,markers,context);
  if (value1 != null) {
    return this.wrapLambda(value1,typeContext);
  }
  return null;
}
Program: 83027
Project: 83027
Buggy source:
public LambdaExpression wrapLambda(IValue value,ITypeContext typeContext){
  LambdaExpression le=new LambdaExpression(value.getPosition(),null,0);
  le.setMethod(this.getFunctionalMethod());
  le.setReturnType(this.returnType);
  le.setValue(value);
  le.setType(this);
  le.inferReturnType(this,typeContext,this.returnType);
  return le;
}

Fixed version (ground truth):
public LambdaExpression wrapLambda(IValue value,ITypeContext typeContext){
  IType returnType=value.getType();
  LambdaExpression le=new LambdaExpression(value.getPosition(),null,0);
  le.setMethod(this.getFunctionalMethod());
  le.setReturnType(returnType);
  le.setValue(value);
  le.setType(this);
  le.inferReturnType(this,typeContext,returnType);
  return le;
}
Program: 83028
Project: 83028
Buggy source:
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  if (this.parameterCount == 0 && this.returnType.isSuperTypeOf(concrete)) {
    this.returnType.inferTypes(concrete,typeContext);
    return;
  }
  ITypeVariable typeVar;
  IType concreteType;
  IClass iclass=this.getTheClass();
  for (int i=0; i < this.parameterCount; i++) {
    typeVar=iclass.getTypeVariable(i);
    concreteType=concrete.resolveType(typeVar);
    if (concreteType != null) {
      this.parameterTypes[i].inferTypes(concreteType,typeContext);
    }
  }
  typeVar=iclass.getTypeVariable(this.parameterCount);
  concreteType=concrete.resolveType(typeVar);
  if (concreteType != null) {
    this.returnType.inferTypes(concreteType,typeContext);
  }
}

Fixed version (ground truth):
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  boolean found=false;
  ITypeVariable typeVar;
  IType concreteType;
  IClass iclass=this.getTheClass();
  for (int i=0; i < this.parameterCount; i++) {
    typeVar=iclass.getTypeVariable(i);
    concreteType=concrete.resolveType(typeVar);
    if (concreteType != null) {
      this.parameterTypes[i].inferTypes(concreteType,typeContext);
      found=true;
    }
  }
  typeVar=iclass.getTypeVariable(this.parameterCount);
  concreteType=concrete.resolveType(typeVar);
  if (concreteType != null) {
    this.returnType.inferTypes(concreteType,typeContext);
    found=true;
  }
  if (!found && this.parameterCount == 0 && this.returnType.isSuperTypeOf(concrete)) {
    this.returnType.inferTypes(concrete,typeContext);
  }
}
Program: 83029
Project: 83029
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  FieldAccess access=(FieldAccess)this.instance;
  IDataMember f=access.field;
  if (this.writeIINC(writer,f)) {
    return;
  }
  IValue instance=access.instance;
  if (instance != null) {
    instance.writeExpression(writer);
    writer.writeInsn(Opcodes.AUTO_DUP);
  }
  int lineNumber=this.instance.getLineNumber();
  f.writeGet(writer,null,lineNumber);
  this.method.writeCall(writer,null,this.arguments,null,lineNumber);
  f.writeSet(writer,null,null,lineNumber);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  FieldAccess access=(FieldAccess)this.instance;
  IDataMember f=access.field;
  if (this.writeIINC(writer,f)) {
    return;
  }
  f.writeSet(writer,access.instance,new MethodCall(this.position,access,this.method,this.arguments),this.getLineNumber());
}
Program: 83030
Project: 83030
Buggy source:
private void writeBoolJump(int jump){
  Label label1=new Label();
  Label label2=new Label();
  this.mv.visitJumpInsn(jump,label1);
  this.mv.visitInsn(Opcodes.ICONST_0);
  this.mv.visitJumpInsn(Opcodes.GOTO,label2);
  this.mv.visitLabel(label1);
  this.frame.visitFrame(this.mv);
  this.mv.visitInsn(Opcodes.ICONST_1);
  this.mv.visitLabel(label2);
  this.frame.push(ClassFormat.BOOLEAN);
  this.frame.visitFrame(this.mv);
}

Fixed version (ground truth):
private void writeBoolJump(int jump) throws BytecodeException {
  Label label1=new Label();
  Label label2=new Label();
  this.writeJumpInsn(jump,label1);
  this.writeInsn(Opcodes.ICONST_0);
  this.writeJumpInsn(Opcodes.GOTO,label2);
  this.writeTargetLabel(label1);
  this.writeInsn(Opcodes.ICONST_1);
  this.writeTargetLabel(label2);
}
Program: 83032
Project: 83032
Buggy source:
@Intrinsic({LOAD_0,LOAD_1,IF_ICMPNE}) public boolean $bang$eq(boolean v){
  return this.value != v;
}

Fixed version (ground truth):
@Intrinsic({LOAD_0,LOAD_1,ICMPNE}) public boolean $bang$eq(boolean v){
  return this.value != v;
}
Program: 83033
Project: 83033
Buggy source:
@Intrinsic({LOAD_0,LOAD_1,IF_ICMPEQ}) public Boolean $lt$eq$gt(boolean v){
  return apply(v == this.value);
}

Fixed version (ground truth):
@Intrinsic({LOAD_0,LOAD_1,ICMPEQ}) public Boolean $lt$eq$gt(boolean v){
  return apply(v == this.value);
}
Program: 83034
Project: 83034
Buggy source:
@Intrinsic({LOAD_0,LOAD_1,IF_ICMPEQ}) public boolean $eq$eq(boolean v){
  return this.value == v;
}

Fixed version (ground truth):
@Intrinsic({LOAD_0,LOAD_1,ICMPEQ}) public boolean $eq$eq(boolean v){
  return this.value == v;
}
Program: 83035
Project: 83035
Buggy source:
@Intrinsic({LOAD_0,LOAD_1,BNOT}) public @prefix Boolean $bang(){
  return apply(!this.value);
}

Fixed version (ground truth):
@Intrinsic({LOAD_0,BNOT}) public @prefix Boolean $bang(){
  return apply(!this.value);
}
Program: 83036
Project: 83036
Buggy source:
@Override public void writeGet(MethodWriter writer,IValue instance,int lineNumber) throws BytecodeException {
  if (instance != null) {
    instance.writeExpression(writer,this.theClass.getType());
  }
  writer.writeFieldInsn(Opcodes.GETFIELD,this.theClass.getInternalName(),this.name.qualified,this.getDescription());
}

Fixed version (ground truth):
@Override public void writeGet(MethodWriter writer,IValue instance,int lineNumber) throws BytecodeException {
  if (instance != null) {
    instance.writeExpression(writer,this.theClass.getType());
  }
  if (this.theClass.hasModifier(Modifiers.ANNOTATION)) {
    StringBuilder desc=new StringBuilder("String_Node_Str");
    this.type.appendExtendedName(desc);
    writer.writeInvokeInsn(Opcodes.INVOKEINTERFACE,this.theClass.getInternalName(),this.name.qualified,desc.toString(),true);
  }
 else {
    writer.writeFieldInsn(Opcodes.GETFIELD,this.theClass.getInternalName(),this.name.qualified,this.getDescription());
  }
}
Program: 83037
Project: 83037
Buggy source:
@Override public IValue checkAssign(MarkerList markers,IContext context,ICodePosition position,IValue instance,IValue newValue){
  if (newValue != null && (this.modifiers & Modifiers.FINAL) != 0) {
    markers.add(I18n.createMarker(position,"String_Node_Str",this.name.unqualified));
  }
  IValue value1=newValue.withType(this.type,null,markers,context);
  if (value1 == null) {
    Marker marker=I18n.createMarker(newValue.getPosition(),"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + newValue.getType());
    markers.add(marker);
  }
 else {
    newValue=value1;
  }
  return newValue;
}

Fixed version (ground truth):
@Override public IValue checkAssign(MarkerList markers,IContext context,ICodePosition position,IValue instance,IValue newValue){
  if (this.theClass.hasModifier(Modifiers.ANNOTATION)) {
    markers.add(I18n.createError(position,"String_Node_Str",this.name.unqualified));
  }
 else   if (newValue != null && (this.modifiers & Modifiers.FINAL) != 0) {
    markers.add(I18n.createMarker(position,"String_Node_Str",this.name.unqualified));
  }
  IValue value1=newValue.withType(this.type,null,markers,context);
  if (value1 == null) {
    Marker marker=I18n.createMarker(newValue.getPosition(),"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + newValue.getType());
    markers.add(marker);
  }
 else {
    newValue=value1;
  }
  return newValue;
}
Program: 83039
Project: 83039
Buggy source:
@Override public boolean addRawAnnotation(String type,IAnnotation annotation){
switch (type) {
case "String_Node_Str":
    this.modifiers|=Modifiers.INLINE;
  return false;
case "String_Node_Str":
case "String_Node_Str":
this.modifiers|=Modifiers.INFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.EXTENSION;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.PREFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.INTERNAL;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.SEALED;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.NATIVE;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.STRICT;
return false;
case Deprecation.JAVA_INTERNAL:
case Deprecation.DYVIL_INTERNAL:
this.modifiers|=Modifiers.DEPRECATED;
return true;
case "String_Node_Str":
this.modifiers|=Modifiers.OVERRIDE;
return false;
case "String_Node_Str":
if (annotation != null) {
this.readIntrinsicAnnotation(annotation);
return false;
}
}
return true;
}

Fixed version (ground truth):
@Override public boolean addRawAnnotation(String type,IAnnotation annotation){
switch (type) {
case "String_Node_Str":
    this.modifiers|=Modifiers.INLINE;
  return false;
case "String_Node_Str":
case "String_Node_Str":
this.modifiers|=Modifiers.INFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.EXTENSION;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.PREFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.INTERNAL;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.SEALED;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.NATIVE;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.STRICT;
return false;
case Deprecation.JAVA_INTERNAL:
case Deprecation.DYVIL_INTERNAL:
this.modifiers|=Modifiers.DEPRECATED;
return true;
case "String_Node_Str":
this.modifiers|=Modifiers.OVERRIDE;
return false;
case "String_Node_Str":
if (annotation != null) {
this.readIntrinsicAnnotation(annotation);
return this.getClass() != ExternalMethod.class;
}
}
return true;
}
Program: 83042
Project: 83042
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  this.type.resolve(markers,context);
  this.arguments.resolve(markers,context);
  if (this.type.getTheClass().isInterface()) {
    this.constructor=IContext.resolveConstructor(Types.OBJECT_CLASS,this.arguments);
  }
 else {
    this.constructor=IContext.resolveConstructor(this.type,this.arguments);
  }
  if (this.constructor == null) {
    this.reportResolve(markers);
  }
  this.metadata=new AnonymousClassMetadata(this.nestedClass,this.constructor);
  this.nestedClass.setMetadata(this.metadata);
  this.nestedClass.setOuterClass(context.getThisClass());
  this.nestedClass.setHeader(context.getHeader());
  this.nestedClass.context=context;
  this.nestedClass.resolve(markers,context);
  this.nestedClass.context=null;
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  this.type.resolve(markers,context);
  this.arguments.resolve(markers,context);
  if (this.type.getTheClass().isInterface()) {
    this.constructor=IContext.resolveConstructor(Types.OBJECT_CLASS,this.arguments);
  }
 else {
    this.constructor=IContext.resolveConstructor(this.type,this.arguments);
  }
  if (this.constructor == null) {
    this.reportResolve(markers);
  }
  this.metadata=new AnonymousClassMetadata(this.nestedClass,this.constructor);
  this.nestedClass.setMetadata(this.metadata);
  this.nestedClass.setOuterClass(context.getThisClass());
  IDyvilHeader header=context.getHeader();
  this.nestedClass.setHeader(header);
  header.addInnerClass(this.nestedClass);
  this.nestedClass.context=context;
  this.nestedClass.resolve(markers,context);
  this.nestedClass.context=null;
  return this;
}
Program: 83043
Project: 83043
Buggy source:
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.arguments.cleanup(context,compilableList);
  this.nestedClass.getHeader().addInnerClass(this.nestedClass);
  this.nestedClass.cleanup(context,compilableList);
  return this;
}

Fixed version (ground truth):
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.arguments.cleanup(context,compilableList);
  this.nestedClass.cleanup(context,compilableList);
  return this;
}
Program: 83044
Project: 83044
Buggy source:
@Override public IValue foldConstants(){
  if (!this.arguments.isEmpty()) {
    if (this.instance != null) {
      if (this.instance.isConstant()) {
        IValue argument;
        if (this.arguments.size() == 1 && (argument=this.arguments.getFirstValue()).isConstant()) {
          IValue folded=ConstantFolder.apply(this.instance,this.name,argument);
          if (folded != null) {
            return folded;
          }
        }
      }
 else {
        this.instance=this.instance.foldConstants();
      }
    }
    this.arguments.foldConstants();
    return this;
  }
  if (this.instance.isConstant()) {
    IValue folded=ConstantFolder.apply(this.name,this.instance);
    if (folded != null) {
      return folded;
    }
  }
  if (this.instance != null) {
    this.instance=this.instance.foldConstants();
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue foldConstants(){
  if (!this.arguments.isEmpty()) {
    if (this.instance != null) {
      if (this.instance.isConstant()) {
        IValue argument;
        if (this.arguments.size() == 1 && (argument=this.arguments.getFirstValue()).isConstant()) {
          IValue folded=ConstantFolder.apply(this.instance,this.name,argument);
          if (folded != null) {
            return folded;
          }
        }
      }
 else {
        this.instance=this.instance.foldConstants();
      }
    }
    this.arguments.foldConstants();
    return this;
  }
  if (this.instance != null) {
    if (this.instance.isConstant()) {
      IValue folded=ConstantFolder.apply(this.name,this.instance);
      if (folded != null) {
        return folded;
      }
    }
    this.instance=this.instance.foldConstants();
  }
  return this;
}
Program: 83046
Project: 83046
Buggy source:
private void parseParameters(BuilderVisitor visitor){
  IToken token=this.tokens.lastReturned().next();
  while (this.tokens.hasNext()) {
    if (token.next().type() == BaseSymbols.COLON) {
      this.tokens.next();
      this.tokens.next();
      this.parseValue(visitor.visitParameter(token.nameValue()));
    }
 else {
      this.parseValue(visitor.visitParameter(null));
    }
    token=this.tokens.next();
switch (token.type()) {
case BaseSymbols.CLOSE_PARENTHESIS:
      visitor.visitEnd();
    return;
case BaseSymbols.COMMA:
case BaseSymbols.SEMICOLON:
  token=token.next();
continue;
}
}
}

Fixed version (ground truth):
private void parseParameters(BuilderVisitor visitor){
  IToken token=this.tokens.lastReturned().next();
  if (token.type() == BaseSymbols.CLOSE_PARENTHESIS) {
    this.tokens.next();
    visitor.visitEnd();
    return;
  }
  while (this.tokens.hasNext()) {
    if (token.next().type() == BaseSymbols.COLON) {
      this.tokens.next();
      this.tokens.next();
      this.parseValue(visitor.visitParameter(token.nameValue()));
    }
 else {
      this.parseValue(visitor.visitParameter(null));
    }
    token=this.tokens.next();
switch (token.type()) {
case BaseSymbols.CLOSE_PARENTHESIS:
      visitor.visitEnd();
    return;
case BaseSymbols.COMMA:
case BaseSymbols.SEMICOLON:
  token=token.next();
continue;
}
}
}
Program: 83047
Project: 83047
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(this.name);
  int parameterCount=this.parameters.size();
  if (parameterCount > 0) {
    buffer.append('(');
    this.parameters.get(0).toString(prefix,buffer);
    for (int i=1; i < parameterCount; i++) {
      buffer.append("String_Node_Str");
      this.parameters.get(i).toString(prefix,buffer);
    }
    buffer.append(')');
  }
  buffer.append("String_Node_Str");
  this.node.bodyToString(prefix + '\t',buffer);
  buffer.append(prefix).append('}');
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(this.name);
  int parameterCount=this.parameters.size();
  if (parameterCount > 0) {
    buffer.append('(');
    this.parameters.get(0).toString(prefix,buffer);
    for (int i=1; i < parameterCount; i++) {
      buffer.append("String_Node_Str");
      this.parameters.get(i).toString(prefix,buffer);
    }
    buffer.append(')');
  }
 else   if (this.node == null) {
    buffer.append("String_Node_Str");
    return;
  }
  if (this.node != null) {
    buffer.append("String_Node_Str");
    this.node.bodyToString(prefix + '\t',buffer);
    buffer.append(prefix).append('}');
  }
}
Program: 83048
Project: 83048
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.value == null) {
    buffer.append("String_Node_Str");
    return;
  }
  Class c=this.value.getClass();
  if (c.isArray()) {
    ObjectArray.toString(this.value,buffer);
    return;
  }
  String s=this.value.toString();
  int i=s.indexOf('@');
  if (i >= 0) {
    String className=c.getName();
    if (i == className.length() && s.regionMatches(0,className,0,i)) {
      StringUtils.prettyPrint(this.value,c,buffer,true);
      return;
    }
  }
  buffer.append(this.value);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.value == null) {
    buffer.append("String_Node_Str");
    return;
  }
  Class c=this.value.getClass();
  if (c.isArray()) {
    ObjectArray.toString(this.value,buffer);
    return;
  }
  String snapshot=buffer.toString();
  try {
    String s=this.value.toString();
    int i=s.indexOf('@');
    if (i >= 0) {
      String className=c.getName();
      if (i == className.length() && s.regionMatches(0,className,0,i)) {
        StringUtils.prettyPrint(this.value,c,buffer,true);
        return;
      }
    }
    buffer.append(this.value);
  }
 catch (  Throwable t) {
    buffer.replace(0,buffer.length(),snapshot);
    buffer.append("String_Node_Str");
  }
}