nus-yam/ex-repair huggingface dataset:
Program: 85328
Project: 85328
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  writer.visitIntInsn(Opcodes.ALOAD,0);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
  if (field != null) {
    this.field=field;
    return true;
  }
  return false;
}
Program: 85349
Project: 85349
Buggy source:
@Override public IAccess resolve2(IContext context){
  if (this.isSugarCall) {
    if (this.arguments.isEmpty()) {
      IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
      if (field != null) {
        FieldAccess access=new FieldAccess(this.position);
        access.field=field;
        access.instance=this.instance;
        access.name=this.name;
        access.qualifiedName=this.qualifiedName;
        access.dotless=this.dotless;
        return access;
      }
    }
  }
 else   if (this.instance == null) {
    FieldMatch field=context.resolveField(this.qualifiedName);
    if (field != null) {
      FieldAccess access=new FieldAccess(this.position);
      access.field=field.theField;
      access.name=this.name;
      access.qualifiedName=this.qualifiedName;
      access.dotless=this.dotless;
      MethodCall call=new MethodCall(this.position,access,"String_Node_Str");
      call.arguments=this.arguments;
      if (call.resolve(field.theField.getType())) {
        return call;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IAccess resolve2(IContext context){
  if (this.isSugarCall) {
    if (this.arguments.isEmpty()) {
      IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
      if (field != null) {
        FieldAccess access=new FieldAccess(this.position);
        access.field=field;
        access.instance=this.instance;
        access.name=this.name;
        access.qualifiedName=this.qualifiedName;
        access.dotless=this.dotless;
        return access;
      }
    }
  }
 else   if (this.instance == null) {
    FieldMatch field=context.resolveField(this.qualifiedName);
    if (field != null) {
      FieldAccess access=new FieldAccess(this.position);
      access.field=field.theField;
      access.name=this.name;
      access.qualifiedName=this.qualifiedName;
      access.dotless=this.dotless;
      MethodCall call=new MethodCall(this.position,access,"String_Node_Str");
      call.arguments=this.arguments;
      if (call.resolve(field.theField.getType(),null)) {
        return call;
      }
    }
  }
  return null;
}
Program: 85350
Project: 85350
Buggy source:
@Override public boolean resolve(IContext context){
  IMethod method=IAccess.resolveMethod(context,this.instance,this.qualifiedName,this.arguments);
  if (method != null) {
    this.method=method;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  int len=this.arguments.size();
  for (int i=0; i < len; i++) {
    IValue v1=this.arguments.get(i);
    IValue v2=v1.resolve(markers,context);
    if (v1 != v2) {
      this.arguments.set(i,v2);
    }
  }
  IMethod method=IAccess.resolveMethod(context,this.instance,this.qualifiedName,this.arguments);
  if (method != null) {
    this.method=method;
    return true;
  }
  return false;
}
Program: 85351
Project: 85351
Buggy source:
private void generateTypes(){
  int len=this.values.size();
  if (len == 0) {
    this.elementType=Type.VOID;
    this.requiredType=Type.VOID;
    return;
  }
  IType t=this.values.get(0).getType();
  for (int i=1; i < len; i++) {
    IValue v=this.values.get(i);
    t=Type.findCommonSuperType(t,v.getType());
  }
  if (t != null) {
    this.elementType=t;
    this.requiredType=t.clone();
    this.requiredType.addArrayDimension();
  }
}

Fixed version (ground truth):
private void generateTypes(){
  int len=this.values.size();
  if (len == 0) {
    this.elementType=Type.VOID;
    this.requiredType=Type.VOID;
    return;
  }
  IType t=this.values.get(0).getType();
  for (int i=1; i < len; i++) {
    IValue v=this.values.get(i);
    IType t1=v.getType();
    if (t1 == null) {
      t=Type.VOID;
      break;
    }
    t=Type.findCommonSuperType(t,t1);
  }
  if (t != null) {
    this.elementType=t;
    this.requiredType=t.clone();
    this.requiredType.addArrayDimension();
  }
}
Program: 85352
Project: 85352
Buggy source:
@Override public boolean resolve(IContext context){
  IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
  if (field != null) {
    this.field=field;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,List<Marker> markers){
  IField field=IAccess.resolveField(context,this.instance,this.qualifiedName);
  if (field != null) {
    this.field=field;
    return true;
  }
  return false;
}
Program: 85353
Project: 85353
Buggy source:
public static IAccess resolve(List<Marker> markers,IContext context,IAccess access){
  LinkedList<IAccess> chain=getCallChain(markers,context,access);
  ListIterator<IAccess> iterator=chain.listIterator();
  IAccess prev=null;
  IAccess curr=null;
  IAccess alternate=null;
  boolean backwards=false;
  while (iterator.hasNext()) {
    prev=curr;
    curr=iterator.next();
    if (alternate != null) {
      curr.setValue(alternate);
      alternate=null;
    }
    if (!curr.resolve(context)) {
      alternate=curr.resolve2(context);
      if (alternate == null) {
        backwards=true;
      }
 else {
        curr=alternate;
        iterator.set(alternate);
      }
    }
  }
  if (!backwards) {
    return chain.getLast();
  }
 else   if (chain.size() == 1) {
    markers.add(access.getResolveError());
    return access;
  }
  IAccess next=null;
  curr=access;
  prev=null;
  while (true) {
    IValue value=curr.getValue();
    if (value instanceof IAccess) {
      prev=(IAccess)value;
    }
 else {
      break;
    }
    if (!curr.resolve(context)) {
      curr.setValue(null);
      if (curr.resolve(context)) {
        prev.addValue(curr);
        curr=null;
        iterator.remove();
      }
 else {
        curr.setValue(value);
        markers.add(curr.getResolveError());
      }
    }
    next=curr;
    curr=prev;
  }
  return chain.getLast();
}

Fixed version (ground truth):
public static IAccess resolve(List<Marker> markers,IContext context,IAccess access){
  LinkedList<IAccess> chain=getCallChain(markers,context,access);
  ListIterator<IAccess> iterator=chain.listIterator();
  IAccess prev=null;
  IAccess curr=null;
  IAccess alternate=null;
  boolean backwards=false;
  while (iterator.hasNext()) {
    prev=curr;
    curr=iterator.next();
    if (alternate != null) {
      curr.setValue(alternate);
      alternate=null;
    }
    if (!curr.resolve(context,markers)) {
      alternate=curr.resolve2(context);
      if (alternate == null) {
        backwards=true;
        break;
      }
 else {
        curr=alternate;
        iterator.set(alternate);
      }
    }
  }
  if (!backwards) {
    return chain.getLast();
  }
 else   if (chain.size() == 1) {
    markers.add(access.getResolveError());
    return access;
  }
  IAccess next=null;
  curr=access;
  prev=null;
  while (true) {
    IValue value=curr.getValue();
    if (value instanceof IAccess) {
      prev=(IAccess)value;
    }
 else {
      if (!curr.resolve(context,markers)) {
        markers.add(curr.getResolveError());
      }
      break;
    }
    if (!curr.resolve(context,null)) {
      curr.setValue(null);
      if (curr.resolve(context,markers)) {
        prev.addValue(curr);
        curr=null;
        iterator.remove();
      }
 else {
        curr.setValue(value);
        markers.add(curr.getResolveError());
      }
    }
    next=curr;
    curr=prev;
  }
  return chain.getLast();
}
Program: 85354
Project: 85354
Buggy source:
@Override public IClass resolveClass(String name){
  for (  ITypeVariable var : this.generics) {
    if (var.isName(name)) {
      return var.getTheClass();
    }
  }
  return this.unit.resolveClass(name);
}

Fixed version (ground truth):
@Override public IClass resolveClass(String name){
  if (this.generics != null) {
    for (    ITypeVariable var : this.generics) {
      if (var.isName(name)) {
        return var.getTheClass();
      }
    }
  }
  return this.unit.resolveClass(name);
}
Program: 85355
Project: 85355
Buggy source:
@Override public boolean resolve(IContext context,IContext context1){
  if (this.field != null) {
    return true;
  }
  FieldMatch f=context.resolveField(context1,this.qualifiedName);
  if (f != null) {
    this.field=f.theField;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,IContext context1){
  FieldMatch f=context.resolveField(context1,this.qualifiedName);
  if (f != null) {
    this.field=f.theField;
    return true;
  }
  return false;
}
Program: 85356
Project: 85356
Buggy source:
@Override public boolean resolve(IContext context,IContext context1){
  if (this.method != null) {
    return true;
  }
  IType[] types=this.getTypes();
  if (types == null) {
    return false;
  }
  MethodMatch match=context.resolveMethod(context1,this.qualifiedName,types);
  if (match != null) {
    this.method=match.theMethod;
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean resolve(IContext context,IContext context1){
  IType[] types=this.getTypes();
  if (types == null) {
    return false;
  }
  MethodMatch match=context.resolveMethod(context1,this.qualifiedName,types);
  if (match != null) {
    this.method=match.theMethod;
    return true;
  }
  return false;
}
Program: 85357
Project: 85357
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.context=context;
  IVariableList variableList=context instanceof IVariableList ? (IVariableList)context : null;
  for (  IValue v : this.values) {
    if (!(v instanceof FieldAssign)) {
      continue;
    }
    FieldAssign assign=(FieldAssign)v;
    if (!assign.initializer) {
      continue;
    }
    Variable var=(Variable)assign.field;
    var.start=this.start;
    var.end=this.end;
    this.variables.put(assign.qualifiedName,assign.field);
    if (variableList != null) {
      variableList.addVariable(var);
    }
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  this.context=context;
  IVariableList variableList=context instanceof IVariableList ? (IVariableList)context : null;
  for (  IValue v : this.values) {
    v.resolveTypes(markers,context);
    if (!(v instanceof FieldAssign)) {
      continue;
    }
    FieldAssign assign=(FieldAssign)v;
    if (!assign.initializer) {
      continue;
    }
    Variable var=(Variable)assign.field;
    var.start=this.start;
    var.end=this.end;
    this.variables.put(assign.qualifiedName,assign.field);
    if (variableList != null) {
      variableList.addVariable(var);
    }
  }
}
Program: 85358
Project: 85358
Buggy source:
private Token addToken(Token prev,StringBuilder buf,int type,int line,int start,int end){
  String s=buf.toString();
  buf.delete(0,buf.length());
  return this.addToken(prev,s,type,line,start,end);
}

Fixed version (ground truth):
private Token addToken(Token prev,StringBuilder buf,int type,int line,int start){
  String s=buf.toString();
  int len=buf.length();
  buf.delete(0,len);
  return this.addToken(prev,s,type,line,start,len);
}
Program: 85360
Project: 85360
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.name == null) {
    buffer.append('_');
  }
 else {
    buffer.append(this.name);
  }
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
 else {
    buffer.append(Formatting.Type.genericUpperBound);
    if (this.upperBound != null) {
      this.upperBound.toString(prefix,buffer);
      if (this.upperBounds != null) {
        buffer.append(Formatting.Type.genericBoundSeperator);
      }
    }
    if (this.upperBounds != null) {
      Util.astToString(this.upperBounds,Formatting.Type.genericBoundSeperator,buffer);
    }
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.name == null) {
    buffer.append('_');
  }
 else {
    buffer.append(this.name);
  }
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
 else   if (this.upperBound != null || this.upperBounds != null) {
    buffer.append(Formatting.Type.genericUpperBound);
    if (this.upperBound != null) {
      this.upperBound.toString(prefix,buffer);
      if (this.upperBounds != null) {
        buffer.append(Formatting.Type.genericBoundSeperator);
      }
    }
    if (this.upperBounds != null) {
      Util.astToString(this.upperBounds,Formatting.Type.genericBoundSeperator,buffer);
    }
  }
}
Program: 85361
Project: 85361
Buggy source:
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.upperBounds != null) {
    for (ListIterator<IType> iterator=this.upperBounds.listIterator(); iterator.hasNext(); ) {
      IType t1=iterator.next();
      IType t2=t1.resolve(context);
      if (!t2.isResolved()) {
        markers.add(new SemanticError(t2.getPosition(),"String_Node_Str" + t2 + "String_Node_Str"));
        continue;
      }
      IClass iclass=t2.getTheClass();
      if (iclass != null && !iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
        if (this.upperBound != null) {
          markers.add(new SemanticError(t2.getPosition(),"String_Node_Str" + this.name + "String_Node_Str"));
        }
        iterator.remove();
        this.upperBound=t2;
        continue;
      }
      if (t1 != t2) {
        iterator.set(t2);
      }
    }
    if (this.upperBounds.isEmpty()) {
      this.upperBounds=null;
    }
    this.captureClass=new CaptureClass(this,this.upperBound,this.upperBounds);
  }
 else   if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolve(context);
    if (!this.lowerBound.isResolved()) {
      markers.add(new SemanticError(this.lowerBound.getPosition(),"String_Node_Str" + this.lowerBound + "String_Node_Str"));
    }
    this.captureClass=Type.OBJECT.theClass;
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(List<Marker> markers,IContext context){
  if (this.upperBounds != null) {
    for (ListIterator<IType> iterator=this.upperBounds.listIterator(); iterator.hasNext(); ) {
      IType t1=iterator.next();
      IType t2=t1.resolve(context);
      if (!t2.isResolved()) {
        markers.add(new SemanticError(t2.getPosition(),"String_Node_Str" + t2 + "String_Node_Str"));
        continue;
      }
      IClass iclass=t2.getTheClass();
      if (iclass != null && !iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
        if (this.upperBound != null) {
          markers.add(new SemanticError(t2.getPosition(),"String_Node_Str" + this.name + "String_Node_Str"));
        }
        iterator.remove();
        this.upperBound=t2;
        continue;
      }
      if (t1 != t2) {
        iterator.set(t2);
      }
    }
    if (this.upperBounds.isEmpty()) {
      this.upperBounds=null;
    }
    this.captureClass=new CaptureClass(this,this.upperBound,this.upperBounds);
  }
 else   if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolve(context);
    if (!this.lowerBound.isResolved()) {
      markers.add(new SemanticError(this.lowerBound.getPosition(),"String_Node_Str" + this.lowerBound + "String_Node_Str"));
    }
  }
  this.captureClass=Type.OBJECT.theClass;
}
Program: 85363
Project: 85363
Buggy source:
public static void main(String[] args){
  initLogger();
  parser.parse(new CodeFile(args[0]),new ConfigParser(config));
  for (  Library library : config.libraries) {
    library.loadLibrary();
  }
  Type.init();
  for (int i=1; i < args.length; i++) {
    addStates(args[i]);
  }
  run();
}

Fixed version (ground truth):
public static void main(String[] args){
  for (int i=1; i < args.length; i++) {
    addStates(args[i]);
  }
  initLogger();
  parser.parse(new CodeFile(args[0]),new ConfigParser(config));
  for (  Library library : config.libraries) {
    library.loadLibrary();
  }
  Type.init();
  run();
}
Program: 85364
Project: 85364
Buggy source:
@Override public boolean isSuperType(Type t){
  if (t.equals(this.superClass) || this.interfaces.contains(t)) {
    return true;
  }
 else   if (this.superClass.theClass != null) {
    return this.superClass.theClass.isSuperType(t);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isSuperType(Type t){
  if (t.equals(this.superClass) || this.interfaces.contains(t)) {
    return true;
  }
 else   if (this.superClass != null && this.superClass.theClass != null) {
    return this.superClass.theClass.isSuperType(t);
  }
  return false;
}
Program: 85365
Project: 85365
Buggy source:
@Override public IAccess resolve2(IContext context,IContext context1){
  String name=this.type.name;
  FieldMatch f=context.resolveField(context1,name);
  if (f != null) {
    FieldAccess access=new FieldAccess(this.position,null,name);
    access.field=f.theField;
    return access;
  }
  MethodMatch m=context.resolveMethod(context1,name,Type.EMPTY_TYPES);
  if (m != null) {
    MethodCall call=new MethodCall(this.position,null,name);
    call.method=m.theMethod;
    return call;
  }
  return this;
}

Fixed version (ground truth):
@Override public IAccess resolve2(IContext context,IContext context1){
  String name=this.type.name;
  FieldMatch f=context.resolveField(context1,name);
  if (f != null) {
    FieldAccess access=new FieldAccess(this.position,null,name);
    access.field=f.theField;
    return access;
  }
  MethodMatch m=context.resolveMethod(context1,name,Type.EMPTY_TYPES);
  if (m != null) {
    MethodCall call=new MethodCall(this.position,null,name);
    call.method=m.theMethod;
    call.isSugarCall=true;
    return call;
  }
  return this;
}
Program: 85366
Project: 85366
Buggy source:
@Override public IValue applyState(CompilerState state,IContext context){
  if (state == CompilerState.RESOLVE_TYPES) {
    if (this.initializer) {
      this.field.applyState(state,context);
    }
  }
 else   if (state == CompilerState.RESOLVE) {
    this.value.applyState(state,context);
    return AccessResolver.resolve(context,this);
  }
 else   if (state == CompilerState.CHECK) {
    if (this.value instanceof ThisValue) {
      state.addMarker(new SyntaxError(this.position,"String_Node_Str"));
      this.value=null;
    }
  }
  if (this.value != null) {
    this.value=this.value.applyState(state,context);
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue applyState(CompilerState state,IContext context){
  if (state == CompilerState.RESOLVE_TYPES) {
    if (this.initializer) {
      this.field.applyState(state,context);
    }
  }
 else   if (state == CompilerState.RESOLVE) {
    if (this.value != null) {
      this.value.applyState(state,context);
    }
    return AccessResolver.resolve(context,this);
  }
 else   if (state == CompilerState.CHECK) {
    if (this.value instanceof ThisValue) {
      state.addMarker(new SyntaxError(this.position,"String_Node_Str"));
      this.value=null;
    }
  }
  if (this.value != null) {
    this.value=this.value.applyState(state,context);
  }
  return this;
}
Program: 85367
Project: 85367
Buggy source:
@Override public IValue applyState(CompilerState state,IContext context){
  int len=this.values.size();
  if (state == CompilerState.FOLD_CONSTANTS) {
    if (len == 1) {
      return this.values.get(0);
    }
  }
 else   if (state == CompilerState.RESOLVE) {
    IVariableList variableList=context instanceof IVariableList ? (IVariableList)context : null;
    for (    IValue v : this.values) {
      v.applyState(state,context);
      if (!(v instanceof FieldAssign)) {
        continue;
      }
      FieldAssign assign=(FieldAssign)v;
      if (!assign.initializer) {
        continue;
      }
      Variable var=(Variable)assign.field;
      var.start=this.start;
      var.end=this.end;
      this.variables.put(assign.qualifiedName,assign.field);
      if (variableList != null) {
        variableList.addVariable((Variable)assign.field);
      }
    }
  }
  this.context=context;
  for (int i=0; i < len; i++) {
    IValue v=this.values.get(i);
    this.values.set(i,v.applyState(state,this));
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue applyState(CompilerState state,IContext context){
  int len=this.values.size();
  if (state == CompilerState.FOLD_CONSTANTS) {
    if (len == 1) {
      return this.values.get(0);
    }
  }
 else   if (state == CompilerState.RESOLVE) {
    IVariableList variableList=context instanceof IVariableList ? (IVariableList)context : null;
    for (    IValue v : this.values) {
      v.applyState(state,this);
      if (!(v instanceof FieldAssign)) {
        continue;
      }
      FieldAssign assign=(FieldAssign)v;
      if (!assign.initializer) {
        continue;
      }
      Variable var=(Variable)assign.field;
      var.start=this.start;
      var.end=this.end;
      this.variables.put(assign.qualifiedName,assign.field);
      if (variableList != null) {
        variableList.addVariable((Variable)assign.field);
      }
    }
  }
  this.context=context;
  for (int i=0; i < len; i++) {
    IValue v=this.values.get(i);
    this.values.set(i,v.applyState(state,this));
  }
  return this;
}
Program: 85368
Project: 85368
Buggy source:
@Override public void writeSet(MethodVisitor visitor){
  visitor.visitVarInsn(Opcodes.ASTORE,this.index);
}

Fixed version (ground truth):
@Override public void writeSet(MethodVisitor visitor){
  visitor.visitVarInsn(this.type.getStoreOpcode(),this.index);
}
Program: 85369
Project: 85369
Buggy source:
@Override public void writeGet(MethodVisitor visitor){
  visitor.visitVarInsn(Opcodes.ALOAD,this.index);
}

Fixed version (ground truth):
@Override public void writeGet(MethodVisitor visitor){
  visitor.visitVarInsn(this.type.getLoadOpcode(),this.index);
}
Program: 85370
Project: 85370
Buggy source:
@Override public void writeSet(MethodVisitor visitor){
  visitor.visitVarInsn(Opcodes.ASTORE,this.index);
}

Fixed version (ground truth):
@Override public void writeSet(MethodVisitor visitor){
  visitor.visitVarInsn(this.type.getStoreOpcode(),this.index);
}
Program: 85371
Project: 85371
Buggy source:
@Override public void writeGet(MethodVisitor visitor){
  visitor.visitVarInsn(Opcodes.ALOAD,this.index);
}

Fixed version (ground truth):
@Override public void writeGet(MethodVisitor visitor){
  visitor.visitVarInsn(this.type.getLoadOpcode(),this.index);
}
Program: 85372
Project: 85372
Buggy source:
@Override public MethodMatch resolveMethod(IContext context,String name,Type... argumentTypes){
  if (this.theClass == null || argumentTypes == null) {
    return null;
  }
  List<MethodMatch> list=new ArrayList();
  this.theClass.getMethodMatches(list,null,name,argumentTypes);
  if (list.isEmpty() && context != null) {
    Type t=context.getThisType();
    t.theClass.getMethodMatches(list,this,name,argumentTypes);
  }
  if (list.isEmpty()) {
    return null;
  }
  Collections.sort(list);
  return list.get(0);
}

Fixed version (ground truth):
@Override public MethodMatch resolveMethod(IContext context,String name,Type... argumentTypes){
  if (this.theClass == null) {
    return null;
  }
  List<MethodMatch> list=new ArrayList();
  this.theClass.getMethodMatches(list,null,name,argumentTypes);
  if (list.isEmpty() && context != null) {
    Type t=context.getThisType();
    t.theClass.getMethodMatches(list,this,name,argumentTypes);
  }
  if (list.isEmpty()) {
    return null;
  }
  Collections.sort(list);
  return list.get(0);
}
Program: 85375
Project: 85375
Buggy source:
@Override public default void setTypes(List<Type> types){
  int index=0;
  for (  Type type : types) {
    this.addParameter(new Parameter("String_Node_Str" + index,type,0));
  }
}

Fixed version (ground truth):
@Override public default void setTypes(List<Type> types){
  int index=0;
  for (  Type type : types) {
    this.addParameter(new Parameter(index,"String_Node_Str" + index,type,0));
    index++;
  }
}
Program: 85376
Project: 85376
Buggy source:
@Override public default void addType(Type type){
  int index=this.getParameters().size();
  this.addParameter(new Parameter("String_Node_Str" + index,type,0));
}

Fixed version (ground truth):
@Override public default void addType(Type type){
  int index=this.getParameters().size();
  this.addParameter(new Parameter(index,"String_Node_Str" + index,type,0));
}
Program: 85377
Project: 85377
Buggy source:
public default void addParameter(Parameter parameter){
  this.getParameters().add(parameter);
}

Fixed version (ground truth):
public default void addParameter(Parameter parameter){
  List<Parameter> parameters=this.getParameters();
  parameter.index=parameters.size();
  parameters.add(parameter);
}
Program: 85378
Project: 85378
Buggy source:
@Override public void write(MethodVisitor visitor){
  if (this.instance != null) {
    this.instance.write(visitor);
  }
  int opcode;
  if (this.field.hasModifier(Modifiers.STATIC)) {
    opcode=Opcodes.GETSTATIC;
  }
 else {
    opcode=Opcodes.GETFIELD;
  }
  String owner=this.field.getTheClass().getInternalName();
  String name=this.field.getName();
  String desc=this.field.getDescription();
  visitor.visitFieldInsn(opcode,owner,name,desc);
}

Fixed version (ground truth):
@Override public void write(MethodVisitor visitor){
  if (this.instance != null) {
    this.instance.write(visitor);
  }
  if (this.field instanceof Parameter) {
    visitor.visitIntInsn(Opcodes.ALOAD,((Parameter)this.field).index);
    return;
  }
  int opcode;
  if (this.field.hasModifier(Modifiers.STATIC)) {
    opcode=Opcodes.GETSTATIC;
  }
 else {
    opcode=Opcodes.GETFIELD;
  }
  String owner=this.field.getTheClass().getInternalName();
  String name=this.field.getName();
  String desc=this.field.getDescription();
  visitor.visitFieldInsn(opcode,owner,name,desc);
}
Program: 85379
Project: 85379
Buggy source:
@Override public int getSignatureMatch(String name,Type type,Type... argumentTypes){
  if (name.equals(this.name)) {
    int pOff=0;
    int match=1;
    int len=argumentTypes.length;
    List<Parameter> parameters=this.parameters;
    if (type != null && (this.modifiers & Modifiers.IMPLICIT) != 0) {
      if (len != parameters.size() - 1) {
        return 0;
      }
      Type t2=parameters.get(0).type;
      if (type.equals(t2)) {
        match+=2;
      }
 else       if (Type.isSuperType(type,t2)) {
        match+=1;
      }
 else {
        return 0;
      }
      pOff=1;
    }
 else     if (len != argumentTypes.length) {
      return 0;
    }
    for (int i=0; i < len; i++) {
      Type t1=parameters.get(i + pOff).type;
      Type t2=argumentTypes[i];
      if (t1.equals(t2)) {
        match+=2;
      }
 else       if (Type.isSuperType(t1,t2)) {
        match+=1;
      }
 else {
        return 0;
      }
    }
    return match;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getSignatureMatch(String name,Type type,Type... argumentTypes){
  if (name.equals(this.name)) {
    int pOff=0;
    int match=1;
    int len=argumentTypes.length;
    List<Parameter> parameters=this.parameters;
    if (type != null && (this.modifiers & Modifiers.IMPLICIT) != 0) {
      if (len != parameters.size() - 1) {
        return 0;
      }
      Type t2=parameters.get(0).type;
      if (type.equals(t2)) {
        match+=2;
      }
 else       if (Type.isSuperType(type,t2)) {
        match+=1;
      }
 else {
        return 0;
      }
      pOff=1;
    }
 else     if (len != this.parameters.size()) {
      return 0;
    }
    for (int i=0; i < len; i++) {
      Type t1=parameters.get(i + pOff).type;
      Type t2=argumentTypes[i];
      if (t1.equals(t2)) {
        match+=2;
      }
 else       if (Type.isSuperType(t1,t2)) {
        match+=1;
      }
 else {
        return 0;
      }
    }
    return match;
  }
  return 0;
}
Program: 85380
Project: 85380
Buggy source:
public Parameter(String name,Type type,int modifiers,char seperator){
  super(null,name,type,modifiers);
  this.seperator=seperator;
}

Fixed version (ground truth):
public Parameter(int index,String name,Type type,int modifiers,char seperator){
  super(null,name,type,modifiers);
  this.index=index;
  this.seperator=seperator;
}
Program: 85382
Project: 85382
Buggy source:
public static IAccess resolve(IContext context,IAccess access){
  List<Marker> markers=CompilerState.RESOLVE.file.markers;
  LinkedList<IAccess> chain=getCallChain(access);
  IAccess a=null;
  ListIterator<IAccess> iterator=chain.listIterator();
  while (iterator.hasNext()) {
    IContext context1=context;
    IAccess iaccess=iterator.next();
    if (a != null) {
      context1=a.getType();
    }
 else {
      IValue value=iaccess.getValue();
      if (value != null) {
        context1=value.getType();
      }
    }
    if (!iaccess.resolve(context1,context)) {
      IAccess iaccess2=iaccess.resolve2(context1,context);
      if (iaccess2 == iaccess) {
        markers.add(iaccess.getResolveError());
        return access;
      }
      a=iaccess2;
      continue;
    }
    a=iaccess;
  }
  return access;
}

Fixed version (ground truth):
public static IAccess resolve(IContext context,IAccess access){
  List<Marker> markers=CompilerState.RESOLVE.file.markers;
  LinkedList<IAccess> chain=getCallChain(access);
  IAccess a=null;
  ListIterator<IAccess> iterator=chain.listIterator();
  while (iterator.hasNext()) {
    IContext context1=context;
    IAccess iaccess=iterator.next();
    if (a != null) {
      context1=a.getType();
      iaccess.setValue(a);
    }
 else {
      IValue value=iaccess.getValue();
      if (value != null) {
        context1=value.getType();
      }
    }
    if (!iaccess.resolve(context1,context)) {
      IAccess iaccess2=iaccess.resolve2(context1,context);
      if (iaccess2 == iaccess) {
        markers.add(iaccess.getResolveError());
        return access;
      }
      a=iaccess2;
      continue;
    }
    a=iaccess;
  }
  return a;
}
Program: 85383
Project: 85383
Buggy source:
@Override public IAccess applyState(CompilerState state,IContext context){
  super.applyState(state,context);
  this.arguments.replaceAll(v -> v.applyState(state,context));
  if (state == CompilerState.RESOLVE) {
    return AccessResolver.resolve(context,this);
  }
 else   if (this.instance != null) {
    this.instance=this.instance.applyState(state,context);
  }
  return this;
}

Fixed version (ground truth):
@Override public IAccess applyState(CompilerState state,IContext context){
  if (state == CompilerState.RESOLVE) {
    return AccessResolver.resolve(context,this);
  }
 else {
    super.applyState(state,context);
    if (this.instance != null) {
      this.instance=this.instance.applyState(state,context);
    }
    this.arguments.replaceAll(v -> v.applyState(state,context));
    return this;
  }
}