nus-yam/ex-repair huggingface dataset:
Program: 85090
Project: 85090
Buggy source:
@Override public void writeCall(MethodWriter writer,IValue instance,IArguments arguments,IType type){
  if (instance != null && (this.modifiers & Modifiers.STATIC) != 0 && instance.getValueType() == IValue.CLASS_ACCESS) {
    instance=null;
  }
  if (this.intrinsicOpcodes != null && (instance == null || instance.isPrimitive())) {
    if (this.type.getTheClass() == Types.BOOLEAN_CLASS) {
      Label ifEnd=new Label();
      Label elseEnd=new Label();
      this.writeIntrinsic(writer,ifEnd,instance,arguments);
      writer.writeLDC(0);
      writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
      writer.writeLabel(ifEnd);
      writer.writeLDC(1);
      writer.writeLabel(elseEnd);
      return;
    }
    this.writeIntrinsic(writer,instance,arguments);
    return;
  }
  if ((this.modifiers & Modifiers.INLINE) != 0) {
    this.writeInline(writer,instance,arguments);
    return;
  }
  this.writeInvoke(writer,instance,arguments);
  if (type == Types.VOID) {
    if (this.type != Types.VOID) {
      writer.writeInsn(Opcodes.POP);
    }
    return;
  }
  if (type != null) {
    if (type != this.type && !type.isSuperTypeOf(this.type)) {
      writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
    }
  }
}

Fixed version (ground truth):
@Override public void writeCall(MethodWriter writer,IValue instance,IArguments arguments,IType type){
  if (instance != null && (this.modifiers & Modifiers.STATIC) != 0 && instance.getValueType() == IValue.CLASS_ACCESS) {
    instance=null;
  }
  if (this.intrinsicOpcodes != null && (instance == null || instance.isPrimitive())) {
    if (this.type.getTheClass() == Types.BOOLEAN_CLASS) {
      Label ifEnd=new Label();
      Label elseEnd=new Label();
      this.writeIntrinsic(writer,ifEnd,instance,arguments);
      writer.writeLDC(0);
      writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
      writer.writeLabel(ifEnd);
      writer.writeLDC(1);
      writer.writeLabel(elseEnd);
      return;
    }
    this.writeIntrinsic(writer,instance,arguments);
    return;
  }
  if ((this.modifiers & INLINABLE) != 0 && writer.inlineOffset() == 0) {
    Label inlineEnd=new Label();
    this.writeInlineArguments(writer,instance,arguments,writer.startInline(inlineEnd));
    this.value.writeExpression(writer);
    writer.endInline(inlineEnd);
    return;
  }
  this.writeInvoke(writer,instance,arguments);
  if (type == Types.VOID) {
    if (this.type != Types.VOID) {
      writer.writeInsn(Opcodes.POP);
    }
    return;
  }
  if (type != null) {
    if (type != this.type && !type.isSuperTypeOf(this.type)) {
      writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
    }
  }
}
Program: 85091
Project: 85091
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  super.toString(prefix,buffer);
  buffer.append(ModifierTypes.METHOD.toString(this.modifiers));
  if (this.type != null) {
    this.type.toString("String_Node_Str",buffer);
    buffer.append(' ');
  }
  buffer.append(this.name);
  if (this.genericCount > 0) {
    buffer.append('[');
    Util.astToString(prefix,this.generics,this.genericCount,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  buffer.append(Formatting.Method.parametersStart);
  Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
  buffer.append(Formatting.Method.parametersEnd);
  if (this.exceptionCount > 0) {
    buffer.append(Formatting.Method.signatureThrowsSeperator);
    Util.astToString(prefix,this.exceptions,this.exceptionCount,Formatting.Method.throwsSeperator,buffer);
  }
  IValue value=this.getValue();
  if (value != null) {
    buffer.append(Formatting.Method.signatureBodySeperator);
    Formatting.appendValue(value,prefix,buffer);
  }
  buffer.append(';');
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  super.toString(prefix,buffer);
  buffer.append(ModifierTypes.METHOD.toString(this.modifiers));
  if (this.type != null) {
    this.type.toString("String_Node_Str",buffer);
    buffer.append(' ');
  }
  buffer.append(this.name);
  if (this.genericCount > 0) {
    buffer.append('[');
    Util.astToString(prefix,this.generics,this.genericCount,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  buffer.append(Formatting.Method.parametersStart);
  Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
  buffer.append(Formatting.Method.parametersEnd);
  if (this.exceptionCount > 0) {
    buffer.append(Formatting.Method.signatureThrowsSeperator);
    Util.astToString(prefix,this.exceptions,this.exceptionCount,Formatting.Method.throwsSeperator,buffer);
  }
  if (this.value != null) {
    buffer.append(Formatting.Method.signatureBodySeperator);
    this.value.toString(prefix,buffer);
  }
  buffer.append(';');
}
Program: 85092
Project: 85092
Buggy source:
@Override public boolean isType(IType type){
  if (type == Types.VOID || type == Types.UNKNOWN) {
    return true;
  }
  if (this.commonType != null) {
    return type.isSuperTypeOf(this.commonType);
  }
  if (this.then != null) {
    if (this.elseThen != null) {
      if (this.then.isType(type) && this.elseThen.isType(type)) {
        this.commonType=type;
        return true;
      }
    }
 else {
      return this.then.isType(type);
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (type == Types.VOID) {
    return true;
  }
  if (this.then != null && !this.then.isType(type)) {
    return false;
  }
  if (this.elseThen != null && !this.elseThen.isType(type)) {
    return false;
  }
  return true;
}
Program: 85093
Project: 85093
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Statements.ifStart);
  if (this.condition != null) {
    this.condition.toString(prefix,buffer);
  }
  buffer.append(Formatting.Statements.ifEnd);
  if (this.then != null) {
    Formatting.appendValue(this.then,prefix,buffer);
    if (this.elseThen != null) {
      if (this.then.isStatement()) {
        buffer.append('\n').append(prefix);
      }
 else {
        buffer.append(' ');
      }
      buffer.append(Formatting.Statements.ifElse);
      Formatting.appendValue(this.elseThen,prefix,buffer);
    }
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Statements.ifStart);
  if (this.condition != null) {
    this.condition.toString(prefix,buffer);
  }
  buffer.append(Formatting.Statements.ifEnd);
  if (this.then != null) {
    this.then.toString(prefix,buffer);
    if (this.elseThen != null) {
      if (this.then.isStatement()) {
        buffer.append('\n').append(prefix);
      }
 else {
        buffer.append(' ');
      }
      buffer.append(Formatting.Statements.ifElse);
      this.elseThen.toString(prefix,buffer);
    }
  }
}
Program: 85094
Project: 85094
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  for (int i=0; i < this.instructionCount; i++) {
    if (this.labels != null && i < this.labels.length) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
    }
    this.instructions[i].write(writer);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.labels == null) {
    for (int i=0; i < this.instructionCount; i++) {
      this.instructions[i].write(writer);
    }
    return;
  }
  for (int i=0; i < this.labels.length; i++) {
    Label l=this.labels[i];
    if (l != null) {
      l.target=new org.objectweb.asm.Label();
    }
  }
  for (int i=0; i < this.instructionCount; i++) {
    if (i < this.labels.length) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
    }
    this.instructions[i].write(writer);
  }
}
Program: 85095
Project: 85095
Buggy source:
@Override public void write(MethodWriter writer){
  writer.writeIINC(this.index,this.value);
}

Fixed version (ground truth):
@Override public void write(MethodWriter writer){
  writer.writeIINC(this.index + writer.inlineOffset(),this.value);
}
Program: 85096
Project: 85096
Buggy source:
@Override public void write(MethodWriter writer){
  writer.writeVarInsn(this.opcode,this.index);
}

Fixed version (ground truth):
@Override public void write(MethodWriter writer){
  writer.writeVarInsn(this.opcode,this.index + writer.inlineOffset());
}
Program: 85098
Project: 85098
Buggy source:
private void writeInline(MethodWriter writer,IValue instance,IArguments arguments){
  Label inlineEnd=new Label();
  int localCount=writer.registerLocal();
  writer.startInline(inlineEnd);
  if (instance != null) {
    instance.writeExpression(writer);
    writer.writeVarInsn(instance.getType().getStoreOpcode(),localCount);
  }
  this.writeInlineArguments(writer,arguments,localCount);
  this.value.writeExpression(writer);
  writer.endInline(inlineEnd);
  writer.resetLocals(localCount);
}

Fixed version (ground truth):
private void writeInline(MethodWriter writer,IValue instance,IArguments arguments){
  Label inlineEnd=new Label();
  int localCount=writer.startInline(inlineEnd);
  if (instance != null) {
    instance.writeExpression(writer);
    writer.writeVarInsn(instance.getType().getStoreOpcode(),localCount);
  }
  this.writeInlineArguments(writer,arguments,localCount);
  this.value.writeExpression(writer);
  writer.endInline(inlineEnd);
}
Program: 85099
Project: 85099
Buggy source:
@Override public void writeSet(MethodWriter writer,IValue instance,IValue value){
  value.writeExpression(writer);
  writer.writeVarInsn(this.type.getStoreOpcode(),this.index);
}

Fixed version (ground truth):
@Override public void writeSet(MethodWriter writer,IValue instance,IValue value){
  if (value != null) {
    value.writeExpression(writer);
  }
  writer.writeVarInsn(this.type.getStoreOpcode(),this.index);
}
Program: 85100
Project: 85100
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=new org.objectweb.asm.Label();
  writer.writeLabel(startLabel);
  this.action.writeStatement(writer);
  writer.writeLabel(this.conditionLabel.target);
  this.condition.writeJump(writer,startLabel);
  writer.writeLabel(this.endLabel.target);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label conditionLabel=this.conditionLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeLabel(startLabel);
  this.action.writeStatement(writer);
  writer.writeLabel(conditionLabel);
  this.condition.writeJump(writer,startLabel);
  writer.writeLabel(endLabel);
}
Program: 85101
Project: 85101
Buggy source:
public DoStatement(ICodePosition position){
  this.position=position;
  this.conditionLabel=new Label($doCondition);
  this.endLabel=new Label($doEnd);
}

Fixed version (ground truth):
public DoStatement(ICodePosition position){
  this.position=position;
  this.startLabel=new Label($doStart);
  this.conditionLabel=new Label($doCondition);
  this.endLabel=new Label($doEnd);
}
Program: 85103
Project: 85103
Buggy source:
public Label(org.objectweb.asm.Label target,Name name){
  this.target=target;
  this.name=name;
}

Fixed version (ground truth):
public Label(Name name,IValue value){
  this.name=name;
  this.value=value;
}
Program: 85104
Project: 85104
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  writer.writeLabel(this.startLabel.target);
  this.condition.writeInvJump(writer,this.endLabel.target);
  this.action.writeStatement(writer);
  writer.writeJumpInsn(Opcodes.GOTO,this.startLabel.target);
  writer.writeLabel(this.endLabel.target);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeLabel(startLabel);
  this.condition.writeInvJump(writer,endLabel);
  this.action.writeStatement(writer);
  writer.writeJumpInsn(Opcodes.GOTO,startLabel);
  writer.writeLabel(endLabel);
}
Program: 85105
Project: 85105
Buggy source:
public void startInline(Label end);

Fixed version (ground truth):
public int startInline(Label end);
Program: 85106
Project: 85106
Buggy source:
@Override public void startInline(Label end){
  this.inlineEnd=end;
}

Fixed version (ground truth):
@Override public int startInline(Label end){
  this.inlineEnd=end;
  this.inlineOffset+=this.localIndex;
  return this.localIndex;
}
Program: 85107
Project: 85107
Buggy source:
@Override public void writeLabel(Label label){
  this.mv.visitLabel(label);
}

Fixed version (ground truth):
@Override public void writeLabel(Label label){
  if (this.hasReturn && this.inlineEnd != null) {
    this.writeInlineReturn();
  }
  this.hasReturn=false;
  this.mv.visitLabel(label);
}
Program: 85108
Project: 85108
Buggy source:
@Override public void endInline(Label end){
  this.mv.visitLabel(end);
  this.inlineEnd=null;
  this.hasReturn=false;
}

Fixed version (ground truth):
@Override public void endInline(Label end){
  this.mv.visitLabel(end);
  this.inlineEnd=null;
  this.inlineOffset=this.localIndex;
  this.hasReturn=false;
}
Program: 85109
Project: 85109
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance.resolve(markers,context);
  }
  this.arguments.resolve(markers,context);
  IMethod method=IAccess.resolveMethod(context,this.instance,this.name,this.arguments);
  if (method != null) {
    this.method=method;
    return this;
  }
  Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.instance.getType());
  StringBuilder builder=new StringBuilder("String_Node_Str");
  Util.typesToString("String_Node_Str",this.arguments,"String_Node_Str",builder);
  marker.addInfo(builder.append('}').toString());
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance.resolve(markers,context);
  }
  this.arguments.resolve(markers,context);
  IMethod method=IAccess.resolveMethod(context,this.instance,this.name,this.arguments);
  if (method != null) {
    this.method=method;
    return this;
  }
  Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.instance.getType());
  StringBuilder builder=new StringBuilder("String_Node_Str");
  Util.typesToString("String_Node_Str",this.arguments,"String_Node_Str",builder);
  marker.addInfo(builder.toString());
  return this;
}
Program: 85110
Project: 85110
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  this.variable.writeSet(writer,null,null);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  this.variable.index=writer.registerLocal();
  this.variable.writeSet(writer,null,null);
}
Program: 85111
Project: 85111
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  this.variable.value.writeExpression(writer);
  writer.writeInsn(Opcodes.DUP);
  this.variable.writeSet(writer,null,null);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
}
Program: 85112
Project: 85112
Buggy source:
@Override public void writeSet(MethodWriter writer,IValue instance,IValue value){
  if (value != null) {
    value.writeExpression(writer);
  }
  if (this.index == -1) {
    writer.writeVarInsn(this.type.getStoreOpcode(),this.index=writer.registerLocal());
  }
 else {
    writer.writeVarInsn(this.type.getStoreOpcode(),this.index);
  }
}

Fixed version (ground truth):
@Override public void writeSet(MethodWriter writer,IValue instance,IValue value){
  if (value != null) {
    value.writeExpression(writer);
  }
  writer.writeVarInsn(this.type.getStoreOpcode(),this.index);
}
Program: 85115
Project: 85115
Buggy source:
private void writeInline(MethodWriter writer,IValue instance,IArguments arguments){
  Label inlineEnd=new Label();
  writer.startInline(inlineEnd);
  if (instance != null) {
    instance.writeExpression(writer);
    writer.writeVarInsn(instance.getType().getStoreOpcode(),0);
  }
  this.writeInlineArguments(writer,arguments);
  this.value.writeExpression(writer);
  writer.endInline(inlineEnd);
}

Fixed version (ground truth):
private void writeInline(MethodWriter writer,IValue instance,IArguments arguments){
  Label inlineEnd=new Label();
  int localCount=writer.registerLocal();
  writer.startInline(inlineEnd);
  if (instance != null) {
    instance.writeExpression(writer);
    writer.writeVarInsn(instance.getType().getStoreOpcode(),localCount);
  }
  this.writeInlineArguments(writer,arguments,localCount);
  this.value.writeExpression(writer);
  writer.endInline(inlineEnd);
  writer.resetLocals(localCount);
}
Program: 85116
Project: 85116
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.registerLocal();
  if (this.labels == null) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].writeStatement(writer);
    }
  }
 else {
    for (int i=0; i < this.valueCount; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
  }
  if (!this.topLevel) {
    writer.resetLocals(count);
  }
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.name.qualified,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.registerLocal();
  if (this.labels == null) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].writeStatement(writer);
    }
  }
 else {
    for (int i=0; i < this.valueCount; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.name.qualified,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}
Program: 85117
Project: 85117
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  if (this.requiredType == Types.VOID) {
    this.writeStatement(writer);
    return;
  }
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.registerLocal();
  int len=this.valueCount - 1;
  if (this.labels == null) {
    for (int i=0; i < len; i++) {
      this.values[i].writeStatement(writer);
    }
    this.values[len].writeExpression(writer);
  }
 else {
    for (int i=0; i < len; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
    Label l=this.labels[len];
    if (l != null) {
      writer.writeLabel(l.target);
    }
    this.values[len].writeExpression(writer);
  }
  if (!(this.context instanceof IMethod)) {
    writer.resetLocals(count);
  }
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.name.qualified,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  if (this.requiredType == Types.VOID) {
    this.writeStatement(writer);
    return;
  }
  org.objectweb.asm.Label start=new org.objectweb.asm.Label();
  org.objectweb.asm.Label end=new org.objectweb.asm.Label();
  writer.writeLabel(start);
  int count=writer.registerLocal();
  int len=this.valueCount - 1;
  if (this.labels == null) {
    for (int i=0; i < len; i++) {
      this.values[i].writeStatement(writer);
    }
    this.values[len].writeExpression(writer);
  }
 else {
    for (int i=0; i < len; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
    Label l=this.labels[len];
    if (l != null) {
      writer.writeLabel(l.target);
    }
    this.values[len].writeExpression(writer);
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  if (this.variables == null) {
    return;
  }
  for (  Entry<Name,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.name.qualified,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}
Program: 85118
Project: 85118
Buggy source:
public static void saveClass(File file,IClass iclass){
  createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    org.objectweb.asm.ClassWriter writer=new org.objectweb.asm.ClassWriter(DyvilCompiler.asmVersion | org.objectweb.asm.ClassWriter.COMPUTE_FRAMES);
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Exception ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void saveClass(File file,IClass iclass){
  createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    int ver=DyvilCompiler.asmVersion | org.objectweb.asm.ClassWriter.COMPUTE_FRAMES;
    org.objectweb.asm.ClassWriter writer=new org.objectweb.asm.ClassWriter(ver);
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Throwable ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 85119
Project: 85119
Buggy source:
@Override public void writeInsn(int opcode){
  if (this.hasReturn && this.inlineEnd != null) {
    this.writeInlineReturn();
  }
  this.hasReturn=false;
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
  this.mv.visitInsn(opcode);
}

Fixed version (ground truth):
@Override public void writeInsn(int opcode){
  if (this.hasReturn && this.inlineEnd != null) {
    this.writeInlineReturn();
  }
  this.hasReturn=false;
  if (opcode > 255) {
    this.visitSpecialInsn(opcode);
    return;
  }
  if (opcode >= IRETURN && opcode <= RETURN) {
    this.hasReturn=true;
    if (this.inlineEnd != null) {
      return;
    }
  }
  this.mv.visitInsn(opcode);
}
Program: 85120
Project: 85120
Buggy source:
@Override public AnnotationVisitor visitAnnotation(String type,boolean visible){
  String packName=ClassFormat.extendedToPackage(type);
  if (packName.equals("String_Node_Str")) {
    this.method.addModifier(Modifiers.INLINE);
    this.inline=true;
  }
  if (this.method.addRawAnnotation(packName)) {
    Annotation annotation=new Annotation(new dyvil.tools.compiler.ast.type.Type(packName));
    return new AnnotationVisitorImpl(this.method,annotation);
  }
  return null;
}

Fixed version (ground truth):
@Override public AnnotationVisitor visitAnnotation(String type,boolean visible){
  String packName=ClassFormat.extendedToPackage(type);
  if ("String_Node_Str".equals(packName)) {
    this.method.addModifier(Modifiers.INLINE);
    this.inline=true;
  }
  if (this.method.addRawAnnotation(packName)) {
    Annotation annotation=new Annotation(new dyvil.tools.compiler.ast.type.Type(packName));
    return new AnnotationVisitorImpl(this.method,annotation);
  }
  return null;
}
Program: 85122
Project: 85122
Buggy source:
@Override public void resolveTypes(){
  for (  Import i : this.imports) {
    i.resolveTypes(this.markers);
  }
  for (  Import i : this.staticImports) {
    i.resolveTypes(this.markers);
  }
  for (  IClass i : this.classes) {
    i.resolveTypes(this.markers,Package.rootPackage);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(){
  for (  Import i : this.imports) {
    i.resolveTypes(this.markers);
  }
  for (  Import i : this.staticImports) {
    i.resolveTypes(this.markers);
  }
  for (  IClass i : this.classes) {
    i.resolveTypes(this.markers,this);
  }
}
Program: 85123
Project: 85123
Buggy source:
@Override public void visitLocalVariable(String name,String desc,String signature,Label start,Label end,int index){
  if (this.method.hasModifier(Modifiers.STATIC)) {
    if (index != 0 && index <= this.method.parameterCount()) {
      this.method.getParameter(index - 1).setName(Name.getQualified(name));
    }
  }
 else   if (index < this.method.parameterCount()) {
    this.method.getParameter(index).setName(Name.getQualified(name));
  }
}

Fixed version (ground truth):
@Override public void visitLocalVariable(String name,String desc,String signature,Label start,Label end,int index){
  if (this.method.hasModifier(Modifiers.STATIC)) {
    if (index < this.method.parameterCount()) {
      this.method.getParameter(index).setName(Name.getQualified(name));
    }
  }
 else   if (index != 0 && index <= this.method.parameterCount()) {
    this.method.getParameter(index - 1).setName(Name.getQualified(name));
  }
}
Program: 85124
Project: 85124
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == KEY) {
    if (ParserUtil.isIdentifier(type)) {
      this.mode=EQUALS;
      this.key=token.nameValue();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == EQUALS) {
    if (type == Tokens.EQUALS) {
      this.mode=VALUE;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
 else   if (this.mode == VALUE) {
    if (type == Symbols.OPEN_SQUARE_BRACKET) {
      this.mode=ARRAY;
      return;
    }
    this.setProperty(this.key,token);
    this.mode=KEY;
    this.key=null;
    return;
  }
 else   if (this.mode == ARRAY) {
    if (type == Symbols.CLOSE_SQUARE_BRACKET) {
      this.mode=KEY;
      this.key=null;
      return;
    }
    this.setProperty(this.key,token);
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == KEY) {
    if (ParserUtil.isIdentifier(type)) {
      this.mode=EQUALS;
      this.key=token.nameValue();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == EQUALS) {
    if (type == Symbols.EQUALS) {
      this.mode=VALUE;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
 else   if (this.mode == VALUE) {
    if (type == Symbols.OPEN_SQUARE_BRACKET) {
      this.mode=ARRAY;
      return;
    }
    this.setProperty(this.key,token);
    this.mode=KEY;
    this.key=null;
    return;
  }
 else   if (this.mode == ARRAY) {
    if (type == Symbols.CLOSE_SQUARE_BRACKET) {
      this.mode=KEY;
      this.key=null;
      return;
    }
    this.setProperty(this.key,token);
    return;
  }
}
Program: 85125
Project: 85125
Buggy source:
private static int getMode(char c,String code,int i){
switch (c) {
case '"':
    return STRING;
case '\'':
  return CHAR;
case '/':
char n=code.charAt(i + 1);
if (n == '*') {
return BLOCK_COMMENT;
}
 else if (n == '/') {
return LINE_COMMENT;
}
 else {
return IDENTIFIER | MOD_SYMBOL;
}
case '@':
n=code.charAt(i + 1);
if (n == '"') {
return STRING_2;
}
return IDENTIFIER | MOD_SYMBOL;
case '0':
n=code.charAt(i + 1);
if (n == 'b') {
return INT | MOD_BIN;
}
 else if (n == 'x') {
return INT | MOD_HEX;
}
 else if (isDigit(n)) {
return INT | MOD_OCT;
}
return INT;
case '(':
return Symbols.OPEN_PARENTHESIS;
case ')':
return Symbols.CLOSE_PARENTHESIS;
case '[':
return Symbols.OPEN_SQUARE_BRACKET;
case ']':
return Symbols.CLOSE_SQUARE_BRACKET;
case '{':
return Symbols.OPEN_CURLY_BRACKET;
case '}':
return Symbols.CLOSE_CURLY_BRACKET;
case '.':
n=code.charAt(i + 1);
if (n == '.') {
return IDENTIFIER | MOD_DOTS;
}
return DOT;
case ';':
return SEMICOLON;
case ',':
return COMMA;
}
if (isDigit(c)) {
return INT;
}
 else if (isIdentifierSymbol(c)) {
return IDENTIFIER | MOD_SYMBOL;
}
 else if (isIdentifierPart(c)) {
return IDENTIFIER | MOD_LETTER;
}
return 0;
}

Fixed version (ground truth):
private static int getMode(char c,String code,int i){
switch (c) {
case '"':
    return STRING;
case '\'':
  return CHAR;
case '/':
char n=code.charAt(i + 1);
if (n == '*') {
return BLOCK_COMMENT;
}
 else if (n == '/') {
return LINE_COMMENT;
}
 else {
return IDENTIFIER | MOD_SYMBOL;
}
case '@':
n=code.charAt(i + 1);
if (n == '"') {
return STRING_2;
}
return IDENTIFIER | MOD_SYMBOL;
case '0':
n=code.charAt(i + 1);
if (n == 'b') {
return INT | MOD_BIN;
}
 else if (n == 'x') {
return INT | MOD_HEX;
}
 else if (isDigit(n)) {
return INT | MOD_OCT;
}
return INT;
case '(':
return Symbols.OPEN_PARENTHESIS;
case ')':
return Symbols.CLOSE_PARENTHESIS;
case '[':
return Symbols.OPEN_SQUARE_BRACKET;
case ']':
return Symbols.CLOSE_SQUARE_BRACKET;
case '{':
return Symbols.OPEN_CURLY_BRACKET;
case '}':
return Symbols.CLOSE_CURLY_BRACKET;
case '.':
n=code.charAt(i + 1);
if (n == '.') {
return IDENTIFIER | MOD_DOTS;
}
return Symbols.DOT;
case ';':
return Symbols.SEMICOLON;
case ',':
return Symbols.COMMA;
}
if (isDigit(c)) {
return INT;
}
 else if (isIdentifierSymbol(c)) {
return IDENTIFIER | MOD_SYMBOL;
}
 else if (isIdentifierPart(c)) {
return IDENTIFIER | MOD_LETTER;
}
return 0;
}
Program: 85126
Project: 85126
Buggy source:
@Override public int type(){
  return Tokens.SEMICOLON;
}

Fixed version (ground truth):
@Override public int type(){
  return Symbols.SEMICOLON;
}
Program: 85127
Project: 85127
Buggy source:
@Override public int endIndex(){
  return this.type == Tokens.ARROW_OPERATOR ? this.start + 2 : this.start + 1;
}

Fixed version (ground truth):
@Override public int endIndex(){
  return this.type == Symbols.ARROW_OPERATOR ? this.start + 2 : this.start + 1;
}
Program: 85128
Project: 85128
Buggy source:
/** 
 * Returns true if the given   {@link IToken} {@code token} should be parsed.If not, it gets removed from the Token Chain.
 * @param value the value of the token
 * @param token the token
 * @return true, if the token should be parsed or removed from the tokenstream
 */
public boolean retainToken(IToken token,IToken prev){
  if (!this.semicolonInference) {
    return true;
  }
  if (prev == null) {
    return true;
  }
  int prevLN=prev.endLine();
  if (prevLN == token.startLine()) {
    return true;
  }
  int type=token.type();
  if (type != Symbols.OPEN_SQUARE_BRACKET && (type & (Tokens.SYMBOL | Tokens.KEYWORD | Tokens.IDENTIFIER)) == 0) {
    return true;
  }
  int type1=prev.type();
  if (ParserUtil.isSeperator(type1)) {
    return true;
  }
  int prevEnd=prev.endIndex();
  IToken semicolon=new InferredSemicolon(prevLN,prevEnd);
  semicolon.setNext(token);
  prev.setNext(semicolon);
  return true;
}

Fixed version (ground truth):
/** 
 * Returns true if the given   {@link IToken} {@code token} should be parsed.If not, it gets removed from the Token Chain.
 * @param value the value of the token
 * @param token the token
 * @return true, if the token should be parsed or removed from the tokenstream
 */
public boolean retainToken(IToken token,IToken prev){
  if (!this.semicolonInference) {
    return true;
  }
  if (prev == null) {
    return true;
  }
  int prevLN=prev.endLine();
  if (prevLN == token.startLine()) {
    return true;
  }
  int type=token.type();
  if ((type & (Tokens.SYMBOL | Tokens.KEYWORD | Tokens.IDENTIFIER| Tokens.BRACKET)) == 0) {
    return true;
  }
  if (type == Symbols.OPEN_CURLY_BRACKET) {
    return true;
  }
  int type1=prev.type();
  if (ParserUtil.isSeperator(type1)) {
    return true;
  }
  int prevEnd=prev.endIndex();
  IToken semicolon=new InferredSemicolon(prevLN,prevEnd);
  semicolon.setNext(token);
  prev.setNext(semicolon);
  return true;
}
Program: 85129
Project: 85129
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.name=name;
      this.annotation.type=new AnnotationType(token,name);
      this.mode=PARAMETERS_START;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      IToken next=token.next();
      if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Tokens.COLON) {
        ArgumentMap map=new ArgumentMap();
        this.annotation.arguments=map;
        pm.pushParser(new ExpressionMapParser(map));
      }
 else {
        ArgumentList list=new ArgumentList();
        this.annotation.arguments=list;
        pm.pushParser(new ExpressionListParser(list));
      }
      this.mode=PARAMETERS_END;
      return;
    }
    if (!ParserUtil.isIdentifier(type) && !ParserUtil.isTerminator2(type)) {
      SingleArgument arg=new SingleArgument();
      this.annotation.arguments=arg;
      pm.popParser();
      pm.pushParser(new ExpressionParser(arg),true);
      return;
    }
    pm.popParser(true);
    return;
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.CLOSE_PARENTHESIS) {
      pm.popParser();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.name=name;
      this.annotation.type=new AnnotationType(token,name);
      this.mode=PARAMETERS_START;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      IToken next=token.next();
      if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Symbols.COLON) {
        ArgumentMap map=new ArgumentMap();
        this.annotation.arguments=map;
        pm.pushParser(new ExpressionMapParser(map));
      }
 else {
        ArgumentList list=new ArgumentList();
        this.annotation.arguments=list;
        pm.pushParser(new ExpressionListParser(list));
      }
      this.mode=PARAMETERS_END;
      return;
    }
    if (!ParserUtil.isIdentifier(type) && !ParserUtil.isTerminator2(type)) {
      SingleArgument arg=new SingleArgument();
      this.annotation.arguments=arg;
      pm.popParser();
      pm.pushParser(new ExpressionParser(arg),true);
      return;
    }
    pm.popParser(true);
    return;
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.CLOSE_PARENTHESIS) {
      pm.popParser();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 85130
Project: 85130
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == INSTRUCTION) {
    IInstruction insn=null;
    if (type == Keywords.GOTO) {
      IToken next=token.next();
      if (!ParserUtil.isIdentifier(next.type())) {
        throw new SyntaxError(token,"String_Node_Str");
      }
      pm.skip();
      insn=new JumpInstruction(Opcodes.GOTO,new Label(next.nameValue()));
    }
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      if (token.next().type() == Tokens.COLON) {
        pm.skip();
        this.label=name;
        return;
      }
      int opcode=Opcodes.parseOpcode(name.qualified);
      if (opcode == -1) {
        throw new SyntaxError(token,"String_Node_Str" + name + "String_Node_Str");
      }
      insn=handleOpcode(pm,token,opcode);
    }
    if (insn != null) {
      if (this.label != null) {
        this.bytecode.addInstruction(insn,new Label(this.label));
        this.label=null;
        return;
      }
      this.bytecode.addInstruction(insn);
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == INSTRUCTION) {
    IInstruction insn=null;
    if (type == Keywords.GOTO) {
      IToken next=token.next();
      if (!ParserUtil.isIdentifier(next.type())) {
        throw new SyntaxError(token,"String_Node_Str");
      }
      pm.skip();
      insn=new JumpInstruction(Opcodes.GOTO,new Label(next.nameValue()));
    }
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      if (token.next().type() == Symbols.COLON) {
        pm.skip();
        this.label=name;
        return;
      }
      int opcode=Opcodes.parseOpcode(name.qualified);
      if (opcode == -1) {
        throw new SyntaxError(token,"String_Node_Str" + name + "String_Node_Str");
      }
      insn=handleOpcode(pm,token,opcode);
    }
    if (insn != null) {
      if (this.label != null) {
        this.bytecode.addInstruction(insn,new Label(this.label));
        this.label=null;
        return;
      }
      this.bytecode.addInstruction(insn);
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 85131
Project: 85131
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Tokens.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=COLON;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.fieldInstruction.setFieldName(next.nameValue().qualified);
    return;
  }
  if (this.mode == COLON) {
    if (type != Tokens.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Symbols.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=COLON;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.fieldInstruction.setFieldName(next.nameValue().qualified);
    return;
  }
  if (this.mode == COLON) {
    if (type != Symbols.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}
Program: 85132
Project: 85132
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    if (type == Keywords.INTERFACE) {
      this.methodInstruction.setInterface(true);
    }
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Tokens.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=PARAMETERS;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.methodInstruction.setMethodName(next.nameValue().qualified);
    return;
  }
  if (this.mode == PARAMETERS) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      pm.pushParser(new InternalTypeParser(this));
      this.mode=PARAMETERS_END;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Tokens.COMMA) {
      pm.pushParser(new InternalTypeParser(this));
      return;
    }
    if (type == Symbols.CLOSE_PARENTHESIS) {
      this.mode=COLON;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == COLON) {
    if (type != Tokens.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    pm.popParser(true);
    return;
  }
  if (this.mode == OWNER) {
    if (type == Keywords.INTERFACE) {
      this.methodInstruction.setInterface(true);
    }
    pm.pushParser(new InternalTypeParser(this),true);
    this.mode=DOT;
    return;
  }
  if (this.mode == DOT) {
    if (type != Symbols.DOT) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    this.mode=PARAMETERS;
    IToken next=token.next();
    if (!ParserUtil.isIdentifier(next.type())) {
      throw new SyntaxError(next,"String_Node_Str");
    }
    pm.skip();
    this.methodInstruction.setMethodName(next.nameValue().qualified);
    return;
  }
  if (this.mode == PARAMETERS) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      pm.pushParser(new InternalTypeParser(this));
      this.mode=PARAMETERS_END;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.COMMA) {
      pm.pushParser(new InternalTypeParser(this));
      return;
    }
    if (type == Symbols.CLOSE_PARENTHESIS) {
      this.mode=COLON;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == COLON) {
    if (type != Symbols.COLON) {
      throw new SyntaxError(token,"String_Node_Str");
    }
    pm.pushParser(new InternalTypeParser(this));
    return;
  }
}
Program: 85134
Project: 85134
Buggy source:
@Override public void parse(IParserManager jcp,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.isInMode(PACKAGE)) {
    if (type == Keywords.PACKAGE) {
      this.mode=IMPORT | CLASS;
      PackageDecl pack=new PackageDecl(token.raw());
      this.unit.setPackageDeclaration(pack);
      jcp.pushParser(new PackageParser(pack));
      return;
    }
  }
  if (this.isInMode(IMPORT)) {
    if (type == Keywords.IMPORT) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      this.unit.addImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
    if (type == Keywords.USING) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      i.isStatic=true;
      this.unit.addStaticImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
  }
  if (this.isInMode(CLASS)) {
    if (token.type() == Tokens.SEMICOLON) {
      return;
    }
    CodeClass c=new CodeClass(null,this.unit);
    this.unit.addClass(c);
    jcp.pushParser(new ClassDeclarationParser(c),true);
    return;
  }
  throw new SyntaxError(token,"String_Node_Str");
}

Fixed version (ground truth):
@Override public void parse(IParserManager jcp,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.isInMode(PACKAGE)) {
    if (type == Keywords.PACKAGE) {
      this.mode=IMPORT | CLASS;
      PackageDecl pack=new PackageDecl(token.raw());
      this.unit.setPackageDeclaration(pack);
      jcp.pushParser(new PackageParser(pack));
      return;
    }
  }
  if (this.isInMode(IMPORT)) {
    if (type == Keywords.IMPORT) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      this.unit.addImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
    if (type == Keywords.USING) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      i.isStatic=true;
      this.unit.addStaticImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return;
    }
  }
  if (this.isInMode(CLASS)) {
    if (token.type() == Symbols.SEMICOLON) {
      return;
    }
    CodeClass c=new CodeClass(null,this.unit);
    this.unit.addClass(c);
    jcp.pushParser(new ClassDeclarationParser(c),true);
    return;
  }
  throw new SyntaxError(token,"String_Node_Str");
}
Program: 85135
Project: 85135
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Tokens.SEMICOLON) {
    this.mode=0;
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser();
    return;
  }
  if (this.mode == 0) {
    if (type == Keywords.GET) {
      this.mode=GET;
      return;
    }
    if (type == Keywords.SET) {
      this.mode=SET;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",false);
  }
  if (this.mode > 0) {
    if (type == Tokens.COLON) {
      pm.pushParser(new ExpressionParser(this));
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    this.mode=0;
    return;
  }
  if (type == Symbols.CLOSE_CURLY_BRACKET) {
    pm.popParser();
    return;
  }
  if (this.mode == 0) {
    if (type == Keywords.GET) {
      this.mode=GET;
      return;
    }
    if (type == Keywords.SET) {
      this.mode=SET;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str",false);
  }
  if (this.mode > 0) {
    if (type == Symbols.COLON) {
      pm.pushParser(new ExpressionParser(this));
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 85136
Project: 85136
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.CLOSE_SQUARE_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == 0) {
    this.mode=1;
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
  if (this.mode == 1) {
    if (type == Tokens.COMMA) {
      this.mode=0;
      return;
    }
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.CLOSE_SQUARE_BRACKET) {
    pm.popParser(true);
    return;
  }
  if (this.mode == 0) {
    this.mode=1;
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
  if (this.mode == 1) {
    if (type == Symbols.COMMA) {
      this.mode=0;
      return;
    }
    pm.pushParser(new DWTValueParser(this),true);
    return;
  }
}