nus-yam/ex-repair huggingface dataset:
Program: 84321
Project: 84321
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: 84323
Project: 84323
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: 84324
Project: 84324
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: 84325
Project: 84325
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: 84326
Project: 84326
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: 84327
Project: 84327
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: 84328
Project: 84328
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: 84329
Project: 84329
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: 84331
Project: 84331
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: 84332
Project: 84332
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: 84333
Project: 84333
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: 84334
Project: 84334
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: 84335
Project: 84335
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: 84336
Project: 84336
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: 84338
Project: 84338
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: 84341
Project: 84341
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: 84342
Project: 84342
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: 84343
Project: 84343
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: 84345
Project: 84345
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: 84346
Project: 84346
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: 84347
Project: 84347
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");
  }
}
Program: 84348
Project: 84348
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  this.type.check(markers,context);
  this.value.check(markers,context);
  if (this.type.isPrimitive()) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str"));
    return;
  }
  if (this.value.isPrimitive()) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str"));
    return;
  }
  IType valueType=this.value.getType();
  if (valueType.classEquals(this.type)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",valueType));
    return;
  }
  if (this.type.isSuperClassOf(valueType)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",valueType,this.type));
    return;
  }
  if (!valueType.isSuperClassOf(this.type)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",valueType,this.type));
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  this.type.check(markers,context);
  this.value.check(markers,context);
  if (this.type.isPrimitive()) {
    markers.add(I18n.createError(this.position,"String_Node_Str"));
    return;
  }
  if (this.value.isPrimitive()) {
    markers.add(I18n.createError(this.position,"String_Node_Str"));
    return;
  }
  IType valueType=this.value.getType();
  if (valueType.classEquals(this.type)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",valueType));
    return;
  }
  if (this.type.isSuperClassOf(valueType)) {
    markers.add(I18n.createMarker(this.position,"String_Node_Str",valueType,this.type));
    return;
  }
  if (!valueType.isSuperClassOf(this.type)) {
    markers.add(I18n.createError(this.position,"String_Node_Str",valueType,this.type));
  }
}
Program: 84349
Project: 84349
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  dyvil.tools.asm.Label elseStart=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label elseEnd=new dyvil.tools.asm.Label();
  Object commonFrameType=this.commonType.getFrameType();
  this.condition.writeInvJump(writer,elseStart);
  this.then.writeExpression(writer,this.commonType);
  writer.getFrame().set(commonFrameType);
  writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
  writer.writeTargetLabel(elseStart);
  if (this.elseThen == null) {
    this.commonType.writeDefaultValue(writer);
  }
 else {
    this.elseThen.writeExpression(writer,this.commonType);
  }
  writer.getFrame().set(commonFrameType);
  writer.writeTargetLabel(elseEnd);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  dyvil.tools.asm.Label elseStart=new dyvil.tools.asm.Label();
  dyvil.tools.asm.Label elseEnd=new dyvil.tools.asm.Label();
  Object commonFrameType=this.commonType.getFrameType();
  this.condition.writeInvJump(writer,elseStart);
  this.then.writeExpression(writer,this.commonType);
  if (!writer.hasReturn()) {
    writer.getFrame().set(commonFrameType);
    writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
  }
  writer.writeTargetLabel(elseStart);
  if (this.elseThen == null) {
    this.commonType.writeDefaultValue(writer);
  }
 else {
    this.elseThen.writeExpression(writer,this.commonType);
  }
  if (!writer.hasReturn()) {
    writer.getFrame().set(commonFrameType);
  }
  writer.writeTargetLabel(elseEnd);
}
Program: 84351
Project: 84351
Buggy source:
@Override public void end(IType type){
  IClass iclass=type.getTheClass();
  if (iclass != null) {
    iclass.writeInnerClassInfo(this.cw);
  }
  if (!this.hasReturn) {
    this.insnCallback();
    this.mv.visitInsn(type.getReturnOpcode());
  }
  this.mv.visitMaxs(this.frame.maxStack,this.frame.maxLocals);
  this.mv.visitEnd();
}

Fixed version (ground truth):
@Override public void end(IType type){
  IClass iclass=type.getTheClass();
  if (iclass != null) {
    iclass.writeInnerClassInfo(this.cw);
  }
  if (!this.hasReturn) {
    int opcode=type.getReturnOpcode();
    if (opcode == RETURN || this.frame.actualStackCount > 0) {
      this.insnCallback();
      this.mv.visitInsn(opcode);
    }
  }
  this.mv.visitMaxs(this.frame.maxStack,this.frame.maxLocals);
  this.mv.visitEnd();
}
Program: 84353
Project: 84353
Buggy source:
@Override public IMethod getFunctionalMethod(){
  if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    return null;
  }
  IMethod m;
  if (this.body != null) {
    m=this.body.getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  if (this.superType != null) {
    m=this.superType.getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    m=this.interfaces[i].getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMethod getFunctionalMethod(){
  if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    return null;
  }
  if (this.body != null) {
    IMethod m=this.body.getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  return null;
}
Program: 84354
Project: 84354
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.method == null) {
    IType type=this.getType();
    this.withType(type,type,markers,context);
  }
  this.value.checkTypes(markers,new CombiningContext(this,context));
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  this.value.checkTypes(markers,new CombiningContext(this,context));
}
Program: 84355
Project: 84355
Buggy source:
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.value=this.value.cleanup(context,compilableList);
  if (this.capturedFieldCount == 0) {
    if (this.value instanceof AbstractCall && this.value.valueTag() != COMPOUND_CALL) {
      AbstractCall c=(AbstractCall)this.value;
      IMethod method=c.getMethod();
      if (this.checkCall(c.getValue(),c.getArguments(),method)) {
switch (method.getInvokeOpcode()) {
case Opcodes.INVOKEVIRTUAL:
          this.directInvokeOpcode=ClassFormat.H_INVOKEVIRTUAL;
        break;
case Opcodes.INVOKESTATIC:
      this.directInvokeOpcode=ClassFormat.H_INVOKESTATIC;
    break;
case Opcodes.INVOKEINTERFACE:
  this.directInvokeOpcode=ClassFormat.H_INVOKEINTERFACE;
break;
case Opcodes.INVOKESPECIAL:
this.directInvokeOpcode=ClassFormat.H_INVOKESPECIAL;
break;
}
this.name=method.getName().qualified;
this.owner=method.getTheClass().getInternalName();
this.lambdaDesc=method.getDescriptor();
return this;
}
}
 else if (this.value.getClass() == ConstructorCall.class) {
ConstructorCall c=(ConstructorCall)this.value;
IConstructor ctor=c.getConstructor();
if (this.checkCall(null,c.getArguments(),ctor)) {
this.directInvokeOpcode=ClassFormat.H_NEWINVOKESPECIAL;
this.name="String_Node_Str";
this.owner=ctor.getTheClass().getInternalName();
this.lambdaDesc=ctor.getDescriptor();
return this;
}
}
}
compilableList.addCompilable(this);
return this;
}

Fixed version (ground truth):
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.value=this.value.cleanup(context,compilableList);
  if (this.capturedFieldCount == 0) {
    if (this.value instanceof AbstractCall && this.value.valueTag() != COMPOUND_CALL) {
      AbstractCall c=(AbstractCall)this.value;
      IMethod method=c.getMethod();
      if (method != null && this.checkCall(c.getValue(),c.getArguments(),method)) {
switch (method.getInvokeOpcode()) {
case Opcodes.INVOKEVIRTUAL:
          this.directInvokeOpcode=ClassFormat.H_INVOKEVIRTUAL;
        break;
case Opcodes.INVOKESTATIC:
      this.directInvokeOpcode=ClassFormat.H_INVOKESTATIC;
    break;
case Opcodes.INVOKEINTERFACE:
  this.directInvokeOpcode=ClassFormat.H_INVOKEINTERFACE;
break;
case Opcodes.INVOKESPECIAL:
this.directInvokeOpcode=ClassFormat.H_INVOKESPECIAL;
break;
}
this.name=method.getName().qualified;
this.owner=method.getTheClass().getInternalName();
this.lambdaDesc=method.getDescriptor();
return this;
}
}
 else if (this.value.getClass() == ConstructorCall.class) {
ConstructorCall c=(ConstructorCall)this.value;
IConstructor ctor=c.getConstructor();
if (this.checkCall(null,c.getArguments(),ctor)) {
this.directInvokeOpcode=ClassFormat.H_NEWINVOKESPECIAL;
this.name="String_Node_Str";
this.owner=ctor.getTheClass().getInternalName();
this.lambdaDesc=ctor.getDescriptor();
return this;
}
}
}
compilableList.addCompilable(this);
return this;
}
Program: 84356
Project: 84356
Buggy source:
@Override public IMethod getFunctionalMethod(){
  if ((this.modifiers & Modifiers.ABSTRACT | Modifiers.INTERFACE_CLASS) == 0) {
    return null;
  }
  if (!this.genericsResolved) {
    this.resolveGenerics();
  }
  IMethod m;
  if (this.body != null) {
    m=this.body.getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  if (!this.superTypesResolved) {
    this.resolveSuperTypes();
  }
  if (this.superType != null) {
    m=this.superType.getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    m=this.interfaces[i].getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMethod getFunctionalMethod(){
  if ((this.modifiers & Modifiers.ABSTRACT | Modifiers.INTERFACE_CLASS) == 0) {
    return null;
  }
  if (!this.genericsResolved) {
    this.resolveGenerics();
  }
  if (this.body != null) {
    IMethod m=this.body.getFunctionalMethod();
    if (m != null) {
      return m;
    }
  }
  return null;
}
Program: 84357
Project: 84357
Buggy source:
@Override public void visitParameter(String name,int index){
  this.method.getParameter_(index).setName(Name.getQualified(name));
}

Fixed version (ground truth):
@Override public void visitParameter(String name,int modifiers){
  this.method.getParameter_(this.parameterIndex++).setName(Name.getQualified(name));
}
Program: 84359
Project: 84359
Buggy source:
private IValue makeForStatement(){
  if (this.forEach) {
    return new ForEachStatement(this.position,this.variable,this.action);
  }
  return new ForStatement(this.position,this.variable,this.condition,this.update,this.action);
}

Fixed version (ground truth):
private IValue makeForStatement(){
  if (this.variable != null && this.variable.getType() == null) {
    this.variable=null;
  }
  if (this.forEach) {
    return new ForEachStatement(this.position,this.variable,this.action);
  }
  return new ForStatement(this.position,this.variable,this.condition,this.update,this.action);
}
Program: 84360
Project: 84360
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  this.writeExpression(writer);
  writer.writeInsn(Opcodes.ARETURN);
}
Program: 84361
Project: 84361
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  return type == Types.VOID ? this : null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.isType(type)) {
    return this;
  }
  return null;
}
Program: 84362
Project: 84362
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  writer.writeInsn(Opcodes.ACONST_NULL);
}
Program: 84363
Project: 84363
Buggy source:
@Override public IType getType(){
  return Types.VOID;
}

Fixed version (ground truth):
@Override public IType getType(){
  return this.annotation.getType();
}
Program: 84364
Project: 84364
Buggy source:
@Override public void parse(IParserManager pm,IToken token){
  int type=token.type();
switch (this.mode) {
case NAME:
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.setType(new NamedType(token.raw(),name));
      this.mode=PARAMETERS_START;
      return;
    }
  pm.report(token,"String_Node_Str");
return;
case PARAMETERS_START:
if (type == Symbols.OPEN_PARENTHESIS) {
IToken next=token.next();
if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Symbols.COLON) {
  ArgumentMap map=new ArgumentMap();
  this.annotation.setArguments(map);
  pm.pushParser(new ExpressionMapParser(map));
}
 else {
  ArgumentList list=new ArgumentList();
  this.annotation.setArguments(list);
  pm.pushParser(new ExpressionListParser(list));
}
this.mode=PARAMETERS_END;
return;
}
pm.popParser(true);
return;
case PARAMETERS_END:
if (type == Symbols.CLOSE_PARENTHESIS) {
pm.popParser();
return;
}
pm.report(token,"String_Node_Str");
return;
}
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token){
  int type=token.type();
switch (this.mode) {
case NAME:
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      ICodePosition position=token.raw();
      this.annotation.setPosition(position);
      this.annotation.setType(new NamedType(position,name));
      this.mode=PARAMETERS_START;
      return;
    }
  pm.report(token,"String_Node_Str");
return;
case PARAMETERS_START:
if (type == Symbols.OPEN_PARENTHESIS) {
IToken next=token.next();
if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Symbols.COLON) {
  ArgumentMap map=new ArgumentMap();
  this.annotation.setArguments(map);
  pm.pushParser(new ExpressionMapParser(map));
}
 else {
  ArgumentList list=new ArgumentList();
  this.annotation.setArguments(list);
  pm.pushParser(new ExpressionListParser(list));
}
this.mode=PARAMETERS_END;
return;
}
pm.popParser(true);
return;
case PARAMETERS_END:
if (type == Symbols.CLOSE_PARENTHESIS) {
pm.popParser();
return;
}
pm.report(token,"String_Node_Str");
return;
}
}
Program: 84365
Project: 84365
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Class.bodyStart).append('\n');
  String prefix1=prefix + Formatting.Class.bodyIndent;
  if (this.classCount > 0) {
    for (int i=0; i < this.classCount; i++) {
      this.classes[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.classCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.fieldCount > 0) {
    for (int i=0; i < this.fieldCount; i++) {
      this.fields[i].toString(prefix1,buffer);
      buffer.append('\n');
    }
    buffer.append('\n');
  }
  if (this.constructorCount > 0) {
    for (int i=0; i < this.constructorCount; i++) {
      this.constructors[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.constructorCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.propertyCount > 0) {
    for (int i=0; i < this.propertyCount; i++) {
      this.properties[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.propertyCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.methodCount > 0) {
    for (int i=0; i < this.methodCount; i++) {
      IMethod method=this.methods[i];
      method.toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.methodCount) {
        buffer.append('\n');
      }
    }
  }
  buffer.append(prefix).append(Formatting.Class.bodyEnd);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Class.bodyStart).append('\n');
  String prefix1=prefix + Formatting.Class.bodyIndent;
  if (this.classCount > 0) {
    for (int i=0; i < this.classCount; i++) {
      this.classes[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.classCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.fieldCount > 0) {
    for (int i=0; i < this.fieldCount; i++) {
      this.fields[i].toString(prefix1,buffer);
      buffer.append(';').append('\n');
    }
    buffer.append('\n');
  }
  if (this.constructorCount > 0) {
    for (int i=0; i < this.constructorCount; i++) {
      this.constructors[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.constructorCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.propertyCount > 0) {
    for (int i=0; i < this.propertyCount; i++) {
      this.properties[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.propertyCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.methodCount > 0) {
    for (int i=0; i < this.methodCount; i++) {
      IMethod method=this.methods[i];
      method.toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.methodCount) {
        buffer.append('\n');
      }
    }
  }
  buffer.append(prefix).append(Formatting.Class.bodyEnd);
}
Program: 84366
Project: 84366
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  super.toString(prefix,buffer);
  buffer.append(ModifierTypes.FIELD.toString(this.modifiers));
  this.type.toString("String_Node_Str",buffer);
  buffer.append(' ');
  buffer.append(this.name);
  if (this.value != null) {
    buffer.append(Formatting.Field.keyValueSeperator);
    this.value.toString(prefix,buffer);
  }
  buffer.append(';');
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  super.toString(prefix,buffer);
  buffer.append(ModifierTypes.FIELD.toString(this.modifiers));
  this.type.toString("String_Node_Str",buffer);
  buffer.append(' ');
  buffer.append(this.name);
  if (this.value != null) {
    buffer.append(Formatting.Field.keyValueSeperator);
    this.value.toString(prefix,buffer);
  }
}
Program: 84367
Project: 84367
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  super.toString(prefix,buffer);
  buffer.append(ModifierTypes.METHOD.toString(this.modifiers));
  if (this.type != null) {
    this.type.toString("String_Node_Str",buffer);
    buffer.append(' ');
  }
  buffer.append(this.name);
  if (this.genericCount > 0) {
    buffer.append('[');
    Util.astToString(prefix,this.generics,this.genericCount,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  buffer.append(Formatting.Method.parametersStart);
  Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
  buffer.append(Formatting.Method.parametersEnd);
  if (this.exceptionCount > 0) {
    buffer.append(Formatting.Method.signatureThrowsSeperator);
    Util.astToString(prefix,this.exceptions,this.exceptionCount,Formatting.Method.throwsSeperator,buffer);
  }
  if (this.value == null) {
    buffer.append(';');
    return;
  }
  if (this.value.valueTag() != IValue.STATEMENT_LIST) {
    buffer.append(Formatting.Method.signatureBodySeperator);
    this.value.toString(prefix,buffer);
    buffer.append(';');
    return;
  }
  if (((StatementList)this.value).isEmpty()) {
    buffer.append(Formatting.Method.emptyBody);
    return;
  }
  buffer.append(' ');
  this.value.toString(prefix,buffer);
  return;
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  super.toString(prefix,buffer);
  buffer.append(ModifierTypes.METHOD.toString(this.modifiers));
  if (this.type != null) {
    this.type.toString("String_Node_Str",buffer);
    buffer.append(' ');
  }
  buffer.append(this.name);
  if (this.genericCount > 0) {
    buffer.append('[');
    Util.astToString(prefix,this.generics,this.genericCount,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  buffer.append(Formatting.Method.parametersStart);
  Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
  buffer.append(Formatting.Method.parametersEnd);
  if (this.exceptionCount > 0) {
    buffer.append(Formatting.Method.signatureThrowsSeperator);
    Util.astToString(prefix,this.exceptions,this.exceptionCount,Formatting.Method.throwsSeperator,buffer);
  }
  if (this.value == null) {
    buffer.append(';');
    return;
  }
  if (this.value.valueTag() != IValue.STATEMENT_LIST) {
    buffer.append(Formatting.Method.signatureBodySeperator);
    this.value.toString(prefix,buffer);
    buffer.append(';');
    return;
  }
  if (((StatementList)this.value).isEmpty()) {
    buffer.append(Formatting.Method.emptyBody);
    return;
  }
  buffer.append(' ');
  this.value.toString(prefix,buffer);
}
Program: 84368
Project: 84368
Buggy source:
@Override public void addMethod(IMethod method){
  REPLMemberClass iclass=REPLContext.getREPLClass(method);
  method.resolveTypes(markers,this);
  if (reportErrors(markers)) {
    this.cleanup();
    return;
  }
  methods.add(method);
  method.resolve(markers,this);
  method.checkTypes(markers,this);
  method.check(markers,this);
  if (reportErrors(markers)) {
    this.cleanup();
    return;
  }
  method.foldConstants();
  method.cleanup(this,this);
  REPLContext.compileClass(iclass);
  StringBuilder buf=new StringBuilder("String_Node_Str");
  Util.methodSignatureToString(method,buf);
  System.out.println(buf.append('\'').toString());
  this.cleanup();
}

Fixed version (ground truth):
@Override public void addMethod(IMethod method){
  REPLMemberClass iclass=REPLContext.getREPLClass(method);
  method.resolveTypes(markers,this);
  if (reportErrors(markers)) {
    this.cleanup();
    return;
  }
  methods.add(method);
  method.resolve(markers,this);
  method.checkTypes(markers,this);
  method.check(markers,this);
  if (reportErrors(markers)) {
    methods.remove(method);
    this.cleanup();
    return;
  }
  method.foldConstants();
  method.cleanup(this,this);
  REPLContext.compileClass(iclass);
  StringBuilder buf=new StringBuilder("String_Node_Str");
  Util.methodSignatureToString(method,buf);
  System.out.println(buf.append('\'').toString());
  this.cleanup();
}
Program: 84369
Project: 84369
Buggy source:
public boolean parse(MarkerList markers,TokenIterator tokens,Parser parser){
  this.tokens=tokens;
  this.parser=parser;
  this.skip=0;
  this.reparse=false;
  this.markers=markers;
  this.syntaxErrors=false;
  IToken token=null, prev=null;
  tokens.reset();
  while (tokens.hasNext()) {
    token=tokens.next();
    token.setPrev(prev);
    prev=token;
  }
  if (prev == null) {
    return false;
  }
  int type=prev.type();
  if (!ParserUtil.isSeperator(type) && type != (Tokens.IDENTIFIER | Tokens.MOD_SYMBOL)) {
    IToken semicolon=new InferredSemicolon(prev.endLine(),prev.endIndex());
    semicolon.setPrev(prev);
    prev.setNext(semicolon);
  }
  tokens.reset();
  while (true) {
    if (this.reparse) {
      this.reparse=false;
    }
 else {
      token=tokens.next();
      if (token == null) {
        break;
      }
    }
    if (this.skip > 0) {
      this.skip--;
      continue;
    }
    try {
      this.parser.parse(this,token);
    }
 catch (    Exception ex) {
      ex.printStackTrace();
      return false;
    }
    if (this.parser == null || this.syntaxErrors && this.markers == null) {
      break;
    }
    if (DyvilCompiler.parseStack) {
      System.out.println(token + "String_Node_Str" + this.parser.getName()+ "String_Node_Str"+ this.parser.getMode());
    }
  }
  return !this.syntaxErrors;
}

Fixed version (ground truth):
public boolean parse(MarkerList markers,TokenIterator tokens,Parser parser){
  this.parser=parser;
  this.skip=0;
  this.reparse=false;
  this.markers=markers;
  this.syntaxErrors=false;
  IToken token=null, prev=null;
  tokens.reset();
  while (tokens.hasNext()) {
    token=tokens.next();
    token.setPrev(prev);
    prev=token;
  }
  if (prev == null) {
    return false;
  }
  int type=prev.type();
  if (!ParserUtil.isSeperator(type) && type != (Tokens.IDENTIFIER | Tokens.MOD_SYMBOL)) {
    IToken semicolon=new InferredSemicolon(prev.endLine(),prev.endIndex());
    semicolon.setPrev(prev);
    prev.setNext(semicolon);
  }
  tokens.reset();
  super.parse(tokens);
  return !this.syntaxErrors;
}