nus-yam/ex-repair huggingface dataset:
Program: 84049
Project: 84049
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: 84050
Project: 84050
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: 84051
Project: 84051
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: 84052
Project: 84052
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: 84053
Project: 84053
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: 84054
Project: 84054
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: 84055
Project: 84055
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: 84056
Project: 84056
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: 84057
Project: 84057
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: 84058
Project: 84058
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: 84059
Project: 84059
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: 84061
Project: 84061
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: 84062
Project: 84062
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: 84064
Project: 84064
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: 84065
Project: 84065
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: 84066
Project: 84066
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: 84067
Project: 84067
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: 84068
Project: 84068
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: 84069
Project: 84069
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: 84070
Project: 84070
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: 84071
Project: 84071
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: 84072
Project: 84072
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: 84073
Project: 84073
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: 84076
Project: 84076
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: 84077
Project: 84077
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: 84078
Project: 84078
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: 84079
Project: 84079
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: 84080
Project: 84080
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: 84081
Project: 84081
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: 84083
Project: 84083
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: 84084
Project: 84084
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;
  }
}
Program: 84085
Project: 84085
Buggy source:
@Override public void setValue(IValue value){
  if (this.isSugarCall) {
    this.arguments.add(value);
  }
 else {
    this.instance=value;
  }
}

Fixed version (ground truth):
@Override public void setValue(IValue value){
  this.instance=value;
}
Program: 84086
Project: 84086
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 != 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;
}

Fixed version (ground truth):
@Override public int getSignatureMatch(String name,Type type,Type... argumentTypes){
  if (name.equals(this.qualifiedName)) {
    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: 84089
Project: 84089
Buggy source:
@Override public Type getType(){
  return Type.CLASS;
}

Fixed version (ground truth):
@Override public Type getType(){
  return this.type;
}
Program: 84090
Project: 84090
Buggy source:
@Override public CompilationUnit applyState(CompilerState state,IContext context){
  if (state == CompilerState.TOKENIZE) {
    this.tokens=Dyvilc.parser.tokenize(this.getFile());
    return this;
  }
 else   if (state == CompilerState.PARSE) {
    Dyvilc.parser.pushParser(new CompilationUnitParser(this));
    Dyvilc.parser.parse(this.getFile(),this.tokens);
    this.tokens=null;
    return this;
  }
 else   if (state == CompilerState.DEBUG) {
    List<Marker> markers=this.getFile().markers;
    int size=markers.size();
    if (size > 0) {
      System.out.println("String_Node_Str" + this.name + "String_Node_Str"+ size);
      for (      Marker marker : this.getFile().markers) {
        marker.print(System.err);
      }
    }
    return this;
  }
 else   if (state == CompilerState.RESOLVE_TYPES) {
switch (this.pack.check(this.packageDecl)) {
case 0:
      break;
case 1:
    state.addMarker(new SemanticError(new CodePosition((CodeFile)this.position,1,0,1),"String_Node_Str","String_Node_Str" + this.pack.name + "String_Node_Str"));
  break;
case 2:
state.addMarker(new SemanticError(this.packageDecl.getPosition(),"String_Node_Str","String_Node_Str" + this.pack.name + "String_Node_Str"));
break;
case 3:
state.addMarker(new SemanticError(this.packageDecl.getPosition(),"String_Node_Str","String_Node_Str"));
break;
}
for (IImport i : this.imports) {
i.applyState(state,this);
}
}
this.classes.replaceAll(c -> c.applyState(state,this));
return this;
}

Fixed version (ground truth):
@Override public CompilationUnit applyState(CompilerState state,IContext context){
  if (state == CompilerState.TOKENIZE) {
    this.tokens=Dyvilc.parser.tokenize(this.getFile());
    return this;
  }
 else   if (state == CompilerState.PARSE) {
    Dyvilc.parser.pushParser(new CompilationUnitParser(this));
    Dyvilc.parser.parse(this.getFile(),this.tokens);
    this.tokens=null;
    return this;
  }
 else   if (state == CompilerState.DEBUG) {
synchronized (this) {
      List<Marker> markers=this.getFile().markers;
      int size=markers.size();
      if (size > 0) {
        System.out.println("String_Node_Str" + this.name + "String_Node_Str"+ size);
        for (        Marker marker : this.getFile().markers) {
          marker.print(System.err);
        }
      }
    }
    return this;
  }
 else   if (state == CompilerState.RESOLVE_TYPES) {
switch (this.pack.check(this.packageDecl)) {
case 0:
      break;
case 1:
    state.addMarker(new SemanticError(new CodePosition((CodeFile)this.position,1,0,1),"String_Node_Str","String_Node_Str" + this.pack.name + "String_Node_Str"));
  break;
case 2:
state.addMarker(new SemanticError(this.packageDecl.getPosition(),"String_Node_Str","String_Node_Str" + this.pack.name + "String_Node_Str"));
break;
case 3:
state.addMarker(new SemanticError(this.packageDecl.getPosition(),"String_Node_Str","String_Node_Str"));
break;
}
for (IImport i : this.imports) {
i.applyState(state,this);
}
}
this.classes.replaceAll(c -> c.applyState(state,this));
return this;
}
Program: 84091
Project: 84091
Buggy source:
@Override public ClassAccess applyState(CompilerState state,IContext context){
  this.type=this.type.applyState(state,context);
  return this;
}

Fixed version (ground truth):
@Override public IValue applyState(CompilerState state,IContext context){
  if (state == CompilerState.RESOLVE_TYPES) {
    this.type=this.type.resolve(context);
  }
 else   if (state == CompilerState.RESOLVE) {
    if (!this.type.isResolved()) {
      String name=this.type.name;
      IField field=context.resolveField(name);
      if (field != null) {
        FieldAccess access=new FieldAccess(this.position,null,name);
        access.field=field;
        return access;
      }
      IMethod method=context.resolveMethod(name,Type.EMPTY_TYPES);
      if (method != null) {
        MethodCall call=new MethodCall(this.position,null,name);
        call.method=method;
        return call;
      }
      state.addMarker(new SemanticError(this.position,"String_Node_Str" + name + "String_Node_Str"));
    }
  }
  return this;
}
Program: 84092
Project: 84092
Buggy source:
@Override public FieldAccess applyState(CompilerState state,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.applyState(state,context);
  }
  if (state == CompilerState.RESOLVE) {
    if (this.instance != null) {
      context=this.instance.getType();
    }
    this.field=context.resolveField(this.name);
    if (this.field == null) {
      state.addMarker(new SemanticError(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
    }
 else     if (this.field.hasModifier(Modifiers.STATIC) && this.instance instanceof ThisValue) {
      state.addMarker(new Warning(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
      this.instance=null;
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue applyState(CompilerState state,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.applyState(state,context);
  }
  if (state == CompilerState.RESOLVE) {
    if (this.instance != null) {
      context=this.instance.getType();
    }
    this.field=context.resolveField(this.name);
    if (this.field == null) {
      IMethod method=context.resolveMethod(this.name,Type.EMPTY_TYPES);
      if (method != null) {
        MethodCall call=new MethodCall(this.position,this.instance,this.name);
        call.method=method;
        call.isSugarCall=true;
        return call;
      }
      state.addMarker(new SemanticError(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
    }
 else     if (this.field.hasModifier(Modifiers.STATIC) && this.instance instanceof ThisValue) {
      state.addMarker(new Warning(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
      this.instance=null;
    }
  }
  return this;
}
Program: 84093
Project: 84093
Buggy source:
@Override public Type getType(){
  return this.descriptor.getType();
}

Fixed version (ground truth):
@Override public Type getType(){
  return this.method.getType();
}
Program: 84094
Project: 84094
Buggy source:
@Override public IValue applyState(CompilerState state,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.applyState(state,context);
  }
  super.applyState(state,context);
  if (state == CompilerState.RESOLVE) {
    if (this.instance != null) {
      context=this.instance.getType();
    }
    try {
      this.descriptor=context.resolveMethod(this.name,this.getTypes());
    }
 catch (    Exception ex) {
    }
    if (this.descriptor == null) {
      IField field=context.resolveField(this.name);
      if (field != null) {
        FieldAccess fieldAccess=new FieldAccess(this.position,this.instance,this.name);
        fieldAccess.field=field;
        fieldAccess.isSugarAccess=this.isSugarCall;
        return fieldAccess;
      }
      state.addMarker(new SemanticError(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
    }
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue applyState(CompilerState state,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.applyState(state,context);
  }
  super.applyState(state,context);
  if (state == CompilerState.RESOLVE) {
    if (this.instance != null) {
      context=this.instance.getType();
    }
    try {
      this.method=context.resolveMethod(this.name,this.getTypes());
    }
 catch (    Exception ex) {
    }
    if (this.method == null) {
      IField field=context.resolveField(this.name);
      if (field != null) {
        FieldAccess fieldAccess=new FieldAccess(this.position,this.instance,this.name);
        fieldAccess.field=field;
        fieldAccess.isSugarAccess=this.isSugarCall;
        return fieldAccess;
      }
      state.addMarker(new SemanticError(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
    }
  }
  return this;
}
Program: 84095
Project: 84095
Buggy source:
@Override public Type applyState(CompilerState state,IContext context){
  if (this.position == null) {
    return this;
  }
  if (state == CompilerState.RESOLVE_TYPES) {
    if (this.theClass == null) {
switch (this.name) {
case "String_Node_Str":
        return VOID;
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":
return CHAR;
case "String_Node_Str":
return BOOL;
}
this.theClass=context.resolveClass(this.name);
if (this.theClass == null) {
state.addMarker(new SemanticError(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
}
}
}
return this;
}

Fixed version (ground truth):
@Override public Type applyState(CompilerState state,IContext context){
  if (this.position == null) {
    return this;
  }
  if (state == CompilerState.RESOLVE_TYPES) {
    Type type=this.resolve(context);
    if (!type.isResolved()) {
      state.addMarker(new SemanticError(this.position,"String_Node_Str" + this.name + "String_Node_Str"));
    }
    return type;
  }
  return this;
}
Program: 84096
Project: 84096
Buggy source:
/** 
 * Parses the given   {@link IToken} {@code token}. You can override this method to sort out comments.
 * @see Parser#parse(ParserManager,String,IToken)
 * @param value the value of the token
 * @param token the token
 * @throws SyntaxError syntax errors
 */
public void parseToken(String value,IToken token) throws SyntaxError {
  boolean parsed;
  try {
    parsed=this.currentParser.parse(this,value,token);
  }
 catch (  SyntaxError error) {
    throw error;
  }
catch (  Exception ex) {
    throw new SyntaxError("String_Node_Str" + value + "String_Node_Str"+ ex.getMessage());
  }
  if (!parsed) {
    throw new SyntaxError("String_Node_Str" + value + "String_Node_Str","String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Parses the given   {@link IToken} {@code token}. You can override this method to sort out comments.
 * @see Parser#parse(ParserManager,String,IToken)
 * @param value the value of the token
 * @param token the token
 * @throws SyntaxError syntax errors
 */
public void parseToken(String value,IToken token) throws SyntaxError {
  boolean parsed;
  try {
    parsed=this.currentParser.parse(this,value,token);
  }
 catch (  SyntaxError error) {
    throw error;
  }
catch (  Exception ex) {
    String message=ex.getMessage();
    if (message == null) {
      message=ex.getClass().getName();
    }
    throw new SyntaxError("String_Node_Str" + value + "String_Node_Str"+ message);
  }
  if (!parsed) {
    throw new SyntaxError("String_Node_Str" + value + "String_Node_Str","String_Node_Str");
  }
}
Program: 84098
Project: 84098
Buggy source:
@Override public boolean parse(ParserManager jcp,String value,IToken token) throws SyntaxError {
  if (this.isInMode(MODIFIERS)) {
    int i=0;
    if ((i=Modifiers.parseClassModifier(value)) != -1) {
      this.modifiers|=i;
      return true;
    }
 else     if ((i=Classes.parse(value)) != -1) {
      this.theClassDecl=AbstractClass.create(i);
      this.theClassDecl.setModifiers(this.modifiers);
      this.unit.addClass(this.theClassDecl);
      this.modifiers=0;
      this.mode=NAME;
      return true;
    }
  }
  if (this.isInMode(NAME)) {
    if (token.isType(Token.TYPE_IDENTIFIER)) {
      this.theClassDecl.setName(value);
      this.mode=EXTENDS | BODY;
      return true;
    }
  }
  if (this.isInMode(EXTENDS)) {
    if ("String_Node_Str".equals(value)) {
      this.mode=SUPERCLASSES;
      return true;
    }
  }
  if (this.isInMode(SUPERCLASSES)) {
    if (token.isType(Token.TYPE_IDENTIFIER)) {
      this.theClassDecl.addSuperClass(this.unit.resolveClass(value));
      return true;
    }
  }
  if (this.isInMode(BODY)) {
    if ("String_Node_Str".equals(value)) {
      jcp.pushParser(new ClassBodyParser(this.theClassDecl));
      this.mode=BODY_END;
      return true;
    }
  }
  if (this.isInMode(BODY_END)) {
    if ("String_Node_Str".equals(value)) {
      jcp.popParser();
      this.mode=0;
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean parse(ParserManager jcp,String value,IToken token) throws SyntaxError {
  if (this.isInMode(MODIFIERS)) {
    int i=0;
    if ((i=Modifiers.parseClassModifier(value)) != -1) {
      this.modifiers|=i;
      return true;
    }
 else     if ((i=Classes.parse(value)) != -1) {
      this.theClassDecl=AbstractClass.create(i);
      this.theClassDecl.setModifiers(this.modifiers);
      this.unit.addClass(this.theClassDecl);
      this.modifiers=0;
      this.mode=NAME;
      return true;
    }
  }
  if (this.isInMode(NAME)) {
    if (token.isType(Token.TYPE_IDENTIFIER)) {
      this.theClassDecl.setName(value);
      this.mode=EXTENDS | BODY;
      return true;
    }
  }
  if (this.isInMode(EXTENDS)) {
    if ("String_Node_Str".equals(value)) {
      this.mode=SUPERCLASSES;
      return true;
    }
  }
  if (this.isInMode(SUPERCLASSES)) {
    if (token.isType(Token.TYPE_IDENTIFIER)) {
      this.theClassDecl.addSuperClass(this.unit.resolveClass(value));
      return true;
    }
  }
  if (this.isInMode(BODY)) {
    if ("String_Node_Str".equals(value)) {
      jcp.pushParser(new ClassBodyParser(this.theClassDecl));
      this.mode=BODY_END;
      return true;
    }
  }
  if (this.isInMode(BODY_END)) {
    if ("String_Node_Str".equals(value)) {
      jcp.popParser();
      return true;
    }
  }
  return false;
}
Program: 84099
Project: 84099
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  this.packageDecl.toString("String_Node_Str",buffer);
  buffer.append('\n');
  if (Formatting.Package.newLine) {
    buffer.append('\n');
  }
  for (  IImport iimport : this.imports) {
    iimport.toString("String_Node_Str",buffer);
    buffer.append('\n');
  }
  if (Formatting.Import.newLine) {
    buffer.append('\n');
  }
  for (  IClass iclass : this.classes) {
    iclass.toString("String_Node_Str",buffer);
    if (Formatting.Class.newLine) {
      buffer.append('\n');
    }
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  this.packageDecl.toString("String_Node_Str",buffer);
  buffer.append('\n');
  if (Formatting.Package.newLine) {
    buffer.append('\n');
  }
  if (!this.imports.isEmpty()) {
    for (    IImport iimport : this.imports) {
      iimport.toString("String_Node_Str",buffer);
      buffer.append('\n');
    }
    if (Formatting.Import.newLine) {
      buffer.append('\n');
    }
  }
  for (  IClass iclass : this.classes) {
    iclass.toString("String_Node_Str",buffer);
    if (Formatting.Class.newLine) {
      buffer.append('\n');
    }
  }
}
Program: 84100
Project: 84100
Buggy source:
@Override public Field applyState(CompilerState state){
  this.value=this.value.applyState(state);
  return this;
}

Fixed version (ground truth):
@Override public Field applyState(CompilerState state){
  if (this.value != null) {
    this.value=this.value.applyState(state);
  }
  return this;
}