nus-yam/ex-repair huggingface dataset:
Program: 83854
Project: 83854
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (this.overrideMethod == null) {
      if ((this.modifiers & Modifiers.OVERRIDE) != 0) {
        markers.add(this.position,"String_Node_Str",this.name);
      }
    }
 else     if (!this.isConstructor) {
      if ((this.modifiers & Modifiers.OVERRIDE) == 0) {
        markers.add(this.position,"String_Node_Str",this.name);
      }
 else       if (this.overrideMethod.hasModifier(Modifiers.FINAL)) {
        markers.add(this.position,"String_Node_Str",this.name);
      }
 else {
        IType type=this.overrideMethod.getType();
        if (type.isSuperTypeOf(this.type)) {
          Marker marker=markers.create(this.position,"String_Node_Str",this.name);
          marker.addInfo("String_Node_Str" + this.type);
          marker.addInfo("String_Node_Str" + type);
        }
      }
    }
  }
  super.check(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].check(markers,context);
  }
  if (this.value != null) {
    if (this.isConstructor) {
      if (!this.value.isType(Type.VOID)) {
        Marker marker=markers.create(this.position,"String_Node_Str");
        marker.addInfo("String_Node_Str" + this.value.getType());
      }
    }
    this.value.check(markers,context);
  }
 else   if (this.isStatic()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0 && !this.theClass.isAbstract()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    if (this.overrideMethod == null) {
      if ((this.modifiers & Modifiers.OVERRIDE) != 0) {
        markers.add(this.position,"String_Node_Str",this.name);
      }
    }
 else     if (!this.isConstructor) {
      if ((this.modifiers & Modifiers.OVERRIDE) == 0) {
        markers.add(this.position,"String_Node_Str",this.name);
      }
 else       if (this.overrideMethod.hasModifier(Modifiers.FINAL)) {
        markers.add(this.position,"String_Node_Str",this.name);
      }
 else {
        IType type=this.overrideMethod.getType();
        if (type.isSuperTypeOf(this.type)) {
          Marker marker=markers.create(this.position,"String_Node_Str",this.name);
          marker.addInfo("String_Node_Str" + this.type);
          marker.addInfo("String_Node_Str" + type);
        }
      }
    }
  }
  super.check(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].check(markers,context);
  }
  if (this.value != null) {
    this.value.check(markers,this);
  }
 else   if (this.isStatic()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0 && !this.theClass.isAbstract()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
}
Program: 83855
Project: 83855
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  super.checkTypes(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].checkTypes(markers,context);
  }
  if (this.value != null) {
    IValue value1=this.value.withType(this.type);
    if (value1 == null) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
    }
    this.value.checkTypes(markers,context);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  super.checkTypes(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].checkTypes(markers,context);
  }
  if (this.value != null) {
    if (this.isConstructor) {
      IValue value1=this.value.withType(Type.VOID);
      if (value1 == null) {
        Marker marker=markers.create(this.position,"String_Node_Str");
        marker.addInfo("String_Node_Str" + this.value.getType());
      }
 else {
        this.value=value1;
      }
    }
 else {
      IValue value1=this.value.withType(this.type);
      if (value1 == null) {
        Marker marker=markers.create(this.position,"String_Node_Str",this.name);
        marker.addInfo("String_Node_Str" + this.type);
        marker.addInfo("String_Node_Str" + this.value.getType());
      }
 else {
        this.value=value1;
      }
    }
    this.value.checkTypes(markers,this);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
}
Program: 83856
Project: 83856
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.localCount();
  if (this.labels == null) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].writeStatement(writer);
    }
  }
 else {
    for (int i=0; i < this.valueCount; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeFrameLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
  }
  writer.resetLocals(count);
  writer.writeLabel(end);
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.qualifiedName,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.localCount();
  if (this.labels == null) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].writeStatement(writer);
    }
  }
 else {
    for (int i=0; i < this.valueCount; i++) {
      Label l=this.labels[i];
      if (l != null) {
        writer.writeFrameLabel(l.target);
      }
      this.values[i].writeStatement(writer);
    }
  }
  if (!(this.context instanceof IMethod)) {
    writer.resetLocals(count);
  }
  writer.writeLabel(end);
  for (  Entry<String,Variable> entry : this.variables.entrySet()) {
    Variable var=entry.getValue();
    writer.writeLocal(var.qualifiedName,var.type.getExtendedName(),var.type.getSignature(),start,end,var.index);
  }
}
Program: 83857
Project: 83857
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  this.context=context;
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].check(markers,context);
  }
  this.context=null;
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  this.context=context;
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].check(markers,context);
  }
}
Program: 83858
Project: 83858
Buggy source:
public default Object getFrameType(){
  StringBuilder buffer=new StringBuilder();
  this.appendExtendedName(buffer);
  return buffer.toString();
}

Fixed version (ground truth):
public default Object getFrameType(){
  return this.getInternalName();
}
Program: 83859
Project: 83859
Buggy source:
@Override public void appendExtendedName(StringBuilder buffer){
  for (int i=0; i < this.arrayDimensions; i++) {
    buffer.append('[');
  }
  buffer.append('L').append(this.getInternalName()).append(';');
}

Fixed version (ground truth):
@Override public void appendExtendedName(StringBuilder buffer){
  for (int i=0; i < this.arrayDimensions; i++) {
    buffer.append('[');
  }
  buffer.append('L').append(this.theClass == null ? ClassFormat.packageToInternal(this.qualifiedName) : this.theClass.getInternalName()).append(';');
}
Program: 83860
Project: 83860
Buggy source:
@Override public String getInternalName(){
  return this.theClass == null ? ClassFormat.packageToInternal(this.qualifiedName) : this.theClass.getInternalName();
}

Fixed version (ground truth):
@Override public String getInternalName(){
  if (this.arrayDimensions > 0) {
    StringBuilder buf=new StringBuilder();
    this.appendExtendedName(buf);
    return buf.toString();
  }
  return this.theClass == null ? ClassFormat.packageToInternal(this.qualifiedName) : this.theClass.getInternalName();
}
Program: 83862
Project: 83862
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolve(markers,context);
  }
  if (this.upperBoundCount > 0) {
    IType type=this.upperBounds[0];
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      if (iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
        if (++this.upperBoundCount > this.upperBounds.length) {
          IType[] temp=new IType[this.upperBoundCount];
          temp[0]=Type.OBJECT;
          System.arraycopy(this.upperBounds,0,temp,1,this.upperBoundCount - 1);
          this.upperBounds=temp;
        }
 else {
          System.arraycopy(this.upperBounds,0,this.upperBounds,1,this.upperBoundCount - 1);
          this.upperBounds[0]=Type.OBJECT;
        }
      }
    }
    for (int i=1; i < this.upperBoundCount; i++) {
      type=this.upperBounds[i];
      iclass=type.getTheClass();
      if (iclass != null && !iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
        System.arraycopy(this.upperBounds,i + 1,this.upperBounds,i,this.upperBoundCount - i - 1);
        this.upperBoundCount--;
        i--;
      }
    }
  }
  this.captureClass=new CaptureClass(this,this.upperBounds,this.upperBoundCount,this.lowerBound);
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolve(markers,context);
  }
  if (this.upperBoundCount > 0) {
    IType type=this.upperBounds[0]=this.upperBounds[0].resolve(markers,context);
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      if (iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
        if (++this.upperBoundCount > this.upperBounds.length) {
          IType[] temp=new IType[this.upperBoundCount];
          temp[0]=Type.OBJECT;
          System.arraycopy(this.upperBounds,0,temp,1,this.upperBoundCount - 1);
          this.upperBounds=temp;
        }
 else {
          System.arraycopy(this.upperBounds,0,this.upperBounds,1,this.upperBoundCount - 1);
          this.upperBounds[0]=Type.OBJECT;
        }
      }
    }
    for (int i=1; i < this.upperBoundCount; i++) {
      type=this.upperBounds[i]=this.upperBounds[i].resolve(markers,context);
      iclass=type.getTheClass();
      if (iclass != null && !iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
        System.arraycopy(this.upperBounds,i + 1,this.upperBounds,i,this.upperBoundCount - i - 1);
        this.upperBoundCount--;
        i--;
      }
    }
  }
  this.captureClass=new CaptureClass(this,this.upperBounds,this.upperBoundCount,this.lowerBound);
}
Program: 83865
Project: 83865
Buggy source:
@Override public void write(ClassWriter writer){
  boolean instance=this.thisType != null;
  int modifiers=instance ? Modifiers.PRIVATE | Modifiers.SYNTHETIC : Modifiers.PRIVATE | Modifiers.STATIC | Modifiers.SYNTHETIC;
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(modifiers,this.getName(),this.getLambdaDescriptor(),null,null));
  int[] prevIndex=null;
  if (instance) {
    mw.registerLocal(this.thisType);
  }
  if (this.capturedFieldCount > 0) {
    prevIndex=new int[this.capturedFieldCount];
    for (int i=0; i < this.capturedFieldCount; i++) {
      IVariable var=this.capturedFields[i];
      prevIndex[i]=var.getIndex();
      var.setIndex(mw.registerParameter(var.getQualifiedName(),var.getType()));
    }
  }
  for (int i=0; i < this.parameterCount; i++) {
    LambdaParameter param=this.parameters[i];
    param.index=mw.registerParameter(param.qualifiedName,param.type);
  }
  mw.begin();
  this.value.writeExpression(mw);
  mw.end(this.method.getType());
  for (int i=0; i < this.parameterCount; i++) {
    IVariable var=this.capturedFields[i];
    var.setIndex(prevIndex[i]);
  }
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  boolean instance=this.thisType != null;
  int modifiers=instance ? Modifiers.PRIVATE | Modifiers.SYNTHETIC : Modifiers.PRIVATE | Modifiers.STATIC | Modifiers.SYNTHETIC;
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(modifiers,this.getName(),this.getLambdaDescriptor(),null,null));
  int[] prevIndex=null;
  if (instance) {
    mw.registerLocal(this.thisType);
  }
  if (this.capturedFieldCount > 0) {
    prevIndex=new int[this.capturedFieldCount];
    for (int i=0; i < this.capturedFieldCount; i++) {
      IVariable var=this.capturedFields[i];
      prevIndex[i]=var.getIndex();
      var.setIndex(mw.registerParameter(var.getQualifiedName(),var.getType()));
    }
  }
  for (int i=0; i < this.parameterCount; i++) {
    LambdaParameter param=this.parameters[i];
    param.index=mw.registerParameter(param.qualifiedName,param.type);
  }
  mw.begin();
  this.value.writeExpression(mw);
  mw.end(this.method.getType());
  for (int i=0; i < this.capturedFieldCount; i++) {
    IVariable var=this.capturedFields[i];
    var.setIndex(prevIndex[i]);
  }
}
Program: 83866
Project: 83866
Buggy source:
@Override public boolean processAnnotation(Annotation annotation){
  String name=annotation.type.fullName;
  if ("String_Node_Str".equals(name)) {
    this.modifiers|=Modifiers.BYREF;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean processAnnotation(Annotation annotation){
  String name=annotation.type.fullName;
  if ("String_Node_Str".equals(name)) {
    this.modifiers|=Modifiers.VAR;
    return true;
  }
  if ("String_Node_Str".equals(name)) {
    this.modifiers|=Modifiers.LAZY;
    return true;
  }
  return false;
}
Program: 83867
Project: 83867
Buggy source:
public void write(MethodWriter writer){
  this.index=writer.registerParameter(this.name,this.type);
  if ((this.modifiers & Modifiers.BYREF) != 0) {
    writer.addParameterAnnotation(this.index,"String_Node_Str",true);
  }
  for (  Annotation a : this.annotations) {
    a.write(writer,this.index);
  }
}

Fixed version (ground truth):
public void write(MethodWriter writer){
  this.index=writer.registerParameter(this.name,this.type);
  if ((this.modifiers & Modifiers.VAR) != 0) {
    writer.addParameterAnnotation(this.index,"String_Node_Str",true);
  }
  for (  Annotation a : this.annotations) {
    a.write(writer,this.index);
  }
}
Program: 83868
Project: 83868
Buggy source:
@Override public IValue resolve(List<Marker> markers,IContext context){
  if (this.isArray) {
    IValue[] values=new IValue[this.valueCount];
    System.arraycopy(this.values,0,values,0,this.valueCount);
    return new ValueList(this.position,values,this.requiredType,this.elementType).resolve(markers,context);
  }
  this.context=context;
  for (int i=0; i < this.valueCount; i++) {
    IValue v1=this.values[i];
    IValue v2=v1.resolve(markers,this);
    if (v1 != v2) {
      this.values[i]=v2;
    }
    if (v2.getValueType() == IValue.VARIABLE) {
      FieldInitializer fi=(FieldInitializer)v2;
      Variable var=fi.variable;
      this.variables.put(var.qualifiedName,var);
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(List<Marker> markers,IContext context){
  if (this.isArray) {
    IValue[] values=new IValue[this.valueCount];
    System.arraycopy(this.values,0,values,0,this.valueCount);
    return new ValueList(this.position,values,this.requiredType,this.elementType).resolve(markers,context);
  }
  this.context=context;
  for (int i=0; i < this.valueCount; i++) {
    IValue v1=this.values[i];
    IValue v2=v1.resolve(markers,this);
    if (v1 != v2) {
      this.values[i]=v2;
    }
    if (v2.getValueType() == IValue.VARIABLE) {
      FieldInitializer fi=(FieldInitializer)v2;
      Variable var=fi.variable;
      this.variables.put(var.qualifiedName,var);
    }
  }
  this.context=null;
  return this;
}
Program: 83869
Project: 83869
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  if (this.isArray) {
    super.check(markers,context);
  }
 else {
    IType type=this.requiredType;
    for (int i=0; i < this.valueCount; i++) {
      IValue v=this.values[i];
      v.check(markers,this);
      if (v.getValueType() == RETURN && v.withType(type) == null) {
        Marker marker=Markers.create(v.getPosition(),"String_Node_Str");
        marker.addInfo("String_Node_Str" + type);
        marker.addInfo("String_Node_Str" + v.getType());
        markers.add(marker);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  if (this.isArray) {
    super.check(markers,context);
  }
 else {
    this.context=context;
    IType type=this.requiredType;
    for (int i=0; i < this.valueCount; i++) {
      IValue v=this.values[i];
      v.check(markers,this);
      if (v.getValueType() == RETURN && v.withType(type) == null) {
        Marker marker=Markers.create(v.getPosition(),"String_Node_Str");
        marker.addInfo("String_Node_Str" + type);
        marker.addInfo("String_Node_Str" + v.getType());
        markers.add(marker);
      }
    }
    this.context=null;
  }
}
Program: 83870
Project: 83870
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.isArray) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].resolveTypes(markers,context);
    }
    return;
  }
  this.context=context;
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    if (v.isStatement()) {
      ((IStatement)v).setParent(this);
    }
    v.resolveTypes(markers,this);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.isArray) {
    for (int i=0; i < this.valueCount; i++) {
      this.values[i].resolveTypes(markers,context);
    }
    return;
  }
  this.context=context;
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    if (v.isStatement()) {
      ((IStatement)v).setParent(this);
    }
    v.resolveTypes(markers,this);
  }
  this.context=null;
}
Program: 83872
Project: 83872
Buggy source:
@Override public void write(ClassWriter writer){
  this.name="String_Node_Str" + this.index;
  this.desc=this.getLambdaDescriptor();
  boolean instance=this.thisType != null;
  int modifiers=instance ? Modifiers.PRIVATE | Modifiers.SYNTHETIC : Modifiers.PRIVATE | Modifiers.STATIC | Modifiers.SYNTHETIC;
  MethodWriter mw=new MethodWriter(writer,writer.visitMethod(modifiers,this.name,this.desc,null,null));
  int[] prevIndex=null;
  if (instance) {
    mw.addLocal(this.thisType);
  }
  if (this.capturedFieldCount > 0) {
    prevIndex=new int[this.capturedFieldCount];
    for (int i=0; i < this.capturedFieldCount; i++) {
      IVariable var=this.capturedFields[i];
      prevIndex[i]=var.getIndex();
      var.setIndex(mw.visitParameter(var.getQualifiedName(),var.getType()));
    }
  }
  for (int i=0; i < this.parameterCount; i++) {
    LambdaParameter param=this.parameters[i];
    param.index=mw.visitParameter(param.qualifiedName,param.type);
  }
  mw.visitCode();
  this.value.writeExpression(mw);
  mw.visitEnd(this.method.getType());
  for (int i=0; i < this.parameterCount; i++) {
    IVariable var=this.capturedFields[i];
    var.setIndex(prevIndex[i]);
  }
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer){
  boolean instance=this.thisType != null;
  int modifiers=instance ? Modifiers.PRIVATE | Modifiers.SYNTHETIC : Modifiers.PRIVATE | Modifiers.STATIC | Modifiers.SYNTHETIC;
  MethodWriter mw=new MethodWriter(writer,writer.visitMethod(modifiers,this.name,this.desc,null,null));
  int[] prevIndex=null;
  if (instance) {
    mw.addLocal(this.thisType);
  }
  if (this.capturedFieldCount > 0) {
    prevIndex=new int[this.capturedFieldCount];
    for (int i=0; i < this.capturedFieldCount; i++) {
      IVariable var=this.capturedFields[i];
      prevIndex[i]=var.getIndex();
      var.setIndex(mw.visitParameter(var.getQualifiedName(),var.getType()));
    }
  }
  for (int i=0; i < this.parameterCount; i++) {
    LambdaParameter param=this.parameters[i];
    param.index=mw.visitParameter(param.qualifiedName,param.type);
  }
  mw.visitCode();
  this.value.writeExpression(mw);
  mw.visitEnd(this.method.getType());
  for (int i=0; i < this.parameterCount; i++) {
    IVariable var=this.capturedFields[i];
    var.setIndex(prevIndex[i]);
  }
}
Program: 83873
Project: 83873
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  if (this.method != null) {
    if (this.method.hasTypeVariables()) {
      this.returnType=this.method.getType(this);
      for (int i=0; i < this.parameterCount; i++) {
        LambdaParameter param=this.parameters[i];
        param.baseType=method.getParameter(i).type;
        param.type=param.type.getConcreteType(this);
      }
    }
 else {
      this.returnType=this.method.getType();
    }
  }
 else {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
  this.context=context;
  this.value=this.value.resolve(markers,this);
  this.value.check(markers,context);
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  if (this.method != null) {
    if (this.method.hasTypeVariables()) {
      this.returnType=this.method.getType(this);
      for (int i=0; i < this.parameterCount; i++) {
        LambdaParameter param=this.parameters[i];
        param.baseType=method.getParameter(i).type;
        param.type=param.type.getConcreteType(this);
      }
    }
 else {
      this.returnType=this.method.getType();
    }
  }
 else {
    markers.add(Markers.create(this.position,"String_Node_Str"));
  }
  this.context=context;
  this.value=this.value.resolve(markers,this);
  this.value.check(markers,context);
  this.name="String_Node_Str" + this.index;
  this.desc=this.getLambdaDescriptor();
}
Program: 83874
Project: 83874
Buggy source:
@Override public void writeStatement(MethodWriter writer){
  for (  IValue v : this.values) {
    v.writeStatement(writer);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer){
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].writeStatement(writer);
  }
}
Program: 83875
Project: 83875
Buggy source:
@Override public void check(List<Marker> markers,IContext context){
  for (  IValue v : this.values) {
    v.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(List<Marker> markers,IContext context){
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].check(markers,context);
  }
}
Program: 83876
Project: 83876
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  TupleType t=this.tupleType;
  writer.visitTypeInsn(Opcodes.NEW,t);
  writer.visitInsn(Opcodes.DUP);
  for (  IValue v : this.values) {
    v.writeExpression(writer);
  }
  String owner=t.getInternalName();
  String desc=t.getConstructorDescriptor();
  writer.visitMethodInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false,this.valueCount + 1,t);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  TupleType t=this.tupleType;
  writer.visitTypeInsn(Opcodes.NEW,t);
  writer.visitInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].writeExpression(writer);
  }
  String owner=t.getInternalName();
  String desc=t.getConstructorDescriptor();
  writer.visitMethodInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false,this.valueCount + 1,t);
}
Program: 83877
Project: 83877
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  TupleType type=new TupleType();
  for (  IValue v : this.values) {
    v.resolveTypes(markers,context);
    type.addType(v.getType());
  }
  type.getTheClass();
  this.tupleType=type;
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  TupleType type=new TupleType();
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    v.resolveTypes(markers,context);
    type.addType(v.getType());
  }
  type.getTheClass();
  this.tupleType=type;
}
Program: 83878
Project: 83878
Buggy source:
@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.getCaptureClass();
      }
    }
  }
  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);
  }
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable var=this.generics[i];
    if (var.isName(name)) {
      return var.getCaptureClass();
    }
  }
  IClass clazz=this.body.getClass(name);
  if (clazz != null) {
    return clazz;
  }
  return null;
}
Program: 83879
Project: 83879
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.typesResolved=true;
  if (this.generics != null) {
    GenericType type=new GenericType(this);
    for (    ITypeVariable v : this.generics) {
      v.resolveTypes(markers,context);
      type.addType(new WildcardType(null,0,v.getCaptureClass()));
    }
    this.type=type;
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(markers,context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(markers,context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  for (int i=0; i < this.annotationCount; i++) {
    this.annotations[i].resolveTypes(markers,context);
  }
  this.body.resolveTypes(markers,this);
  if (this.outerType != null) {
    this.outerClass=this.outerType.resolve(markers,context).getTheClass();
  }
  if (this.innerTypes != null) {
    for (    IType t : this.innerTypes) {
      IClass iclass=t.resolve(markers,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.genericCount > 0) {
    GenericType type=new GenericType(this);
    for (int i=0; i < this.genericCount; i++) {
      ITypeVariable var=this.generics[i];
      var.resolveTypes(markers,context);
      type.addType(new WildcardType(null,0,var.getCaptureClass()));
    }
    this.type=type;
  }
  if (this.superType != null) {
    if (this.superType.isName("String_Node_Str")) {
      this.superType=null;
    }
 else {
      this.superType=this.superType.resolve(markers,context);
    }
  }
  for (ListIterator<IType> iterator=this.interfaces.listIterator(); iterator.hasNext(); ) {
    IType i1=iterator.next();
    IType i2=i1.resolve(markers,context);
    if (i1 != i2) {
      iterator.set(i2);
    }
  }
  for (int i=0; i < this.annotationCount; i++) {
    this.annotations[i].resolveTypes(markers,context);
  }
  this.body.resolveTypes(markers,this);
  if (this.outerType != null) {
    this.outerClass=this.outerType.resolve(markers,context).getTheClass();
  }
  if (this.innerTypes != null) {
    for (    IType t : this.innerTypes) {
      IClass iclass=t.resolve(markers,context).getTheClass();
      this.body.addClass(iclass);
    }
    this.innerTypes=null;
  }
}
Program: 83881
Project: 83881
Buggy source:
@Override public void checkArguments(List<Marker> markers,IValue instance,IArguments arguments,ITypeContext typeContext){
  int pOff=0;
  int len=arguments.size();
  Parameter par;
  IType parType;
  if (instance != null && (this.modifiers & Modifiers.INFIX) == Modifiers.INFIX) {
    par=this.parameters[0];
    parType=par.getType(typeContext);
    IValue instance1=instance.withType(parType);
    if (instance1 == null) {
      Marker marker=Markers.create(instance.getPosition(),"String_Node_Str",par.name);
      marker.addInfo("String_Node_Str" + parType);
      marker.addInfo("String_Node_Str" + instance.getType());
      markers.add(marker);
    }
    pOff=1;
  }
 else   if (instance == null && (this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    parType=this.theClass.getType();
    instance=arguments.getFirstValue();
    IValue instance1=instance.withType(parType);
    if (instance1 == null) {
      Marker marker=Markers.create(instance.getPosition(),"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + parType);
      marker.addInfo("String_Node_Str" + instance.getType());
      markers.add(marker);
    }
    return;
  }
  if ((this.modifiers & Modifiers.VARARGS) != 0) {
    len=this.parameterCount - 1;
    par=this.parameters[len];
    par.index=len;
    arguments.checkVarargsValue(markers,par,typeContext);
  }
  for (int i=0; i < len; i++) {
    par=this.parameters[i + pOff];
    par.index=i;
    arguments.checkValue(markers,par,typeContext);
  }
}

Fixed version (ground truth):
@Override public void checkArguments(List<Marker> markers,IValue instance,IArguments arguments,ITypeContext typeContext){
  int pOff=0;
  int len=arguments.size();
  Parameter par;
  IType parType;
  if (instance != null && (this.modifiers & Modifiers.INFIX) == Modifiers.INFIX) {
    par=this.parameters[0];
    parType=par.getType(typeContext);
    IValue instance1=instance.withType(parType);
    if (instance1 == null) {
      Marker marker=Markers.create(instance.getPosition(),"String_Node_Str",par.name);
      marker.addInfo("String_Node_Str" + parType);
      marker.addInfo("String_Node_Str" + instance.getType());
      markers.add(marker);
    }
    pOff=1;
  }
 else   if (instance == null && (this.modifiers & Modifiers.PREFIX) == Modifiers.PREFIX) {
    parType=this.theClass.getType();
    instance=arguments.getFirstValue();
    IValue instance1=instance.withType(parType);
    if (instance1 == null) {
      Marker marker=Markers.create(instance.getPosition(),"String_Node_Str",this.name);
      marker.addInfo("String_Node_Str" + parType);
      marker.addInfo("String_Node_Str" + instance.getType());
      markers.add(marker);
    }
    return;
  }
  if ((this.modifiers & Modifiers.VARARGS) != 0) {
    len=this.parameterCount - 1;
    par=this.parameters[len];
    par.index=len;
    arguments.checkVarargsValue(markers,par,typeContext);
  }
  for (int i=0; i < this.parameterCount; i++) {
    par=this.parameters[i + pOff];
    par.index=i;
    arguments.checkValue(markers,par,typeContext);
  }
}
Program: 83882
Project: 83882
Buggy source:
@Override public int getTypeMatch(Parameter param){
  if (param.index > this.size) {
    return 0;
  }
  return this.values[param.index].getTypeMatch(param.type);
}

Fixed version (ground truth):
@Override public int getTypeMatch(Parameter param){
  if (param.index >= this.size) {
    return param.defaultValue != null ? 3 : 0;
  }
  return this.values[param.index].getTypeMatch(param.type);
}
Program: 83883
Project: 83883
Buggy source:
@Override public void writeValue(Parameter param,MethodWriter writer){
  if (param.varargs) {
    IType type=param.type.getElementType();
    int len=this.size - param.index;
    int opcode=type.getArrayStoreOpcode();
    writer.visitLdcInsn(len);
    writer.visitTypeInsn(Opcodes.ANEWARRAY,type);
    for (int i=0; i < len; i++) {
      writer.visitInsn(Opcodes.DUP);
      IValue value=this.values[param.index + i];
      writer.visitLdcInsn(i);
      value.writeExpression(writer);
      writer.visitInsn(opcode);
    }
    return;
  }
  this.values[param.index].writeExpression(writer);
}

Fixed version (ground truth):
@Override public void writeValue(Parameter param,MethodWriter writer){
  if (param.varargs) {
    IType type=param.type.getElementType();
    int len=this.size - param.index;
    int opcode=type.getArrayStoreOpcode();
    writer.visitLdcInsn(len);
    writer.visitTypeInsn(Opcodes.ANEWARRAY,type);
    for (int i=0; i < len; i++) {
      writer.visitInsn(Opcodes.DUP);
      IValue value=this.values[param.index + i];
      writer.visitLdcInsn(i);
      value.writeExpression(writer);
      writer.visitInsn(opcode);
    }
    return;
  }
  if (param.index < this.size) {
    this.values[param.index].writeExpression(writer);
    return;
  }
  param.defaultValue.writeExpression(writer);
}
Program: 83884
Project: 83884
Buggy source:
@Override public Iterator<IValue> iterator(){
  return new ArrayIterator(this.values);
}

Fixed version (ground truth):
@Override public Iterator<IValue> iterator(){
  return new ArrayIterator(this.values,this.size);
}
Program: 83885
Project: 83885
Buggy source:
@Override public int getTypeMatch(Parameter param){
  return param.index == 0 ? this.value.getTypeMatch(param.type) : 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(Parameter param){
  if (param.index == 0) {
    return this.value.getTypeMatch(param.type);
  }
  return param.defaultValue != null ? 3 : 0;
}
Program: 83886
Project: 83886
Buggy source:
@Override public void writeValue(Parameter param,MethodWriter writer){
  if (param.index == 0) {
    this.value.writeExpression(writer);
  }
}

Fixed version (ground truth):
@Override public void writeValue(Parameter param,MethodWriter writer){
  if (param.index == 0) {
    this.value.writeExpression(writer);
    return;
  }
  param.defaultValue.writeExpression(writer);
}
Program: 83887
Project: 83887
Buggy source:
public static void typesToString(String prefix,Iterable<? extends ITyped> list,String seperator,StringBuilder buffer){
  Iterator<? extends ITyped> iterator=list.iterator();
  while (true) {
    IType type=iterator.next().getType();
    if (type == null) {
      buffer.append("String_Node_Str");
    }
 else {
      type.toString(prefix,buffer);
    }
    if (iterator.hasNext()) {
      buffer.append(seperator);
    }
 else {
      break;
    }
  }
}

Fixed version (ground truth):
public static void typesToString(String prefix,Iterable<? extends ITyped> list,String seperator,StringBuilder buffer){
  Iterator<? extends ITyped> iterator=list.iterator();
  if (!iterator.hasNext()) {
    return;
  }
  while (true) {
    IType type=iterator.next().getType();
    if (type == null) {
      buffer.append("String_Node_Str");
    }
 else {
      type.toString(prefix,buffer);
    }
    if (iterator.hasNext()) {
      buffer.append(seperator);
    }
 else {
      break;
    }
  }
}
Program: 83888
Project: 83888
Buggy source:
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  if (this.mode == NAME) {
    this.annotation=new Annotation(token.raw(),token.value().substring(1));
    this.mode=PARAMETERS_START;
    if (!token.next().isType(Tokens.OPEN_PARENTHESIS)) {
      this.annotatable.addAnnotation(this.annotation);
      pm.popParser();
    }
    return true;
  }
  if (this.isInMode(PARAMETERS_START)) {
    if (token.isType(Tokens.OPEN_PARENTHESIS)) {
      pm.pushParser(new ExpressionMapParser(this.annotation));
      this.mode=PARAMETERS_END;
      return true;
    }
  }
  if (this.isInMode(PARAMETERS_END)) {
    if (token.isType(Tokens.CLOSE_PARENTHESIS)) {
      this.annotation.expandPosition(token);
      this.annotatable.addAnnotation(this.annotation);
      pm.popParser();
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      this.annotation=new Annotation(token.raw(),token.value().substring(1));
      this.mode=PARAMETERS_START;
      if (token.next().type() != Tokens.OPEN_PARENTHESIS) {
        this.annotatable.addAnnotation(this.annotation);
        pm.popParser();
      }
      return true;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Tokens.OPEN_PARENTHESIS) {
      pm.pushParser(new ExpressionMapParser(this.annotation));
      this.mode=PARAMETERS_END;
      return true;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Tokens.CLOSE_PARENTHESIS) {
      this.annotation.expandPosition(token);
      this.annotatable.addAnnotation(this.annotation);
      pm.popParser();
      return true;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  return false;
}
Program: 83889
Project: 83889
Buggy source:
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  if (this.isInMode(LABEL)) {
    if (token.next().isType(Tokens.COLON)) {
      this.label=token.value();
      pm.skip();
      return true;
    }
  }
  int type=token.type();
  if (this.isInMode(INSTRUCTION)) {
    if (ParserUtil.isIdentifier(type)) {
      String name=token.value();
      Instruction insn=Instruction.parse(name);
      if (insn == null) {
        this.mode=INSTRUCTION | LABEL;
        throw new SyntaxError(token,"String_Node_Str" + name + "String_Node_Str");
      }
      if (this.label != null) {
        this.bytecode.addInstruction(insn,this.label);
        this.label=null;
      }
 else {
        this.bytecode.addInstruction(insn);
      }
      insn.setPosition(token);
      this.instruction=insn;
      this.mode=ARGUMENTS;
      return true;
    }
  }
  if (this.isInMode(ARGUMENTS)) {
    if (type == Tokens.SEMICOLON) {
      this.mode=INSTRUCTION | LABEL;
      return true;
    }
    if (type == Tokens.COMMA) {
      return true;
    }
    if (!ParserUtil.isTerminator(type)) {
      if (this.instruction == null) {
        throw new SyntaxError(token,"String_Node_Str" + token.value() + "String_Node_Str");
      }
 else       if (!this.instruction.addArgument(token.object())) {
        throw new SyntaxError(token,"String_Node_Str" + token.value() + "String_Node_Str"+ this.instruction.getName());
      }
      return true;
    }
  }
  pm.popParser(true);
  return true;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  if (this.isInMode(LABEL)) {
    if (token.next().type() == Tokens.COLON) {
      this.label=token.value();
      pm.skip();
      return true;
    }
  }
  int type=token.type();
  if (this.isInMode(INSTRUCTION)) {
    if (ParserUtil.isIdentifier(type)) {
      String name=token.value();
      Instruction insn=Instruction.parse(name);
      if (insn == null) {
        this.mode=INSTRUCTION | LABEL;
        throw new SyntaxError(token,"String_Node_Str" + name + "String_Node_Str");
      }
      if (this.label != null) {
        this.bytecode.addInstruction(insn,this.label);
        this.label=null;
      }
 else {
        this.bytecode.addInstruction(insn);
      }
      insn.setPosition(token);
      this.instruction=insn;
      this.mode=ARGUMENTS;
      return true;
    }
  }
  if (this.isInMode(ARGUMENTS)) {
    if (type == Tokens.SEMICOLON) {
      this.mode=INSTRUCTION | LABEL;
      return true;
    }
    if (type == Tokens.COMMA) {
      return true;
    }
    if (!ParserUtil.isTerminator(type)) {
      if (this.instruction == null) {
        throw new SyntaxError(token,"String_Node_Str" + token.value() + "String_Node_Str");
      }
 else       if (!this.instruction.addArgument(token.object())) {
        throw new SyntaxError(token,"String_Node_Str" + token.value() + "String_Node_Str"+ this.instruction.getName());
      }
      return true;
    }
  }
  pm.popParser(true);
  return true;
}
Program: 83892
Project: 83892
Buggy source:
@Override public boolean parse(ParserManager jcp,IToken token) throws SyntaxError {
  String value=token.value();
  if (this.isInMode(PACKAGE)) {
    if ("String_Node_Str".equals(value)) {
      this.mode=IMPORT | CLASS;
      jcp.pushParser(new PackageParser(this.unit));
      return true;
    }
  }
  if (this.isInMode(IMPORT)) {
    if ("String_Node_Str".equals(value)) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      this.unit.addImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return true;
    }
    if ("String_Node_Str".equals(value)) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      i.isStatic=true;
      this.unit.addStaticImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return true;
    }
  }
  if (this.isInMode(CLASS)) {
    if (token.isType(Tokens.SEMICOLON)) {
      return true;
    }
    jcp.pushParser(new ClassDeclParser(this.unit),true);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager jcp,IToken token) throws SyntaxError {
  String value=token.value();
  if (this.isInMode(PACKAGE)) {
    if ("String_Node_Str".equals(value)) {
      this.mode=IMPORT | CLASS;
      jcp.pushParser(new PackageParser(this.unit));
      return true;
    }
  }
  if (this.isInMode(IMPORT)) {
    if ("String_Node_Str".equals(value)) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      this.unit.addImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return true;
    }
    if ("String_Node_Str".equals(value)) {
      this.mode=IMPORT | CLASS;
      Import i=new Import(token.raw());
      i.isStatic=true;
      this.unit.addStaticImport(i);
      jcp.pushParser(new ImportParser(null,i));
      return true;
    }
  }
  if (this.isInMode(CLASS)) {
    if (token.type() == Tokens.SEMICOLON) {
      return true;
    }
    jcp.pushParser(new ClassDeclParser(this.unit),true);
    return true;
  }
  return false;
}
Program: 83893
Project: 83893
Buggy source:
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == VALUE) {
    if (ParserUtil.isIdentifier(type)) {
      if (token.next().isType(Tokens.OPEN_CURLY_BRACKET)) {
        DWTNode node=new DWTNode(token.raw(),token.value());
        this.valued.setValue(node);
        pm.popParser();
        pm.pushParser(new DWTParser(node),true);
        return true;
      }
      this.valued.setValue(new DWTReference(token.raw(),token.value()));
      pm.popParser();
      return true;
    }
    if (type == Tokens.OPEN_SQUARE_BRACKET) {
      ValueList list=new DWTList(token);
      this.mode=LIST_END;
      this.valued.setValue(list);
      pm.pushParser(new DWTListParser(list));
      return true;
    }
    IValue primitive=parsePrimitive(token,type);
    if (primitive != null) {
      this.valued.setValue(primitive);
      pm.popParser();
      return true;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == LIST_END) {
    if (type == Tokens.CLOSE_SQUARE_BRACKET) {
      pm.popParser();
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == VALUE) {
    if (ParserUtil.isIdentifier(type)) {
      if (token.next().type() == Tokens.OPEN_CURLY_BRACKET) {
        DWTNode node=new DWTNode(token.raw(),token.value());
        this.valued.setValue(node);
        pm.popParser();
        pm.pushParser(new DWTParser(node),true);
        return true;
      }
      this.valued.setValue(new DWTReference(token.raw(),token.value()));
      pm.popParser();
      return true;
    }
    if (type == Tokens.OPEN_SQUARE_BRACKET) {
      ValueList list=new DWTList(token);
      this.mode=LIST_END;
      this.valued.setValue(list);
      pm.pushParser(new DWTListParser(list));
      return true;
    }
    IValue primitive=parsePrimitive(token,type);
    if (primitive != null) {
      this.valued.setValue(primitive);
      pm.popParser();
      return true;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == LIST_END) {
    if (type == Tokens.CLOSE_SQUARE_BRACKET) {
      pm.popParser();
      return true;
    }
  }
  return false;
}
Program: 83894
Project: 83894
Buggy source:
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return true;
  }
  if (this.mode == 0) {
    if (token.next().isType(Tokens.COLON)) {
      this.label=token.value();
      pm.skip();
      return true;
    }
    this.mode=1;
    pm.pushParser(new ExpressionParser(this),true);
    return true;
  }
  if (this.mode == 1) {
    if (type == Tokens.COMMA) {
      this.valueList.setArray(true);
      this.mode=0;
      return true;
    }
    if (type == Tokens.SEMICOLON) {
      this.mode=0;
      return true;
    }
    if (token.prev().isType(Tokens.CLOSE_CURLY_BRACKET)) {
      pm.pushParser(new ExpressionParser(this),true);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return true;
  }
  if (this.mode == 0) {
    if (token.next().type() == Tokens.COLON) {
      this.label=token.value();
      pm.skip();
      return true;
    }
    this.mode=1;
    pm.pushParser(new ExpressionParser(this),true);
    return true;
  }
  if (this.mode == 1) {
    if (type == Tokens.COMMA) {
      this.valueList.setArray(true);
      this.mode=0;
      return true;
    }
    if (type == Tokens.SEMICOLON) {
      this.mode=0;
      return true;
    }
    if (token.prev().type() == Tokens.CLOSE_CURLY_BRACKET) {
      pm.pushParser(new ExpressionParser(this),true);
      return true;
    }
  }
  return false;
}
Program: 83895
Project: 83895
Buggy source:
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return true;
  }
  if (this.mode == NAME) {
    if (token.next().isType(Tokens.EQUALS)) {
      this.key=token.value();
      pm.skip();
      return true;
    }
    this.mode=VALUE;
  }
  if (this.mode == VALUE) {
    this.mode=SEPERATOR;
    pm.pushTryParser(new ExpressionParser(this),token,true);
    return true;
  }
  if (this.mode == SEPERATOR) {
    if (type == Tokens.COMMA) {
      this.mode=NAME | VALUE;
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (ParserUtil.isCloseBracket(type)) {
    pm.popParser(true);
    return true;
  }
  if (this.mode == NAME) {
    if (token.next().type() == Tokens.EQUALS) {
      this.key=token.value();
      pm.skip();
      return true;
    }
    this.mode=VALUE;
  }
  if (this.mode == VALUE) {
    this.mode=SEPERATOR;
    pm.pushTryParser(new ExpressionParser(this),token,true);
    return true;
  }
  if (this.mode == SEPERATOR) {
    if (type == Tokens.COMMA) {
      this.mode=NAME | VALUE;
      return true;
    }
  }
  return false;
}