nus-yam/ex-repair huggingface dataset:
Program: 83938
Project: 83938
Buggy source:
public static void writePrimitiveCast(PrimitiveType value,PrimitiveType cast,MethodWriter writer){
switch (value.typecode) {
case Opcodes.T_BYTE:
case Opcodes.T_SHORT:
case Opcodes.T_BOOLEAN:
case Opcodes.T_CHAR:
case Opcodes.T_INT:
    writeIntCast(cast,writer);
  break;
case Opcodes.T_LONG:
writeLongCast(cast,writer);
break;
case Opcodes.T_FLOAT:
writeFloatCast(cast,writer);
break;
case Opcodes.T_DOUBLE:
writeDoubleCast(cast,writer);
break;
}
}

Fixed version (ground truth):
public static void writePrimitiveCast(IType value,PrimitiveType cast,MethodWriter writer){
  IClass iclass=value.getTheClass();
  if (iclass == Type.BYTE_CLASS || iclass == Type.SHORT_CLASS || iclass == Type.CHAR_CLASS || iclass == Type.INT_CLASS) {
    writeIntCast(cast,writer);
    return;
  }
  if (iclass == Type.LONG_CLASS) {
    writeLongCast(cast,writer);
    return;
  }
  if (iclass == Type.FLOAT_CLASS) {
    writeFloatCast(cast,writer);
    return;
  }
  if (iclass == Type.DOUBLE_CLASS) {
    writeDoubleCast(cast,writer);
    return;
  }
}
Program: 83939
Project: 83939
Buggy source:
public static @infix @inline <K,V>void $plus$eq(Map<K,V> map,K key,V value){
  map.put(key,value);
}

Fixed version (ground truth):
public static @infix @inline <K,V>void $plus$eq(Map<K,V> map,Tuple2<K,V> tuple){
  map.put(tuple._1,tuple._2);
}
Program: 83940
Project: 83940
Buggy source:
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (type instanceof ITypeVariable) {
    if (type.isSuperTypeOf(this)) {
      if (this.arrayDimensions > 0) {
        typeVariables.put(type.getQualifiedName(),this.getArrayType(this.arrayDimensions - type.getArrayDimensions()));
      }
 else {
        typeVariables.put(type.getQualifiedName(),this);
      }
    }
  }
 else   if (type instanceof GenericType) {
    List<IType> types=((GenericType)type).generics;
    int len=Math.min(this.generics.size(),types.size());
    for (int i=0; i < len; i++) {
      IType t1=types.get(i);
      IType t2=this.generics.get(i);
      System.out.println(t1 + "String_Node_Str" + t2);
      t1.addTypeVariables(t2,typeVariables);
      t2.addTypeVariables(t1,typeVariables);
    }
  }
}

Fixed version (ground truth):
@Override public void addTypeVariables(IType type,Map<String,IType> typeVariables){
  if (type instanceof ITypeVariable) {
    if (type.isSuperTypeOf(this)) {
      if (this.arrayDimensions > 0) {
        typeVariables.put(type.getQualifiedName(),this.getArrayType(this.arrayDimensions - type.getArrayDimensions()));
      }
 else {
        typeVariables.put(type.getQualifiedName(),this);
      }
    }
  }
  if (this.generics != null) {
    if (type instanceof GenericType) {
      List<IType> types=((GenericType)type).generics;
      int len=Math.min(this.generics.size(),types.size());
      for (int i=0; i < len; i++) {
        IType t1=types.get(i);
        IType t2=this.generics.get(i);
        t1.addTypeVariables(t2,typeVariables);
        t2.addTypeVariables(t1,typeVariables);
      }
    }
    List<ITypeVariable> variables=this.theClass.getTypeVariables();
    if (variables != null) {
      int len=Math.min(this.generics.size(),variables.size());
      for (int i=0; i < len; i++) {
        ITypeVariable var=variables.get(i);
        IType type1=this.generics.get(i);
        typeVariables.put(var.getQualifiedName(),type);
      }
    }
  }
}
Program: 83941
Project: 83941
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,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);
  }
}

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)) {
      f.writeGet(writer,null);
      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: 83942
Project: 83942
Buggy source:
public default IValue withType(IType type){
  IType type1=this.getType();
  if (type1 == null) {
    return null;
  }
  boolean primitive=type1.isPrimitive();
  if (primitive != type.isPrimitive()) {
    if (!Type.isSuperType(type,type1)) {
      return null;
    }
    if (primitive) {
      return type1.box(this);
    }
 else {
      return type.unbox(this);
    }
  }
  if (Type.isSuperType(type,type1)) {
    return this;
  }
  return null;
}

Fixed version (ground truth):
public default IValue withType(IType type){
  IType type1=this.getType();
  if (type1 == null) {
    return null;
  }
  boolean primitive=this.isPrimitive();
  if (primitive != type.isPrimitive()) {
    if (!Type.isSuperType(type,type1)) {
      return null;
    }
    if (primitive) {
      return type1.box(this);
    }
 else {
      return type.unbox(this);
    }
  }
  if (Type.isSuperType(type,type1)) {
    return this;
  }
  return null;
}
Program: 83944
Project: 83944
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.elseThen != null) {
    this.condition.writeJump(writer,this.elseStart);
    this.then.writeStatement(writer);
    writer.visitJumpInsn(Opcodes.GOTO,this.elseEnd);
    writer.visitLabel(this.elseStart);
    this.elseThen.writeStatement(writer);
    writer.visitLabel(this.elseEnd);
  }
 else {
    this.condition.writeJump(writer,this.elseStart);
    this.then.writeStatement(writer);
    writer.visitLabel(this.elseStart);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.elseThen != null) {
    this.condition.writeJump(writer,this.elseStart);
    this.then.writeStatement(writer);
    writer.visitJumpInsn(Opcodes.GOTO,this.elseEnd);
    writer.visitLabel(this.elseStart);
    this.elseThen.writeStatement(writer);
    writer.visitLabel(this.elseEnd,this.parent == null || this.parent.canVisitStack(this));
  }
 else {
    this.condition.writeJump(writer,this.elseStart);
    this.then.writeStatement(writer);
    writer.visitLabel(this.elseStart,this.parent == null || this.parent.canVisitStack(this));
  }
}
Program: 83945
Project: 83945
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  this.condition.writeJump(writer,this.elseStart);
  this.then.writeExpression(writer);
  writer.pop();
  writer.visitJumpInsn(Opcodes.GOTO,this.elseEnd);
  writer.visitLabel(this.elseStart);
  if (this.elseThen == null) {
    this.commonType.writeDefaultValue(writer);
  }
 else {
    this.elseThen.writeExpression(writer);
  }
  writer.visitLabel(this.elseEnd);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  this.condition.writeJump(writer,this.elseStart);
  this.then.writeExpression(writer);
  writer.pop();
  writer.visitJumpInsn(Opcodes.GOTO,this.elseEnd);
  writer.visitLabel(this.elseStart);
  if (this.elseThen == null) {
    this.commonType.writeDefaultValue(writer);
  }
 else {
    this.elseThen.writeExpression(writer);
  }
  writer.visitLabel(this.elseEnd,this.parent == null || this.parent.canVisitStack(this));
}
Program: 83946
Project: 83946
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  writer.visitLabel2(this.start);
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.addLocal(var.index,var.type);
  }
  String label;
  for (  IValue v : this.values) {
    if (this.valueLabels != null && (label=this.valueLabels.get(v)) != null) {
      writer.visitLabel(this.labels.get(label));
    }
    v.writeStatement(writer);
  }
  writer.visitLabel2(this.end);
  int count=0;
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.start,this.end,var.index);
    count++;
  }
  writer.removeLocals(count);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  writer.visitLabel(this.start,false);
  int count=0;
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.addLocal(var.index,var.type);
    count++;
  }
  String label;
  for (  IValue v : this.values) {
    if (this.valueLabels != null && (label=this.valueLabels.get(v)) != null) {
      writer.visitLabel(this.labels.get(label));
    }
    v.writeStatement(writer);
  }
  writer.removeLocals(count);
  writer.visitLabel(this.end,count > 0 && (this.parent == null || this.parent.canVisitStack(this)));
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.start,this.end,var.index);
  }
}
Program: 83947
Project: 83947
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,this.parent == null || this.parent.canVisitStack(this));
}
Program: 83948
Project: 83948
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.condition.resolveTypes(markers,context);
  if (this.then.isStatement()) {
    ((IStatement)this.then).setParent(this);
    this.then.resolveTypes(markers,context);
  }
 else   if (this.then != null) {
    this.then.resolveTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.condition.resolveTypes(markers,context);
  if (this.then != null) {
    if (this.then.isStatement()) {
      ((IStatement)this.then).setParent(this);
      this.then.resolveTypes(markers,context);
    }
 else {
      this.then.resolveTypes(markers,context);
    }
  }
}
Program: 83950
Project: 83950
Buggy source:
@Override public void visitJumpInsn(int opcode,Label label){
  if (opcode >= IFEQ && opcode <= IFLE) {
    this.visitFrame();
    this.pop();
  }
  if (opcode >= IF_ICMPEQ && opcode <= IF_ICMPLE) {
    this.visitFrame();
    this.stackIndex-=2;
    this.stackCount-=2;
  }
  this.stackChanged=true;
  this.mv.visitJumpInsn(opcode,label);
}

Fixed version (ground truth):
@Override public void visitJumpInsn(int opcode,Label label){
  if (opcode >= IFEQ && opcode <= IFLE) {
    this.visitFrame();
    this.pop();
  }
  if (opcode >= IF_ICMPEQ && opcode <= IF_ICMPLE) {
    this.visitFrame();
    this.stackIndex-=2;
    this.stackCount-=2;
  }
  this.mv.visitJumpInsn(opcode,label);
}
Program: 83951
Project: 83951
Buggy source:
public void pop(){
  this.stackChanged=true;
  this.stackIndex--;
  this.stackCount--;
}

Fixed version (ground truth):
public void pop(){
  this.stackIndex--;
  this.stackCount--;
}
Program: 83952
Project: 83952
Buggy source:
@Override public void visitLabel(Label label){
  if (this.stackChanged) {
    this.visitFrame();
    this.stackChanged=false;
  }
  this.mv.visitLabel(label);
}

Fixed version (ground truth):
public void visitLabel(Label label,boolean stack){
  if (stack) {
    this.visitFrame();
  }
  this.mv.visitLabel(label);
}
Program: 83953
Project: 83953
Buggy source:
public void push(IType type){
  Object frameType=type.getFrameType();
  if (frameType != null) {
    this.ensureStack(this.stackIndex + 1);
    this.stackChanged=true;
    this.stack[this.stackIndex++]=type;
  }
}

Fixed version (ground truth):
public void push(IType type){
  Object frameType=type.getFrameType();
  if (frameType != null) {
    this.ensureStack(this.stackIndex + 1);
    this.stack[this.stackIndex++]=type;
  }
}
Program: 83954
Project: 83954
Buggy source:
@Override public void visitInsn(int opcode){
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
 else   if (opcode >= IASTORE && opcode <= SASTORE) {
    this.stackIndex-=3;
    this.stackCount-=3;
    this.stackChanged=true;
  }
 else   if (opcode >= IRETURN && opcode <= ARETURN) {
    this.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.stackIndex-=3;
    this.stackCount-=3;
  }
 else   if (opcode >= IRETURN && opcode <= ARETURN) {
    this.pop();
  }
 else {
    this.processInsn(opcode);
  }
  this.mv.visitInsn(opcode);
}
Program: 83955
Project: 83955
Buggy source:
public void visitJumpInsn2(int opcode,Label label){
  if (opcode >= IFEQ && opcode <= IFLE) {
    this.pop();
  }
  if (opcode >= IF_ICMPEQ && opcode <= IF_ICMPLE) {
    this.stackIndex-=2;
    this.stackCount-=2;
  }
  this.stackChanged=true;
  this.mv.visitJumpInsn(opcode,label);
}

Fixed version (ground truth):
public void visitJumpInsn2(int opcode,Label label){
  if (opcode >= IFEQ && opcode <= IFLE) {
    this.pop();
  }
  if (opcode >= IF_ICMPEQ && opcode <= IF_ICMPLE) {
    this.stackIndex-=2;
    this.stackCount-=2;
  }
  this.mv.visitJumpInsn(opcode,label);
}
Program: 83956
Project: 83956
Buggy source:
@Override public void writeStatement(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);
    f.writeSet(writer);
  }
 else   if (i == APPLY_METHOD_CALL) {
    ApplyMethodCall call=(ApplyMethodCall)this.instance;
    call.instance.writeExpression(writer);
    writer.visitInsn(Opcodes.DUP);
    call.method.writeCall(writer,null,call.arguments);
    this.method.writeCall(writer,null,this.arguments);
    this.updateMethod.writeCall(writer,null,call.arguments);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(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);
    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);
    this.updateMethod.writeCall(writer,null,Util.EMPTY_VALUES);
  }
}
Program: 83957
Project: 83957
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);
    writer.visitInsn(Opcodes.SWAP);
    f.writeSet(writer);
  }
 else   if (i == APPLY_METHOD_CALL) {
    ApplyMethodCall call=(ApplyMethodCall)this.instance;
    call.writeExpression(writer);
    writer.visitInsn(Opcodes.DUP);
    this.method.writeCall(writer,null,this.arguments);
    this.updateMethod.writeCall(writer,call,call.arguments);
  }
}

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);
    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);
  }
}
Program: 83958
Project: 83958
Buggy source:
@Override public Package resolvePackage(String name){
  return null;
}

Fixed version (ground truth):
@Override public Package resolvePackage(String name){
  return this.unit.resolvePackage(name);
}
Program: 83959
Project: 83959
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  writer.visitLabel(this.start,false);
  int count=0;
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.addLocal(var.index,var.type);
    count++;
  }
  String label;
  for (  IValue v : this.values) {
    if (this.valueLabels != null && (label=this.valueLabels.get(v)) != null) {
      writer.visitLabel(this.labels.get(label));
    }
    v.writeStatement(writer);
  }
  writer.removeLocals(count);
  writer.visitLabel(this.end,count > 0 && (this.parent == null || this.parent.canVisitStack(this)));
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.start,this.end,var.index);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  writer.visitLabel(this.start,false);
  int count=0;
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.addLocal(var.index,var.type);
    count++;
  }
  String label;
  for (  IValue v : this.values) {
    if (this.valueLabels != null && (label=this.valueLabels.get(v)) != null) {
      writer.visitLabel(this.labels.get(label));
    }
    v.writeStatement(writer);
  }
  if (this.parent != null || !(this.context instanceof IMethod)) {
    writer.removeLocals(count);
    writer.visitLabel(this.end,count > 0 && (this.parent == null || this.parent.canVisitStack(this)));
  }
 else   if (!writer.hasReturn) {
    writer.visitInsn(this.requiredType.getReturnOpcode());
  }
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.visitLocalVariable(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),this.start,this.end,var.index);
  }
}
Program: 83960
Project: 83960
Buggy source:
public void tokenize(){
  this.tokens=DyvilCompiler.parser.tokenize(this.inputFile);
}

Fixed version (ground truth):
public void tokenize(){
  Dlex lexer=new Dlex(this.inputFile);
  lexer.tokenize();
  this.tokens=lexer.iterator();
}
Program: 83962
Project: 83962
Buggy source:
public void push(IType type){
  Object frameType=type.getFrameType();
  if (frameType != null) {
    this.ensureStack(this.stackIndex + 1);
    this.stack[this.stackIndex++]=type;
  }
}

Fixed version (ground truth):
public void push(IType type){
  Object frameType=type.getFrameType();
  if (frameType != null) {
    this.ensureStack(this.stackIndex + 1);
    this.stack[this.stackIndex++]=frameType;
  }
}
Program: 83963
Project: 83963
Buggy source:
public final void parse(CodeFile file,TokenIterator tokens){
  IToken token=null;
  this.tokens=tokens;
  try {
    IToken prev=null;
    while (tokens.hasNext()) {
      token=tokens.next();
      if (!this.retainToken((Token)token,prev)) {
        tokens.remove();
      }
      prev=token;
    }
    int index=0;
    tokens.reset();
    while (tokens.hasNext()) {
      token=tokens.next();
      token.setIndex(index);
      token.setPrev(prev);
      index++;
      prev=token;
    }
    tokens.reset();
    while (tokens.hasNext()) {
      token=this.currentToken=tokens.next();
      if (this.skip > 0) {
        this.skip--;
        continue;
      }
      Parser parser=this.currentParser;
      try {
        this.parseToken(parser,token);
      }
 catch (      SyntaxError ex) {
        if (this.jumpBackToken != null) {
          tokens.jump(this.jumpBackToken);
          this.popParser();
          this.jumpBackToken=null;
        }
 else {
          this.file.markers.add(ex);
        }
      }
      if (DyvilCompiler.parseStack) {
        System.out.println(token + "String_Node_Str" + parser.name+ "String_Node_Str"+ parser.mode);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
public final void parse(CodeFile file,TokenIterator tokens){
  IToken token=null;
  this.tokens=tokens;
  this.file=file;
  try {
    IToken prev=null;
    while (tokens.hasNext()) {
      token=tokens.next();
      if (!this.retainToken((Token)token,prev)) {
        tokens.remove();
      }
      prev=token;
    }
    int index=0;
    tokens.reset();
    while (tokens.hasNext()) {
      token=tokens.next();
      token.setIndex(index);
      token.setPrev(prev);
      index++;
      prev=token;
    }
    tokens.reset();
    while (tokens.hasNext()) {
      token=this.currentToken=tokens.next();
      if (this.skip > 0) {
        this.skip--;
        continue;
      }
      Parser parser=this.currentParser;
      try {
        this.parseToken(parser,token);
      }
 catch (      SyntaxError ex) {
        if (this.jumpBackToken != null) {
          tokens.jump(this.jumpBackToken);
          this.popParser();
          this.jumpBackToken=null;
        }
 else {
          this.file.markers.add(ex);
        }
      }
      if (DyvilCompiler.parseStack) {
        System.out.println(token + "String_Node_Str" + parser.name+ "String_Node_Str"+ parser.mode);
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}
Program: 83964
Project: 83964
Buggy source:
public void resolveTypes(List<Marker> markers,IContext context){
  this.type=this.type.resolve(context);
  if (!this.type.isResolved()) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
  for (  Entry<String,IValue> entry : this.parameters.entrySet()) {
    entry.getValue().resolveTypes(markers,context);
  }
}

Fixed version (ground truth):
public void resolveTypes(List<Marker> markers,IContext context){
  this.type=this.type.resolve(context);
  if (!this.type.isResolved() && markers != null) {
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
  }
  for (  Entry<String,IValue> entry : this.parameters.entrySet()) {
    entry.getValue().resolveTypes(markers,context);
  }
}
Program: 83965
Project: 83965
Buggy source:
@Override public IClass resolveClass(String name){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  IClass clazz=this.body.getClass(name);
  if (clazz != null) {
    return clazz;
  }
  return null;
}

Fixed version (ground truth):
@Override public IClass resolveClass(String name){
  if (!this.typesResolved) {
    this.resolveTypes(null,Package.rootPackage);
  }
  if (this.generics != null) {
    for (    ITypeVariable var : this.generics) {
      if (var.isName(name)) {
        return var.getTheClass();
      }
    }
  }
  IClass clazz=this.body.getClass(name);
  if (clazz != null) {
    return clazz;
  }
  return null;
}
Program: 83966
Project: 83966
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.typesResolved=true;
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  for (  Annotation a : this.annotations) {
    a.resolveTypes(markers,Package.rootPackage);
  }
  this.body.resolveTypes(markers,Package.rootPackage);
  if (this.outerType != null) {
    this.outerClass=this.outerType.resolve(context).getTheClass();
  }
  if (this.innerTypes != null) {
    for (    IType t : this.innerTypes) {
      IClass iclass=t.resolve(context).getTheClass();
      this.body.addClass(iclass);
    }
    this.innerTypes=null;
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.typesResolved=true;
  if (this.generics != null) {
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
    }
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,context);
    }
  }
  this.body.resolveTypes(markers,this);
  if (this.outerType != null) {
    this.outerClass=this.outerType.resolve(context).getTheClass();
  }
  if (this.innerTypes != null) {
    for (    IType t : this.innerTypes) {
      IClass iclass=t.resolve(context).getTheClass();
      this.body.addClass(iclass);
    }
    this.innerTypes=null;
  }
}
Program: 83967
Project: 83967
Buggy source:
@Override public void resolve(List<Marker> markers,IContext context){
  for (Iterator<Annotation> iterator=this.annotations.iterator(); iterator.hasNext(); ) {
    Annotation a=iterator.next();
    if (this.processAnnotation(a)) {
      iterator.remove();
      continue;
    }
    a.resolve(markers,context);
  }
  if ((this.modifiers & Modifiers.OBJECT_CLASS) != 0) {
    this.instanceField=new Field(this,"String_Node_Str",this.getType(),Modifiers.PUBLIC | Modifiers.CONST | Modifiers.SYNTHETIC,Collections.EMPTY_LIST);
  }
  if (this.body != null) {
    this.body.resolve(markers,this);
  }
}

Fixed version (ground truth):
@Override public void resolve(List<Marker> markers,IContext context){
  if (this.annotations != null) {
    Iterator<Annotation> iterator=this.annotations.iterator();
    while (iterator.hasNext()) {
      Annotation a=iterator.next();
      if (this.processAnnotation(a)) {
        iterator.remove();
        continue;
      }
      a.resolve(markers,context);
    }
  }
  if ((this.modifiers & Modifiers.OBJECT_CLASS) != 0) {
    this.instanceField=new Field(this,"String_Node_Str",this.getType(),Modifiers.PUBLIC | Modifiers.CONST | Modifiers.SYNTHETIC,Collections.EMPTY_LIST);
  }
  if (this.body != null) {
    this.body.resolve(markers,this);
  }
}
Program: 83970
Project: 83970
Buggy source:
@Override public void addAnnotation(Annotation annotation){
  if (!this.processAnnotation(annotation)) {
    annotation.target=ElementType.TYPE;
    this.annotations.add(annotation);
  }
}

Fixed version (ground truth):
@Override public void addAnnotation(Annotation annotation){
  if (!this.processAnnotation(annotation)) {
    annotation.target=ElementType.TYPE;
    if (this.annotations == null) {
      this.annotations=new ArrayList(2);
    }
    this.annotations.add(annotation);
  }
}
Program: 83971
Project: 83971
Buggy source:
@Override public Annotation getAnnotation(IType type){
  for (  Annotation a : this.annotations) {
    if (a.type.classEquals(type)) {
      return a;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Annotation getAnnotation(IType type){
  if (this.annotations == null) {
    return null;
  }
  for (  Annotation a : this.annotations) {
    if (a.type.classEquals(type)) {
      return a;
    }
  }
  return null;
}
Program: 83972
Project: 83972
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.generics != null) {
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
    }
  }
  for (  Annotation a : this.annotations) {
    a.resolveTypes(markers,this);
  }
  if (this.body != null) {
    this.body.resolveTypes(markers,this);
    for (    IMethod m : this.body.methods) {
      if (m.isName("String_Node_Str")) {
        return;
      }
    }
  }
  Method constructor=new Method(this);
  constructor.setName("String_Node_Str","String_Node_Str");
  constructor.setType(Type.VOID);
  constructor.setModifiers(Modifiers.PUBLIC | Modifiers.SYNTHETIC);
  this.constructor=constructor;
  if (this.superType != null) {
    MethodMatch match=this.superType.resolveConstructor(Util.EMPTY_VALUES);
    if (match != null) {
      this.superConstructor=match.theMethod;
    }
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.generics != null) {
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
    }
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,this);
    }
  }
  if (this.body != null) {
    this.body.resolveTypes(markers,this);
    for (    IMethod m : this.body.methods) {
      if (m.isName("String_Node_Str")) {
        return;
      }
    }
  }
  Method constructor=new Method(this);
  constructor.setName("String_Node_Str","String_Node_Str");
  constructor.setType(Type.VOID);
  constructor.setModifiers(Modifiers.PUBLIC | Modifiers.SYNTHETIC);
  this.constructor=constructor;
  if (this.superType != null) {
    MethodMatch match=this.superType.resolveConstructor(Util.EMPTY_VALUES);
    if (match != null) {
      this.superConstructor=match.theMethod;
    }
  }
}
Program: 83973
Project: 83973
Buggy source:
@Override public void foldConstants(){
  for (  Annotation a : this.annotations) {
    a.foldConstants();
  }
  if (this.body != null) {
    this.body.foldConstants();
  }
}

Fixed version (ground truth):
@Override public void foldConstants(){
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.foldConstants();
    }
  }
  if (this.body != null) {
    this.body.foldConstants();
  }
}
Program: 83974
Project: 83974
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  for (  Annotation annotation : this.annotations) {
    buffer.append(prefix);
    annotation.toString(prefix,buffer);
    buffer.append('\n');
  }
  buffer.append(prefix).append(Modifiers.CLASS.toString(this.modifiers));
  buffer.append(Modifiers.CLASS_TYPE.toString(this.modifiers)).append(this.name);
  if (this.generics != null && !this.generics.isEmpty()) {
    buffer.append('[');
    Util.astToString(this.generics,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  if (this.superType == null) {
    buffer.append("String_Node_Str");
  }
 else   if (this.superType != Type.OBJECT) {
    buffer.append("String_Node_Str");
    this.superType.toString("String_Node_Str",buffer);
  }
  if (!this.interfaces.isEmpty()) {
    buffer.append("String_Node_Str");
    Util.astToString(this.interfaces,Formatting.Class.superClassesSeperator,buffer);
  }
  if (this.body != null) {
    buffer.append('\n');
    this.body.toString(prefix,buffer);
  }
 else {
    buffer.append(';');
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.annotations != null) {
    for (    Annotation annotation : this.annotations) {
      buffer.append(prefix);
      annotation.toString(prefix,buffer);
      buffer.append('\n');
    }
  }
  buffer.append(prefix).append(Modifiers.CLASS.toString(this.modifiers));
  buffer.append(Modifiers.CLASS_TYPE.toString(this.modifiers)).append(this.name);
  if (this.generics != null && !this.generics.isEmpty()) {
    buffer.append('[');
    Util.astToString(this.generics,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  if (this.superType == null) {
    buffer.append("String_Node_Str");
  }
 else   if (this.superType != Type.OBJECT) {
    buffer.append("String_Node_Str");
    this.superType.toString("String_Node_Str",buffer);
  }
  if (!this.interfaces.isEmpty()) {
    buffer.append("String_Node_Str");
    Util.astToString(this.interfaces,Formatting.Class.superClassesSeperator,buffer);
  }
  if (this.body != null) {
    buffer.append('\n');
    this.body.toString(prefix,buffer);
  }
 else {
    buffer.append(';');
  }
}
Program: 83975
Project: 83975
Buggy source:
@Override public void addAnnotation(Annotation annotation){
  if (!this.processAnnotation(annotation)) {
    annotation.target=ElementType.FIELD;
    this.annotations.add(annotation);
  }
}

Fixed version (ground truth):
@Override public void addAnnotation(Annotation annotation){
  if (!this.processAnnotation(annotation)) {
    annotation.target=ElementType.FIELD;
    if (this.annotations == null) {
      this.annotations=new ArrayList(2);
    }
    this.annotations.add(annotation);
  }
}
Program: 83976
Project: 83976
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  for (  Annotation a : this.annotations) {
    a.resolveTypes(markers,context);
  }
  this.type=this.type.resolve(context);
  if (!this.type.isResolved()) {
    markers.add(Markers.create(this.type.getPosition(),"String_Node_Str",this.type.toString()));
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.type=this.type.resolve(context);
  if (!this.type.isResolved()) {
    markers.add(Markers.create(this.type.getPosition(),"String_Node_Str",this.type.toString()));
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,context);
    }
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,context);
  }
}
Program: 83977
Project: 83977
Buggy source:
@Override public void write(ClassWriter writer){
  if ((this.modifiers & Modifiers.LAZY) == Modifiers.LAZY) {
    String desc="String_Node_Str" + this.getDescription();
    String signature=this.type.getSignature();
    if (signature != null) {
      signature="String_Node_Str" + signature;
    }
    MethodWriter mw=new MethodWriter(writer,writer.visitMethod(this.modifiers & Modifiers.METHOD_MODIFIERS,this.name,desc,signature,null));
    for (    Annotation a : this.annotations) {
      a.write(mw);
    }
    mw.visitAnnotation("String_Node_Str",false);
    mw.visitCode();
    this.value.writeExpression(mw);
    mw.visitEnd(this.type);
    return;
  }
  FieldVisitor fv=writer.visitField(this.modifiers & 0xFFFF,this.name,this.getDescription(),this.type.getSignature(),null);
  if ((this.modifiers & Modifiers.SEALED) != 0) {
    fv.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.DEPRECATED) != 0) {
    fv.visitAnnotation("String_Node_Str",true);
  }
  for (  Annotation a : this.annotations) {
    a.write(fv);
  }
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  if ((this.modifiers & Modifiers.LAZY) == Modifiers.LAZY) {
    String desc="String_Node_Str" + this.getDescription();
    String signature=this.type.getSignature();
    if (signature != null) {
      signature="String_Node_Str" + signature;
    }
    MethodWriter mw=new MethodWriter(writer,writer.visitMethod(this.modifiers & Modifiers.METHOD_MODIFIERS,this.name,desc,signature,null));
    for (    Annotation a : this.annotations) {
      a.write(mw);
    }
    mw.visitAnnotation("String_Node_Str",false);
    mw.visitCode();
    this.value.writeExpression(mw);
    mw.visitEnd(this.type);
    return;
  }
  FieldVisitor fv=writer.visitField(this.modifiers & 0xFFFF,this.name,this.getDescription(),this.type.getSignature(),null);
  if ((this.modifiers & Modifiers.SEALED) != 0) {
    fv.visitAnnotation("String_Node_Str",false);
  }
  if ((this.modifiers & Modifiers.DEPRECATED) != 0) {
    fv.visitAnnotation("String_Node_Str",true);
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.write(fv);
    }
  }
}
Program: 83978
Project: 83978
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  for (  Annotation a : this.annotations) {
    a.toString(prefix,buffer);
    buffer.append(' ');
  }
  this.type.toString("String_Node_Str",buffer);
  if (this.isVarargs()) {
    int len=buffer.length();
    buffer.replace(len - 2,len,"String_Node_Str");
  }
  buffer.append(' ').append(this.name);
  if (this.defaultValue != null) {
    buffer.append(Formatting.Field.keyValueSeperator).append(' ');
    this.defaultValue.toString(prefix,buffer);
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.toString(prefix,buffer);
      buffer.append(' ');
    }
  }
  this.type.toString("String_Node_Str",buffer);
  if (this.isVarargs()) {
    int len=buffer.length();
    buffer.replace(len - 2,len,"String_Node_Str");
  }
  buffer.append(' ').append(this.name);
  if (this.defaultValue != null) {
    buffer.append(Formatting.Field.keyValueSeperator).append(' ');
    this.defaultValue.toString(prefix,buffer);
  }
}
Program: 83979
Project: 83979
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.type=this.type.resolve(context);
  if (!this.type.isResolved()) {
    markers.add(Markers.create(this.type.getPosition(),"String_Node_Str",this.type.toString()));
  }
  for (  Annotation a : this.annotations) {
    a.resolveTypes(markers,context);
  }
  if (this.defaultValue != null) {
    this.defaultValue.resolveTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.type=this.type.resolve(context);
  if (!this.type.isResolved() && markers != null) {
    markers.add(Markers.create(this.type.getPosition(),"String_Node_Str",this.type.toString()));
  }
  if (this.annotations != null) {
    for (    Annotation a : this.annotations) {
      a.resolveTypes(markers,context);
    }
  }
  if (this.defaultValue != null) {
    this.defaultValue.resolveTypes(markers,context);
  }
}
Program: 83980
Project: 83980
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context,boolean isStatic){
  if (isStatic && this.child == null) {
    FieldMatch field=context.resolveField(this.name);
    if (field != null) {
      this.field=field;
      return;
    }
    this.methods=new ArrayList();
    context.getMethodMatches(this.methods,null,this.name,null);
    if (!this.methods.isEmpty()) {
      Collections.sort(this.methods);
      return;
    }
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    return;
  }
  Package pack=context.resolvePackage(this.name);
  if (pack != null) {
    this.thePackage=pack;
    if (this.child != null) {
      this.child.resolveTypes(markers,pack,isStatic);
    }
    return;
  }
  IClass iclass=context.resolveClass(this.name);
  if (iclass != null) {
    this.theClass=iclass;
    if (this.child != null) {
      this.child.resolveTypes(markers,iclass,isStatic);
    }
    return;
  }
  markers.add(Markers.create(this.position,"String_Node_Str",this.name));
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context,boolean isStatic){
  if (isStatic && this.child == null) {
    if (!(context instanceof IClass)) {
      markers.add(Markers.create(this.position,"String_Node_Str"));
      return;
    }
    FieldMatch field=context.resolveField(this.name);
    if (field != null) {
      this.field=field;
      return;
    }
    this.methods=new ArrayList();
    context.getMethodMatches(this.methods,null,this.name,null);
    if (!this.methods.isEmpty()) {
      Collections.sort(this.methods);
      return;
    }
    markers.add(Markers.create(this.position,"String_Node_Str",this.name));
    return;
  }
  Package pack=context.resolvePackage(this.name);
  if (pack != null) {
    this.thePackage=pack;
    if (this.child != null) {
      this.child.resolveTypes(markers,pack,isStatic);
    }
    return;
  }
  IClass iclass=context.resolveClass(this.name);
  if (iclass != null) {
    this.theClass=iclass;
    if (this.child != null) {
      this.child.resolveTypes(markers,iclass,isStatic);
    }
    return;
  }
  markers.add(Markers.create(this.position,"String_Node_Str",this.name));
}
Program: 83981
Project: 83981
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: 83982
Project: 83982
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: 83983
Project: 83983
Buggy source:
@Override public void writeStatement(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);
    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);
    this.updateMethod.writeCall(writer,null,Util.EMPTY_VALUES);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(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);
    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);
    this.updateMethod.writeCall(writer,null,Util.EMPTY_VALUES);
  }
}