nus-yam/ex-repair huggingface dataset:
Program: 83984
Project: 83984
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  int i=this.instance.getValueType();
  if (i == FIELD_ACCESS) {
    FieldAccess access=(FieldAccess)this.instance;
    IField f=access.field;
    if (this.writeIINC(writer,f)) {
      return;
    }
    IValue instance=access.instance;
    if (instance != null) {
      instance.writeExpression(writer);
      writer.visitInsn(Opcodes.DUP);
    }
    f.writeGet(writer);
    this.method.writeCall(writer,null,this.arguments);
    writer.visitInsn(Opcodes.DUP);
    f.writeSet(writer);
  }
 else   if (i == APPLY_METHOD_CALL) {
    ApplyMethodCall call=(ApplyMethodCall)this.instance;
    call.instance.writeExpression(writer);
    for (    IValue v : call.arguments) {
      v.writeExpression(writer);
    }
    writer.visitInsn(Opcodes.DUP2);
    call.method.writeCall(writer,null,Util.EMPTY_VALUES);
    this.method.writeCall(writer,null,this.arguments);
    writer.visitInsn(Opcodes.DUP_X2);
    this.updateMethod.writeCall(writer,null,Util.EMPTY_VALUES);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  int i=this.instance.getValueType();
  if (i == FIELD_ACCESS) {
    FieldAccess access=(FieldAccess)this.instance;
    IField f=access.field;
    if (this.writeIINC(writer,f)) {
      return;
    }
    IValue instance=access.instance;
    if (instance != null) {
      instance.writeExpression(writer);
      writer.visitInsn(Opcodes.DUP);
    }
    f.writeGet(writer,null);
    this.method.writeCall(writer,null,this.arguments);
    writer.visitInsn(Opcodes.DUP);
    f.writeSet(writer,null,null);
  }
 else   if (i == APPLY_METHOD_CALL) {
    ApplyMethodCall call=(ApplyMethodCall)this.instance;
    call.instance.writeExpression(writer);
    for (    IValue v : call.arguments) {
      v.writeExpression(writer);
    }
    writer.visitInsn(Opcodes.DUP2);
    call.method.writeCall(writer,null,Util.EMPTY_VALUES);
    this.method.writeCall(writer,null,this.arguments);
    writer.visitInsn(Opcodes.DUP_X2);
    this.updateMethod.writeCall(writer,null,Util.EMPTY_VALUES);
  }
}
Program: 83985
Project: 83985
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.method == null) {
    return 0;
  }
  IType type1=this.method.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (type1.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.method == null) {
    return 0;
  }
  IType type1=this.method.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (type.isSuperTypeOf(type1)) {
    return 2;
  }
  return 0;
}
Program: 83986
Project: 83986
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (this.type.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (type.isSuperTypeOf(this.type)) {
    return 2;
  }
  return 0;
}
Program: 83987
Project: 83987
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  IClass iclass=this.type.getTheClass();
  if (iclass != null) {
    IField field=iclass.getInstanceField();
    if (field != null) {
      field.writeGet(writer);
    }
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  IClass iclass=this.type.getTheClass();
  if (iclass != null) {
    IField field=iclass.getInstanceField();
    if (field != null) {
      field.writeGet(writer,null);
    }
  }
}
Program: 83988
Project: 83988
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (this.type.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (type.isSuperTypeOf(this.type)) {
    return 2;
  }
  return 0;
}
Program: 83989
Project: 83989
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.instance != null) {
    this.instance.writeExpression(writer);
  }
  this.field.writeGet(writer);
  writer.visitInsn(this.field.getType().getReturnOpcode());
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  this.field.writeGet(writer,this.instance);
  writer.visitInsn(this.field.getType().getReturnOpcode());
}
Program: 83990
Project: 83990
Buggy source:
@Override public boolean resolve(IContext context,List<Marker> markers){
  IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
  if (field != null) {
    if (field.isEnumConstant()) {
      EnumValue enumValue=new EnumValue(this.position);
      enumValue.name=this.name;
      enumValue.qualifiedName=this.qualifiedName;
      enumValue.type=field.getType();
      this.replacement=enumValue;
      return false;
    }
    this.field=field;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
  if (field != null) {
    if (field.isEnumConstant()) {
      EnumValue enumValue=new EnumValue(this.position);
      enumValue.name=this.name;
      enumValue.qualifiedName=this.qualifiedName;
      enumValue.type=field.getType();
      this.replacement=enumValue;
      return false;
    }
    if (this.instance != null && !(field instanceof Field)) {
      return false;
    }
    this.field=field;
    return true;
  }
  return false;
}
Program: 83991
Project: 83991
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  if (this.instance != null) {
    this.instance.writeExpression(writer);
  }
  this.field.writeGet(writer);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  this.field.writeGet(writer,this.instance);
}
Program: 83992
Project: 83992
Buggy source:
@Override public boolean isResolved(){
  return this.field != null;
}

Fixed version (ground truth):
@Override public boolean isResolved(){
  if (this.field == null) {
    return false;
  }
  if (this.instance != null && !(this.field instanceof Field)) {
    return false;
  }
  return true;
}
Program: 83993
Project: 83993
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.field == null) {
    return 0;
  }
  IType type1=this.field.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (type1.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.field == null) {
    return 0;
  }
  IType type1=this.field.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (Type.isSuperType(type,type1)) {
    return 2;
  }
  return 0;
}
Program: 83994
Project: 83994
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.value == null) {
    return;
  }
  if (this.instance != null) {
    this.instance.writeExpression(writer);
  }
  this.value.writeExpression(writer);
  this.field.writeSet(writer);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.value == null) {
    return;
  }
  this.field.writeSet(writer,this.instance,this.value);
}
Program: 83995
Project: 83995
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  if (this.value == null) {
    return;
  }
  if (this.instance != null) {
    this.instance.writeExpression(writer);
  }
  this.value.writeExpression(writer);
  writer.visitInsn(Opcodes.DUP);
  this.field.writeSet(writer);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  if (this.value == null) {
    return;
  }
  if (this.instance != null) {
    this.instance.writeExpression(writer);
  }
  this.value.writeExpression(writer);
  writer.visitInsn(Opcodes.DUP);
  this.field.writeSet(writer,null,null);
}
Program: 83996
Project: 83996
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  this.variable.writeSet(writer);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  this.variable.writeSet(writer,null,this.variable.value);
}
Program: 83997
Project: 83997
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.variable.type.equals(type)) {
    return 3;
  }
 else   if (this.variable.type.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.variable.type.equals(type)) {
    return 3;
  }
 else   if (this.variable.type.isSuperTypeOf(type)) {
    return 2;
  }
  return 0;
}
Program: 83998
Project: 83998
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  writer.visitInsn(Opcodes.DUP);
  this.variable.writeSet(writer);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  writer.visitInsn(Opcodes.DUP);
  this.variable.writeSet(writer,null,null);
}
Program: 83999
Project: 83999
Buggy source:
@Override public IAccess resolve3(IContext context,IAccess next){
  return null;
}

Fixed version (ground truth):
@Override public IAccess resolve3(IContext context,IAccess next){
  List<IValue> list=new ArrayList(this.arguments);
  list.add(next);
  IMethod method=IAccess.resolveMethod(context,this.instance,this.qualifiedName,list);
  if (method != null) {
    this.arguments=list;
    this.method=method;
    return this;
  }
  return null;
}
Program: 84000
Project: 84000
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.method == null) {
    return 0;
  }
  IType type1=this.method.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (type1.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.method == null) {
    return 0;
  }
  IType type1=this.method.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (Type.isSuperType(type,type1)) {
    return 2;
  }
  return 0;
}
Program: 84001
Project: 84001
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (this.type.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (type.isSuperTypeOf(this.type)) {
    return 2;
  }
  return 0;
}
Program: 84002
Project: 84002
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.method == null) {
    return 0;
  }
  IType type1=this.method.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (type1.isSuperType(type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.method == null) {
    return 0;
  }
  IType type1=this.method.getType();
  if (type.equals(type1)) {
    return 3;
  }
 else   if (type.isSuperTypeOf(type1)) {
    return 2;
  }
  return 0;
}
Program: 84003
Project: 84003
Buggy source:
@Override public FieldMatch resolveField(String name){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  return super.resolveField(name);
}

Fixed version (ground truth):
@Override public FieldMatch resolveField(String name){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  IField field=this.body.getProperty(name);
  if (field != null) {
    return new FieldMatch(field,1);
  }
  field=this.body.getField(name);
  if (field != null) {
    return new FieldMatch(field,1);
  }
  if (this.instanceField != null && "String_Node_Str".equals(name)) {
    return new FieldMatch(this.instanceField,1);
  }
  FieldMatch match;
  if (this.superType != null && this != Type.PREDEF_CLASS) {
    match=this.superType.resolveField(name);
    if (match != null) {
      return match;
    }
  }
  return null;
}
Program: 84004
Project: 84004
Buggy source:
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,String name,List<IValue> arguments){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  super.getMethodMatches(list,instance,name,arguments);
}

Fixed version (ground truth):
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,String name,List<IValue> arguments){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  this.body.getMethodMatches(list,instance,name,arguments);
  if (!list.isEmpty()) {
    return;
  }
  if (this.superType != null) {
    this.superType.getMethodMatches(list,instance,name,arguments);
  }
  for (  IType i : this.interfaces) {
    i.getMethodMatches(list,instance,name,arguments);
  }
}
Program: 84005
Project: 84005
Buggy source:
@Override public void getConstructorMatches(List<MethodMatch> list,List<IValue> arguments){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  super.getConstructorMatches(list,arguments);
}

Fixed version (ground truth):
@Override public void getConstructorMatches(List<MethodMatch> list,List<IValue> arguments){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  this.body.getMethodMatches(list,null,"String_Node_Str",arguments);
}
Program: 84006
Project: 84006
Buggy source:
@Override public boolean equals(IClass iclass){
  if (!iclass.isSuperType(this.superType)) {
    return false;
  }
  for (  IType i : this.interfaces) {
    if (!iclass.isSuperType(i)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(IClass iclass){
  if (!iclass.isSubTypeOf(this.superType)) {
    return false;
  }
  for (  IType i : this.interfaces) {
    if (!iclass.isSubTypeOf(i)) {
      return false;
    }
  }
  return true;
}
Program: 84007
Project: 84007
Buggy source:
@Override public void writeJump(MethodWriter writer,Label dest){
  this.left.writeExpression(writer);
  writer.visitJumpInsn(Opcodes.IFEQ,dest);
  this.right.writeExpression(writer);
  writer.visitJumpInsn(Opcodes.IFEQ,dest);
}

Fixed version (ground truth):
@Override public void writeJump(MethodWriter writer,Label dest){
  this.left.writeExpression(writer);
  writer.visitJumpInsn2(Opcodes.IFEQ,dest);
  this.right.writeExpression(writer);
  writer.visitJumpInsn2(Opcodes.IFEQ,dest);
}
Program: 84008
Project: 84008
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.then == null) {
    this.condition.writeStatement(writer);
  }
  writer.visitLabel(this.start);
  this.condition.writeJump(writer,this.end);
  this.then.writeStatement(writer);
  writer.visitJumpInsn(Opcodes.GOTO,this.start);
  writer.visitLabel(this.end);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.then == null) {
    this.condition.writeStatement(writer);
  }
  writer.visitLabel(this.start);
  this.condition.writeJump(writer,this.end);
  this.then.writeStatement(writer);
  writer.visitJumpInsn(Opcodes.GOTO,this.start);
  writer.visitLabel(this.end);
  writer.visitInsn(Opcodes.NOP);
}
Program: 84009
Project: 84009
Buggy source:
private void processInsn(int opcode){
switch (opcode) {
case DUP:
    this.typeStack.push(this.typeStack.peek());
  return;
case SWAP:
{
  Object o1=this.typeStack.pop();
  Object o2=this.typeStack.pop();
  this.typeStack.push(o1);
  this.typeStack.push(o2);
  return;
}
case POP:
this.typeStack.pop();
return;
case ACONST_NULL:
this.push(NULL);
return;
case ARRAYLENGTH:
this.set(INTEGER);
return;
case RETURN:
this.hasReturn=true;
return;
case IADD:
case ISUB:
case IMUL:
case IDIV:
case IREM:
case ISHL:
case ISHR:
case IUSHR:
this.typeStack.pop();
this.typeStack.pop();
this.push(INTEGER);
return;
case LADD:
case LSUB:
case LMUL:
case LDIV:
case LREM:
case LSHL:
case LSHR:
case LUSHR:
this.typeStack.pop();
this.typeStack.pop();
this.push(LONG);
return;
case FADD:
case FSUB:
case FMUL:
case FDIV:
case FREM:
this.typeStack.pop();
this.typeStack.pop();
this.push(FLOAT);
return;
case DADD:
case DSUB:
case DMUL:
case DDIV:
case DREM:
this.typeStack.pop();
this.typeStack.pop();
this.push(DOUBLE);
return;
case L2I:
case F2I:
case D2I:
this.set(INTEGER);
case I2L:
case F2L:
case D2L:
this.set(LONG);
return;
case I2F:
case L2F:
case D2F:
this.set(FLOAT);
return;
case LCMP:
case FCMPL:
case FCMPG:
case DCMPL:
case DCMPG:
this.typeStack.pop();
this.typeStack.pop();
this.push(INTEGER);
return;
}
}

Fixed version (ground truth):
private void processInsn(int opcode){
switch (opcode) {
case DUP:
    this.typeStack.push(this.typeStack.peek());
  return;
case SWAP:
{
  Object o1=this.typeStack.pop();
  Object o2=this.typeStack.pop();
  this.typeStack.push(o1);
  this.typeStack.push(o2);
  return;
}
case POP:
this.typeStack.pop();
return;
case ACONST_NULL:
this.push(NULL);
return;
case ARRAYLENGTH:
this.set(INTEGER);
return;
case RETURN:
this.hasReturn=true;
return;
case BALOAD:
case SALOAD:
case CALOAD:
case IALOAD:
this.typeStack.pop();
this.typeStack.pop();
this.push(INTEGER);
break;
case LALOAD:
this.typeStack.pop();
this.typeStack.pop();
this.push(LONG);
break;
case FALOAD:
this.typeStack.pop();
this.typeStack.pop();
this.push(FLOAT);
break;
case DALOAD:
this.typeStack.pop();
this.typeStack.pop();
this.push(DOUBLE);
break;
case AALOAD:
this.typeStack.pop();
this.typeStack.pop();
this.push(TOP);
case IADD:
case ISUB:
case IMUL:
case IDIV:
case IREM:
case ISHL:
case ISHR:
case IUSHR:
this.typeStack.pop();
this.typeStack.pop();
this.push(INTEGER);
return;
case LADD:
case LSUB:
case LMUL:
case LDIV:
case LREM:
case LSHL:
case LSHR:
case LUSHR:
this.typeStack.pop();
this.typeStack.pop();
this.push(LONG);
return;
case FADD:
case FSUB:
case FMUL:
case FDIV:
case FREM:
this.typeStack.pop();
this.typeStack.pop();
this.push(FLOAT);
return;
case DADD:
case DSUB:
case DMUL:
case DDIV:
case DREM:
this.typeStack.pop();
this.typeStack.pop();
this.push(DOUBLE);
return;
case L2I:
case F2I:
case D2I:
this.set(INTEGER);
case I2L:
case F2L:
case D2L:
this.set(LONG);
return;
case I2F:
case L2F:
case D2F:
this.set(FLOAT);
return;
case LCMP:
case FCMPL:
case FCMPG:
case DCMPL:
case DCMPG:
this.typeStack.pop();
this.typeStack.pop();
this.push(INTEGER);
return;
}
}
Program: 84010
Project: 84010
Buggy source:
@Override public void visitInsn(int opcode){
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
  if (opcode >= IALOAD && opcode <= SALOAD) {
    Object o=this.typeStack.pop();
    this.typeStack.pop();
    if (o instanceof String) {
      this.push(((String)o).substring(1));
    }
 else {
      this.push(TOP);
    }
  }
 else   if (opcode >= IASTORE && opcode <= SASTORE) {
    this.typeStack.pop();
    this.typeStack.pop();
    this.typeStack.pop();
  }
 else   if (opcode >= IRETURN && opcode <= ARETURN) {
    this.typeStack.pop();
  }
 else {
    this.processInsn(opcode);
  }
  this.mv.visitInsn(opcode);
}

Fixed version (ground truth):
@Override public void visitInsn(int opcode){
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
 else   if (opcode >= IASTORE && opcode <= SASTORE) {
    this.typeStack.pop();
    this.typeStack.pop();
    this.typeStack.pop();
  }
 else   if (opcode >= IRETURN && opcode <= ARETURN) {
    this.typeStack.pop();
  }
 else {
    this.processInsn(opcode);
  }
  this.mv.visitInsn(opcode);
}
Program: 84011
Project: 84011
Buggy source:
@Override public void writeJump(MethodWriter writer,Label dest){
}

Fixed version (ground truth):
@Override public void writeJump(MethodWriter writer,Label dest){
  this.writeExpression(writer);
  writer.visitJumpInsn(Opcodes.IFEQ,dest);
}
Program: 84015
Project: 84015
Buggy source:
public void addLocal(int index,Object type){
  this.locals.add(type);
}

Fixed version (ground truth):
public void addLocal(int index,Object type){
  this.ensureLocals(index);
  this.locals[index]=type;
}
Program: 84016
Project: 84016
Buggy source:
public void visitParameter(String name,IType type,int index){
  this.locals.add(type.getFrameType());
  this.mv.visitParameter(name,index);
}

Fixed version (ground truth):
public void visitParameter(String name,IType type,int index){
  this.addLocal(index,type.getFrameType());
  this.mv.visitParameter(name,index);
}
Program: 84017
Project: 84017
Buggy source:
private void visitFrame(){
  int len=this.typeStack.size();
  Object[] o=new Object[len];
  for (int i=0; i < len; i++) {
    o[i]=this.typeStack.get(i);
  }
  this.mv.visitFrame(F_NEW,this.locals.size(),this.locals.toArray(),len,o);
}

Fixed version (ground truth):
private void visitFrame(){
  int len=this.typeStack.size();
  Object[] o=new Object[len];
  for (int i=0; i < len; i++) {
    o[i]=this.typeStack.get(i);
  }
  this.mv.visitFrame(F_NEW,this.maxLocals,this.locals,len,o);
}
Program: 84018
Project: 84018
Buggy source:
public void visitEnd(IType type){
  if (!this.hasReturn) {
    this.mv.visitInsn(type.getReturnOpcode());
  }
  this.mv.visitMaxs(this.maxStack,this.locals.size());
  this.mv.visitEnd();
}

Fixed version (ground truth):
public void visitEnd(IType type){
  if (!this.hasReturn) {
    this.mv.visitInsn(type.getReturnOpcode());
  }
  this.mv.visitMaxs(this.maxStack,this.maxLocals);
  this.mv.visitEnd();
}
Program: 84019
Project: 84019
Buggy source:
public void setConstructor(IType type){
  this.locals.add(UNINITIALIZED_THIS);
  this.push(UNINITIALIZED_THIS);
}

Fixed version (ground truth):
public void setConstructor(IType type){
  this.locals[0]=UNINITIALIZED_THIS;
  this.push(UNINITIALIZED_THIS);
}
Program: 84020
Project: 84020
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  this.writeExpression(writer);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  int opcode;
  int args=this.arguments.size();
  if (this.isCustom) {
    opcode=Opcodes.INVOKESTATIC;
  }
 else {
    opcode=Opcodes.INVOKESPECIAL;
    args++;
    writer.visitTypeInsn(Opcodes.NEW,this.type);
  }
  for (  IValue arg : this.arguments) {
    arg.writeExpression(writer);
  }
  String owner=this.method.getTheClass().getInternalName();
  String name="String_Node_Str";
  String desc=this.method.getDescriptor();
  writer.visitMethodInsn(opcode,owner,name,desc,false,args,null);
}
Program: 84021
Project: 84021
Buggy source:
@Override public boolean resolve(IContext context,List<Marker> markers){
  if (!this.type.isResolved()) {
    return false;
  }
  MethodMatch match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    this.isCustom=true;
    return true;
  }
  match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  if (!this.type.isResolved()) {
    return false;
  }
  MethodMatch match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    return true;
  }
  return false;
}
Program: 84022
Project: 84022
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  int opcode;
  int args=this.arguments.size();
  if (this.isCustom) {
    opcode=Opcodes.INVOKESTATIC;
  }
 else {
    opcode=Opcodes.INVOKESPECIAL;
    args++;
    writer.visitTypeInsn(Opcodes.NEW,this.type);
    writer.visitInsn(Opcodes.DUP,this.type);
  }
  for (  IValue arg : this.arguments) {
    arg.writeExpression(writer);
  }
  String owner=this.method.getTheClass().getInternalName();
  String name=this.method.getName();
  String desc=this.method.getDescriptor();
  writer.visitMethodInsn(opcode,owner,name,desc,false,args,null);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  int opcode;
  int args=this.arguments.size();
  if (this.isCustom) {
    opcode=Opcodes.INVOKESTATIC;
  }
 else {
    opcode=Opcodes.INVOKESPECIAL;
    args++;
    writer.visitTypeInsn(Opcodes.NEW,this.type);
    writer.visitInsn(Opcodes.DUP,this.type);
  }
  for (  IValue arg : this.arguments) {
    arg.writeExpression(writer);
  }
  String owner=this.method.getTheClass().getInternalName();
  String name="String_Node_Str";
  String desc=this.method.getDescriptor();
  writer.visitMethodInsn(opcode,owner,name,desc,false,args,null);
}
Program: 84023
Project: 84023
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.instance != null) {
    this.instance.toString("String_Node_Str",buffer);
    if (this.dotless && !Formatting.Method.useJavaFormat) {
      buffer.append(Formatting.Method.dotlessSeperator);
    }
 else {
      buffer.append('.');
    }
  }
  if (Formatting.Method.convertQualifiedNames) {
    buffer.append(this.qualifiedName);
  }
 else {
    buffer.append(this.name);
  }
  if (this.isSugarCall && !Formatting.Method.useJavaFormat) {
    if (!this.arguments.isEmpty()) {
      buffer.append(Formatting.Method.sugarCallSeperator);
      this.arguments.get(0).toString("String_Node_Str",buffer);
    }
  }
 else {
    Util.parametersToString(this.arguments,buffer,true);
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.instance != null) {
    this.instance.toString(prefix,buffer);
    if (this.dotless && !Formatting.Method.useJavaFormat) {
      buffer.append(Formatting.Method.dotlessSeperator);
    }
 else {
      buffer.append('.');
    }
  }
  if (Formatting.Method.convertQualifiedNames) {
    buffer.append(this.qualifiedName);
  }
 else {
    buffer.append(this.name);
  }
  if (this.isSugarCall && !Formatting.Method.useJavaFormat) {
    if (!this.arguments.isEmpty()) {
      buffer.append(Formatting.Method.sugarCallSeperator);
      this.arguments.get(0).toString(prefix,buffer);
    }
  }
 else {
    Util.parametersToString(this.arguments,buffer,true);
  }
}
Program: 84024
Project: 84024
Buggy source:
@Override public void writeSet(MethodWriter writer){
  String owner=this.theClass.getInternalName();
  String name=this.name;
  String desc=this.type.getExtendedName();
  if ((this.modifiers & Modifiers.STATIC) == Modifiers.STATIC) {
    writer.visitPutStatic(owner,name,desc);
  }
 else {
    writer.visitPutStatic(owner,name,desc);
  }
}

Fixed version (ground truth):
@Override public void writeSet(MethodWriter writer){
  String owner=this.theClass.getInternalName();
  String name=this.name;
  String desc=this.type.getExtendedName();
  if ((this.modifiers & Modifiers.STATIC) == Modifiers.STATIC) {
    writer.visitPutStatic(owner,name,desc);
  }
 else {
    writer.visitPutField(owner,name,desc);
  }
}
Program: 84025
Project: 84025
Buggy source:
@Override public String getDescriptor(){
  StringBuilder buf=new StringBuilder();
  buf.append('(');
  for (  Parameter par : this.parameters) {
    buf.append(par.type.getExtendedName());
  }
  buf.append(')');
  buf.append(this.type.getExtendedName());
  return buf.toString();
}

Fixed version (ground truth):
@Override public String getDescriptor(){
  StringBuilder buf=new StringBuilder();
  buf.append('(');
  for (  Parameter par : this.parameters) {
    buf.append(par.type.getExtendedName());
  }
  buf.append(')');
  buf.append(this.isConstructor ? "String_Node_Str" : this.type.getExtendedName());
  return buf.toString();
}
Program: 84026
Project: 84026
Buggy source:
@Override public void write(ClassWriter writer){
  int modifiers=this.modifiers & 0xFFFF;
  if (this.statement == null) {
    modifiers|=Modifiers.ABSTRACT;
  }
  MethodVisitor visitor=writer.visitMethod(modifiers,this.qualifiedName,this.getDescriptor(),this.getSignature(),this.getExceptions());
  MethodWriter mw=new MethodWriter(visitor);
  if (this.isConstructor) {
    mw.setConstructor(this.type);
  }
  for (  Annotation annotation : this.annotations) {
    annotation.write(mw);
  }
  if ((this.modifiers & Modifiers.INLINE) == Modifiers.INLINE) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.IMPLICIT) == Modifiers.IMPLICIT) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.SEALED) == Modifiers.SEALED) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  for (  Parameter param : this.parameters) {
    param.write(mw);
  }
  if (this.statement != null) {
    mw.visitCode();
    this.statement.writeExpression(mw);
    mw.visitEnd(this.isConstructor ? Type.VOID : this.type);
  }
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  int modifiers=this.modifiers & 0xFFFF;
  if (this.statement == null) {
    modifiers|=Modifiers.ABSTRACT;
  }
  MethodVisitor visitor=writer.visitMethod(modifiers,this.qualifiedName,this.getDescriptor(),this.getSignature(),this.getExceptions());
  MethodWriter mw=new MethodWriter(visitor);
  if (this.isConstructor) {
    mw.setConstructor(this.type);
  }
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    mw.setInstance(this.type);
  }
  for (  Annotation annotation : this.annotations) {
    annotation.write(mw);
  }
  if ((this.modifiers & Modifiers.INLINE) == Modifiers.INLINE) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.IMPLICIT) == Modifiers.IMPLICIT) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.SEALED) == Modifiers.SEALED) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  for (  Parameter param : this.parameters) {
    param.write(mw);
  }
  if (this.statement != null) {
    mw.visitCode();
    this.statement.writeExpression(mw);
    mw.visitEnd(this.isConstructor ? Type.VOID : this.type);
  }
}
Program: 84027
Project: 84027
Buggy source:
public Method(IClass iclass,String name,IType type,int modifiers,List<Annotation> annotations){
  super(iclass,name,type,modifiers,annotations);
  if (name.equals("String_Node_Str")) {
    this.isConstructor=true;
  }
}

Fixed version (ground truth):
public Method(IClass iclass,String name,IType type,int modifiers,List<Annotation> annotations){
  super(iclass,name,type,modifiers,annotations);
  if (name.equals("String_Node_Str")) {
    this.isConstructor=true;
    this.qualifiedName="String_Node_Str";
  }
}
Program: 84028
Project: 84028
Buggy source:
@Override public default boolean isStatic(){
  return true;
}

Fixed version (ground truth):
@Override public default boolean isStatic(){
  return false;
}
Program: 84029
Project: 84029
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  writer.visitIntInsn(Opcodes.ALOAD,0);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  writer.visitVarInsn(Opcodes.ALOAD,0,this.type);
}
Program: 84030
Project: 84030
Buggy source:
@Override public void resolve(List<Marker> markers,IContext context){
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    IType t=this.theClass.getSuperType();
    if (t != null) {
      IClass iclass=t.getTheClass();
      if (iclass != null) {
        this.overrideMethod=iclass.getBody().getMethod(this.name,this.parameters);
      }
    }
  }
  Iterator<Annotation> iterator=this.annotations.iterator();
  while (iterator.hasNext()) {
    Annotation a=iterator.next();
    if (this.processAnnotation(a)) {
      iterator.remove();
      continue;
    }
    a.resolve(markers,context);
  }
  int index=this.hasModifier(Modifiers.STATIC) ? 0 : 1;
  for (  Parameter p : this.parameters) {
    p.index=index++;
    p.resolve(markers,context);
  }
  for (  Variable v : this.variables) {
    v.index=index++;
    v.resolve(markers,this);
  }
  if (this.statement != null) {
    this.statement=this.statement.resolve(markers,this);
  }
}

Fixed version (ground truth):
@Override public void resolve(List<Marker> markers,IContext context){
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    IType t=this.theClass.getSuperType();
    if (t != null) {
      IClass iclass=t.getTheClass();
      if (iclass != null) {
        this.overrideMethod=iclass.getBody().getMethod(this.name,this.parameters);
      }
    }
  }
  Iterator<Annotation> iterator=this.annotations.iterator();
  while (iterator.hasNext()) {
    Annotation a=iterator.next();
    if (this.processAnnotation(a)) {
      iterator.remove();
      continue;
    }
    a.resolve(markers,context);
  }
  int index=this.hasModifier(Modifiers.STATIC) ? 0 : 1;
  for (  Parameter p : this.parameters) {
    p.index=index++;
    p.resolve(markers,context);
  }
  if (this.statement != null) {
    this.statement=this.statement.resolve(markers,this);
  }
}
Program: 84031
Project: 84031
Buggy source:
@Override public void write(ClassWriter writer){
  int modifiers=this.modifiers & 0xFFFF;
  if (this.statement == null) {
    modifiers|=Modifiers.ABSTRACT;
  }
  MethodVisitor visitor=writer.visitMethod(modifiers,this.qualifiedName,this.getDescriptor(),this.getSignature(),this.getExceptions());
  MethodWriter mw=new MethodWriter(visitor);
  if (this.isConstructor) {
    mw.setConstructor(this.type);
  }
  for (  Annotation annotation : this.annotations) {
    annotation.write(mw);
  }
  if ((this.modifiers & Modifiers.INLINE) == Modifiers.INLINE) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.IMPLICIT) == Modifiers.IMPLICIT) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.SEALED) == Modifiers.SEALED) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  for (  Parameter param : this.parameters) {
    param.write(mw);
  }
  if (this.statement != null) {
    mw.visitCode();
    for (    Variable var : this.variables) {
      mw.visitLocalVariable(var.qualifiedName,var.type,var.start,var.end,var.index);
    }
    this.statement.writeExpression(mw);
    mw.visitEnd(this.isConstructor ? Type.VOID : this.type);
  }
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  int modifiers=this.modifiers & 0xFFFF;
  if (this.statement == null) {
    modifiers|=Modifiers.ABSTRACT;
  }
  MethodVisitor visitor=writer.visitMethod(modifiers,this.qualifiedName,this.getDescriptor(),this.getSignature(),this.getExceptions());
  MethodWriter mw=new MethodWriter(visitor);
  if (this.isConstructor) {
    mw.setConstructor(this.type);
  }
  for (  Annotation annotation : this.annotations) {
    annotation.write(mw);
  }
  if ((this.modifiers & Modifiers.INLINE) == Modifiers.INLINE) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.IMPLICIT) == Modifiers.IMPLICIT) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.SEALED) == Modifiers.SEALED) {
    mw.visitAnnotation("String_Node_Str",false);
  }
  for (  Parameter param : this.parameters) {
    param.write(mw);
  }
  if (this.statement != null) {
    mw.visitCode();
    this.statement.writeExpression(mw);
    mw.visitEnd(this.isConstructor ? Type.VOID : this.type);
  }
}
Program: 84032
Project: 84032
Buggy source:
@Override public void foldConstants(){
  for (  Annotation a : this.annotations) {
    a.foldConstants();
  }
  for (  Parameter p : this.parameters) {
    p.foldConstants();
  }
  for (  Variable v : this.variables) {
    v.foldConstants();
  }
  if (this.statement != null) {
    this.statement=this.statement.foldConstants();
  }
}

Fixed version (ground truth):
@Override public void foldConstants(){
  for (  Annotation a : this.annotations) {
    a.foldConstants();
  }
  for (  Parameter p : this.parameters) {
    p.foldConstants();
  }
  if (this.statement != null) {
    this.statement=this.statement.foldConstants();
  }
}
Program: 84034
Project: 84034
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.isArray) {
    super.writeExpression(writer);
    return;
  }
  writer.visitLabel(this.start);
  for (  IValue v : this.values) {
    v.writeStatement(writer);
  }
  writer.visitLabel(this.end);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.isArray) {
    super.writeExpression(writer);
    return;
  }
  writer.visitLabel(this.start);
  for (  IValue v : this.values) {
    v.writeStatement(writer);
  }
  writer.visitLabel(this.end);
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.visitLocalVariable(entry.getKey(),var.type,this.start,this.end,var.index);
  }
}
Program: 84035
Project: 84035
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.context=context;
  IVariableList variableList=context instanceof IVariableList ? (IVariableList)context : null;
  for (  IValue v : this.values) {
    v.resolveTypes(markers,context);
    if (v.getValueType() != IValue.FIELD_ASSIGN) {
      continue;
    }
    FieldAssign assign=(FieldAssign)v;
    if (!assign.initializer) {
      continue;
    }
    Variable var=(Variable)assign.field;
    var.start=this.start;
    var.end=this.end;
    this.variables.put(assign.qualifiedName,var);
    if (variableList != null) {
      variableList.addVariable(var);
    }
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.context=context;
  this.variableCount=context.getVariableCount();
  for (  IValue v : this.values) {
    if (v.getValueType() == IValue.FIELD_ASSIGN) {
      FieldAssign assign=(FieldAssign)v;
      if (assign.initializer) {
        Variable var=(Variable)assign.field;
        var.index=this.variableCount++;
        this.variables.put(assign.qualifiedName,var);
      }
    }
    v.resolveTypes(markers,this);
  }
}
Program: 84036
Project: 84036
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  if (this.condition != null) {
    if (this.condition.requireType(Type.BOOLEAN)) {
      SemanticError error=new SemanticError(this.condition.getPosition(),"String_Node_Str");
      error.addInfo("String_Node_Str" + this.condition.getType());
      markers.add(error);
    }
    this.condition.check(markers,context);
  }
 else {
    markers.add(new SyntaxError(this.position,"String_Node_Str"));
  }
  if (this.then != null) {
    this.then.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  if (this.condition != null) {
    if (!this.condition.requireType(Type.BOOLEAN)) {
      SemanticError error=new SemanticError(this.condition.getPosition(),"String_Node_Str");
      error.addInfo("String_Node_Str" + this.condition.getType());
      markers.add(error);
    }
    this.condition.check(markers,context);
  }
 else {
    markers.add(new SyntaxError(this.position,"String_Node_Str"));
  }
  if (this.then != null) {
    this.then.check(markers,context);
  }
}
Program: 84037
Project: 84037
Buggy source:
public void log(Logger logger){
  StringBuilder buf=new StringBuilder();
  CodeFile file=this.position.getFile();
  String type=this.getMarkerType();
  String message=this.getMessage();
  String suggestion=this.getSuggestion();
  buf.append(file).append(':').append(this.position.getLineNumber()).append("String_Node_Str");
  buf.append(type);
  if (message != null) {
    buf.append("String_Node_Str").append(message);
  }
  if (suggestion != null) {
    buf.append("String_Node_Str").append(suggestion);
  }
  int prevNL=this.position.getPrevNewline();
  int nextNL=this.position.getNextNewline();
  String code=file.getCode();
  String line=code.substring(prevNL,nextNL);
  buf.append('\n').append(line).append('\n');
  for (int i=prevNL; i < this.position.getStart(); i++) {
    char c=code.charAt(i);
    if (c == '\t') {
      buf.append('\t');
    }
 else {
      buf.append(' ');
    }
  }
  buf.append('^');
  if (this.info != null) {
    buf.append('\n');
    for (    String s : this.info) {
      buf.append('\n').append(s);
    }
  }
  logger.info(buf.toString());
}

Fixed version (ground truth):
public void log(Logger logger){
  StringBuilder buf=new StringBuilder();
  CodeFile file=this.position.getFile();
  String type=this.getMarkerType();
  String message=this.getMessage();
  String suggestion=this.getSuggestion();
  buf.append(file).append(':').append(this.position.getLineNumber()).append("String_Node_Str");
  buf.append(type);
  if (message != null) {
    buf.append("String_Node_Str").append(message);
  }
  if (suggestion != null) {
    buf.append("String_Node_Str").append(suggestion);
  }
  int prevNL=this.position.getPrevNewline();
  int nextNL=this.position.getNextNewline();
  String code=file.getCode();
  String line=code.substring(prevNL,nextNL);
  buf.append('\n').append(line).append('\n');
  for (int i=prevNL; i < this.position.getStart(); i++) {
    char c=code.charAt(i);
    if (c == '\t') {
      buf.append('\t');
    }
 else {
      buf.append(' ');
    }
  }
  buf.append('^');
  if (this.info != null) {
    for (    String s : this.info) {
      buf.append("String_Node_Str").append(s);
    }
    buf.append('\n');
  }
  logger.info(buf.toString());
}
Program: 84039
Project: 84039
Buggy source:
@Override public void checkArguments(List<Marker> markers,IValue instance,List<IValue> arguments){
  int pOff=0;
  int len=arguments.size();
  List<Parameter> params=this.parameters;
  Parameter par;
  IType parType;
  if (instance != null && (this.modifiers & Modifiers.IMPLICIT) == Modifiers.IMPLICIT) {
    par=params.get(0);
    parType=par.type;
    if (!instance.requireType(parType)) {
      markers.add(new SemanticError(instance.getPosition(),"String_Node_Str" + par.name + "String_Node_Str"+ parType));
    }
    pOff=1;
  }
  for (int i=0; i < len; i++) {
    par=params.get(i + pOff);
    parType=par.type;
    IValue value=arguments.get(i);
    if (!value.requireType(parType)) {
      markers.add(new SemanticError(value.getPosition(),"String_Node_Str" + par.name + "String_Node_Str"+ parType));
    }
  }
}

Fixed version (ground truth):
@Override public void checkArguments(List<Marker> markers,IValue instance,List<IValue> arguments){
  int pOff=0;
  int len=arguments.size();
  List<Parameter> params=this.parameters;
  Parameter par;
  IType parType;
  if (instance != null && (this.modifiers & Modifiers.IMPLICIT) == Modifiers.IMPLICIT) {
    par=params.get(0);
    parType=par.type;
    if (!instance.requireType(parType)) {
      markers.add(new SemanticError(instance.getPosition(),"String_Node_Str" + par.name + "String_Node_Str"+ instance.getType()+ "String_Node_Str"+ parType));
    }
    pOff=1;
  }
  for (int i=0; i < len; i++) {
    par=params.get(i + pOff);
    parType=par.type;
    IValue value=arguments.get(i);
    if (!value.requireType(parType)) {
      markers.add(new SemanticError(value.getPosition(),"String_Node_Str" + par.name + "String_Node_Str"+ value.getType()+ "String_Node_Str"+ parType));
    }
  }
}
Program: 84040
Project: 84040
Buggy source:
@Override public Type resolve(IContext context){
  int len=this.types.size();
  for (int i=0; i < len; i++) {
    IType t1=this.types.get(i);
    IType t2=t1.resolve(context);
    if (t1 != t2) {
      this.types.set(i,t2);
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public TupleType resolve(IContext context){
  this.getTheClass();
  int len=this.types.size();
  for (int i=0; i < len; i++) {
    IType t1=this.types.get(i);
    IType t2=t1.resolve(context);
    if (t1 != t2) {
      this.types.set(i,t2);
    }
  }
  return this;
}
Program: 84041
Project: 84041
Buggy source:
protected static Type resolvePrimitive(String name){
switch (name) {
case "String_Node_Str":
    return VOID;
case "String_Node_Str":
  return BOOLEAN;
case "String_Node_Str":
return CHAR;
case "String_Node_Str":
return BYTE;
case "String_Node_Str":
return SHORT;
case "String_Node_Str":
return INT;
case "String_Node_Str":
return LONG;
case "String_Node_Str":
return FLOAT;
case "String_Node_Str":
return DOUBLE;
case "String_Node_Str":
case "String_Node_Str":
return STRING;
}
return null;
}

Fixed version (ground truth):
protected static Type resolvePrimitive(String name){
switch (name) {
case "String_Node_Str":
    return VOID;
case "String_Node_Str":
  return BOOLEAN;
case "String_Node_Str":
return CHAR;
case "String_Node_Str":
return BYTE;
case "String_Node_Str":
return SHORT;
case "String_Node_Str":
return INT;
case "String_Node_Str":
return LONG;
case "String_Node_Str":
return FLOAT;
case "String_Node_Str":
return DOUBLE;
case "String_Node_Str":
case "String_Node_Str":
return STRING;
case "String_Node_Str":
case "String_Node_Str":
return ANY;
}
return null;
}
Program: 84042
Project: 84042
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.getType();
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  TupleType type=new TupleType();
  for (  IValue v : this.values) {
    v.resolveTypes(markers,context);
    type.addType(v.getType());
  }
  type.getTheClass();
  this.tupleType=type;
}
Program: 84044
Project: 84044
Buggy source:
public static LinkedList<IAccess> getCallChain(IAccess iaccess){
  LinkedList<IAccess> list=new LinkedList();
  while (true) {
    list.addFirst(iaccess);
    IValue v=iaccess.getValue();
    if (v instanceof IAccess) {
      iaccess=(IAccess)v;
      continue;
    }
    break;
  }
  return list;
}

Fixed version (ground truth):
public static LinkedList<IAccess> getCallChain(List<Marker> markers,IContext context,IAccess iaccess){
  LinkedList<IAccess> list=new LinkedList();
  while (true) {
    list.addFirst(iaccess);
    IValue v=iaccess.getValue();
    if (v instanceof IAccess) {
      iaccess=(IAccess)v;
      continue;
    }
 else     if (v != null) {
      v.resolve(markers,context);
    }
    break;
  }
  return list;
}
Program: 84045
Project: 84045
Buggy source:
public boolean resolve(IContext context);

Fixed version (ground truth):
public boolean resolve(IContext context,List<Marker> markers);
Program: 84046
Project: 84046
Buggy source:
public default int getTypeMatch(IType type){
  IType t=this.getType();
  if (type.equals(t)) {
    return 3;
  }
 else   if (Type.isSuperType(type,t)) {
    return 2;
  }
 else   if (type.classEquals(Type.OBJECT)) {
    return 1;
  }
  return 0;
}

Fixed version (ground truth):
public default int getTypeMatch(IType type){
  IType t=this.getType();
  if (t == null) {
    return 0;
  }
  if (type.equals(t)) {
    return 3;
  }
 else   if (Type.isSuperType(type,t)) {
    return 2;
  }
 else   if (type.classEquals(Type.OBJECT)) {
    return 1;
  }
  return 0;
}
Program: 84047
Project: 84047
Buggy source:
@Override public boolean resolve(IContext context){
  return this.type.isResolved();
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  return this.type.isResolved();
}
Program: 84048
Project: 84048
Buggy source:
@Override public boolean resolve(IContext context){
  if (!this.type.isResolved()) {
    return false;
  }
  MethodMatch match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    this.isCustom=true;
    return true;
  }
  match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  if (!this.type.isResolved()) {
    return false;
  }
  MethodMatch match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    this.isCustom=true;
    return true;
  }
  match=this.type.resolveMethod(null,"String_Node_Str",this.arguments);
  if (match != null) {
    this.method=match.theMethod;
    return true;
  }
  return false;
}