nus-yam/ex-repair huggingface dataset:
Program: 83345
Project: 83345
Buggy source:
private Class generateClass(String className,List<IClassCompilable> compilableList) throws Throwable {
  String extendedType=type.getExtendedName();
  ClassWriter writer=new ClassWriter();
  writer.visit(DyvilCompiler.classVersion,Modifiers.PUBLIC | Modifiers.FINAL | ClassFormat.ACC_SUPER,className,null,"String_Node_Str",null);
  if (type != Types.VOID) {
    writer.visitField(this.modifiers | Modifiers.PUBLIC | Modifiers.STATIC| Modifiers.SYNTHETIC,"String_Node_Str",extendedType,null,null);
  }
  for (  IClassCompilable c : compilableList) {
    c.write(writer);
  }
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(Modifiers.STATIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
  mw.begin();
  for (  IClassCompilable c : compilableList) {
    c.writeStaticInit(mw);
  }
  if (type != Types.VOID) {
    value.writeExpression(mw);
    mw.writeFieldInsn(Opcodes.PUTSTATIC,className,"String_Node_Str",extendedType);
  }
 else {
    value.writeStatement(mw);
  }
  mw.writeInsn(Opcodes.RETURN);
  mw.end();
  writer.visitEnd();
  byte[] bytes=writer.toByteArray();
  if (type != Types.VOID || !compilableList.isEmpty()) {
    return REPLMemberClass.loadClass(className,bytes);
  }
  return ReflectUtils.unsafe.defineAnonymousClass(REPLVariable.class,bytes,null);
}

Fixed version (ground truth):
private Class generateClass(String className,List<IClassCompilable> compilableList) throws Throwable {
  String name=this.name.qualified;
  String extendedType=type.getExtendedName();
  ClassWriter writer=new ClassWriter();
  writer.visit(DyvilCompiler.classVersion,Modifiers.PUBLIC | Modifiers.FINAL | ClassFormat.ACC_SUPER,className,null,"String_Node_Str",null);
  if (type != Types.VOID) {
    writer.visitField(this.modifiers | Modifiers.PUBLIC | Modifiers.STATIC| Modifiers.SYNTHETIC,name,extendedType,null,null);
  }
  for (  IClassCompilable c : compilableList) {
    c.write(writer);
  }
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(Modifiers.STATIC | Modifiers.SYNTHETIC,"String_Node_Str","String_Node_Str",null,null));
  mw.begin();
  for (  IClassCompilable c : compilableList) {
    c.writeStaticInit(mw);
  }
  if (type != Types.VOID) {
    value.writeExpression(mw);
    mw.writeFieldInsn(Opcodes.PUTSTATIC,className,name,extendedType);
  }
 else {
    value.writeStatement(mw);
  }
  mw.writeInsn(Opcodes.RETURN);
  mw.end();
  writer.visitEnd();
  byte[] bytes=writer.toByteArray();
  if (type != Types.VOID || !compilableList.isEmpty()) {
    return REPLMemberClass.loadClass(className,bytes);
  }
  return ReflectUtils.unsafe.defineAnonymousClass(REPLVariable.class,bytes,null);
}
Program: 83346
Project: 83346
Buggy source:
@Override public void writeGet(MethodWriter writer,IValue instance) throws BytecodeException {
  if (this.isConstant()) {
    this.value.writeExpression(writer);
    return;
  }
  if (this.className == null) {
    this.type.writeDefaultValue(writer);
    return;
  }
  String extended=this.type.getExtendedName();
  writer.writeFieldInsn(Opcodes.GETSTATIC,this.className,"String_Node_Str",extended);
}

Fixed version (ground truth):
@Override public void writeGet(MethodWriter writer,IValue instance) throws BytecodeException {
  if (this.isConstant()) {
    this.value.writeExpression(writer);
    return;
  }
  if (this.className == null) {
    this.type.writeDefaultValue(writer);
    return;
  }
  String extended=this.type.getExtendedName();
  writer.writeFieldInsn(Opcodes.GETSTATIC,this.className,this.name.qualified,extended);
}
Program: 83347
Project: 83347
Buggy source:
@Override public boolean add(E element){
  return this.map.put(element,VALUE) != null;
}

Fixed version (ground truth):
@Override public boolean add(E element){
  return this.map.put(element,VALUE) == null;
}
Program: 83348
Project: 83348
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  this.arguments.resolve(markers,context);
  if (this.type == null || !this.type.isResolved()) {
    return this;
  }
  if (this.type.isArrayType()) {
    int len=this.arguments.size();
    int dims=this.type.getArrayDimensions();
    if (dims != len) {
      Marker marker=markers.create(this.position,"String_Node_Str");
      marker.addInfo("String_Node_Str" + dims);
      marker.addInfo("String_Node_Str" + len);
      return this;
    }
    if (!(this.arguments instanceof ArgumentList)) {
      markers.add(markers.create(this.position,"String_Node_Str"));
      return this;
    }
    ArgumentList paramList=(ArgumentList)this.arguments;
    for (int i=0; i < len; i++) {
      IValue v=paramList.getValue(i);
      IType t=v.getType();
      if (t != Types.INT) {
        Marker marker=markers.create(v.getPosition(),"String_Node_Str");
        marker.addInfo("String_Node_Str" + t);
      }
    }
    return this;
  }
  IConstructor match=IContext.resolveConstructor(this.type,this.arguments);
  if (match == null) {
    Marker marker=markers.create(this.position,"String_Node_Str",this.type.toString());
    if (!this.arguments.isEmpty()) {
      StringBuilder builder=new StringBuilder("String_Node_Str");
      this.arguments.typesToString(builder);
      marker.addInfo(builder.toString());
    }
    return this;
  }
  this.constructor=match;
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  this.arguments.resolve(markers,context);
  if (this.type == null || !this.type.isResolved()) {
    return this;
  }
  if (this.type.isArrayType()) {
    int len=this.arguments.size();
    int dims=this.type.getArrayDimensions();
    if (dims != len) {
      Marker marker=markers.create(this.position,"String_Node_Str");
      marker.addInfo("String_Node_Str" + dims);
      marker.addInfo("String_Node_Str" + len);
      return this;
    }
    if (!(this.arguments instanceof ArgumentList)) {
      markers.add(markers.create(this.position,"String_Node_Str"));
      return this;
    }
    ArgumentList paramList=(ArgumentList)this.arguments;
    for (int i=0; i < len; i++) {
      IValue v=paramList.getValue(i);
      IType t=v.getType();
      if (t != Types.INT) {
        Marker marker=markers.create(v.getPosition(),"String_Node_Str");
        marker.addInfo("String_Node_Str" + t);
      }
    }
    return this;
  }
  this.constructor=IContext.resolveConstructor(this.type,this.arguments);
  return this;
}
Program: 83349
Project: 83349
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  this.arguments.check(markers,context);
  if (this.type == null || this.type.isArrayType()) {
    return;
  }
  IClass iclass=this.type.getTheClass();
  if (iclass == null) {
    return;
  }
  if (iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
    markers.add(this.position,"String_Node_Str",iclass.getName());
  }
 else   if (iclass.hasModifier(Modifiers.ABSTRACT)) {
    markers.add(this.position,"String_Node_Str",iclass.getName());
  }
  if (this.constructor != null) {
    this.constructor.checkCall(markers,this.position,context,this.arguments);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  this.arguments.check(markers,context);
  if (this.type == null || this.type.isArrayType()) {
    return;
  }
  IClass iclass=this.type.getTheClass();
  if (iclass == null) {
    return;
  }
  if (iclass.hasModifier(Modifiers.INTERFACE_CLASS)) {
    markers.add(this.position,"String_Node_Str",this.type);
    return;
  }
  if (iclass.hasModifier(Modifiers.ABSTRACT)) {
    markers.add(this.position,"String_Node_Str",this.type);
  }
  if (this.constructor != null) {
    this.constructor.checkCall(markers,this.position,context,this.arguments);
  }
 else {
    Marker marker=markers.create(this.position,"String_Node_Str",this.type.toString());
    if (!this.arguments.isEmpty()) {
      StringBuilder builder=new StringBuilder("String_Node_Str");
      this.arguments.typesToString(builder);
      marker.addInfo(builder.toString());
    }
  }
}
Program: 83350
Project: 83350
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  this.field.writeGet(writer,this.instance);
  if (!this.type.isSuperTypeOf(this.field.getType())) {
    writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  this.field.writeGet(writer,this.instance);
  if (this.type != null && !this.type.isSuperTypeOf(this.field.getType())) {
    writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
  }
}
Program: 83351
Project: 83351
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == Types.UNKNOWN || type == Types.VOID) {
    return this;
  }
  IValue value1=this.value.withType(type,typeContext,markers,context);
  if (value1 == null) {
    return null;
  }
  this.value=value1;
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == Types.VOID) {
    return this;
  }
  IValue value1=this.value.withType(type,typeContext,markers,context);
  if (value1 == null) {
    return null;
  }
  this.value=value1;
  return this;
}
Program: 83352
Project: 83352
Buggy source:
@Override public boolean isType(IType type){
  return this.value == null ? type == Types.UNKNOWN || type == Types.VOID : this.value.isType(type);
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  return type == Types.VOID || this.value.isType(type);
}
Program: 83353
Project: 83353
Buggy source:
private AbstractCall resolveApply(MarkerList markers,IContext context){
  IValue instance;
  IMethod method;
  IDataMember field=context.resolveField(this.name);
  if (field == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass == null) {
      return null;
    }
    IMethod match=IContext.resolveMethod(iclass,null,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=new ClassAccess(this.position,new ClassType(iclass));
  }
 else {
    FieldAccess access=new FieldAccess(this.position);
    access.field=field;
    access.name=this.name;
    access.dotless=this.dotless;
    IMethod match=IContext.resolveMethod(field.getType(),access,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=access;
  }
  ApplyMethodCall call=new ApplyMethodCall(this.position);
  call.method=method;
  call.instance=instance;
  call.arguments=this.arguments;
  call.genericData=this.genericData;
  return call;
}

Fixed version (ground truth):
private AbstractCall resolveApply(MarkerList markers,IContext context){
  IValue instance;
  IMethod method;
  IDataMember field=context.resolveField(this.name);
  if (field == null) {
    IType itype=IContext.resolveType(context,this.name);
    if (itype == null) {
      return null;
    }
    IMethod match=IContext.resolveMethod(itype,null,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=new ClassAccess(this.position,itype);
  }
 else {
    FieldAccess access=new FieldAccess(this.position);
    access.field=field;
    access.name=this.name;
    access.dotless=this.dotless;
    IMethod match=IContext.resolveMethod(field.getType(),access,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=access;
  }
  ApplyMethodCall call=new ApplyMethodCall(this.position);
  call.method=method;
  call.instance=instance;
  call.arguments=this.arguments;
  call.genericData=this.genericData;
  return call;
}
Program: 83355
Project: 83355
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.parameterCount == 0) {
    buffer.append(Formatting.Method.emptyParameters);
  }
 else   if (this.parameterCount == 1) {
    IParameter param=this.parameters[0];
    if (param.getType() != null) {
      buffer.append('(');
      param.toString(prefix,buffer);
      buffer.append(')');
    }
 else {
      buffer.append(param.getName());
    }
  }
 else {
    Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
  }
  buffer.append(Formatting.Expression.lambdaSeperator);
  this.value.toString(prefix,buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.parameterCount == 1) {
    IParameter param=this.parameters[0];
    if (param.getType() != null) {
      buffer.append('(');
      param.toString(prefix,buffer);
      buffer.append(')');
    }
 else {
      buffer.append(param.getName());
    }
    buffer.append(' ');
  }
 else   if (this.parameterCount > 1) {
    Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(' ');
  }
  buffer.append(Formatting.Expression.lambdaSeperator);
  this.value.toString(prefix,buffer);
}
Program: 83356
Project: 83356
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.parameterCount == 1) {
    this.parameterTypes[0].toString(prefix,buffer);
  }
 else {
    buffer.append(Formatting.Method.parametersStart);
    Util.astToString(prefix,this.parameterTypes,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(Formatting.Method.parametersEnd);
  }
  buffer.append(Formatting.Expression.lambdaSeperator);
  this.returnType.toString("String_Node_Str",buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.parameterCount == 1) {
    this.parameterTypes[0].toString(prefix,buffer);
    buffer.append(' ');
  }
 else   if (this.parameterCount > 0) {
    buffer.append(Formatting.Method.parametersStart);
    Util.astToString(prefix,this.parameterTypes,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(Formatting.Method.parametersEnd);
    buffer.append(' ');
  }
  buffer.append(Formatting.Expression.lambdaSeperator);
  this.returnType.toString("String_Node_Str",buffer);
}
Program: 83357
Project: 83357
Buggy source:
@Override public boolean isResolved(){
  return false;
}

Fixed version (ground truth):
@Override public boolean isResolved(){
  return true;
}
Program: 83360
Project: 83360
Buggy source:
@Override public IType getConcreteType(ITypeContext context){
  TupleType tt=new TupleType(this.typeCount);
  for (int i=0; i < this.typeCount; i++) {
    tt.types[i]=this.types[i].getConcreteType(context);
  }
  return tt;
}

Fixed version (ground truth):
@Override public IType getConcreteType(ITypeContext context){
  TupleType tt=new TupleType(this.typeCount);
  tt.typeCount=this.typeCount;
  for (int i=0; i < this.typeCount; i++) {
    tt.types[i]=this.types[i].getConcreteType(context);
  }
  return tt;
}
Program: 83361
Project: 83361
Buggy source:
@Override public IType clone(){
  TupleType tt=new TupleType(this.typeCount);
  System.arraycopy(this.types,0,tt.types,0,this.typeCount);
  return tt;
}

Fixed version (ground truth):
@Override public IType clone(){
  TupleType tt=new TupleType(this.typeCount);
  tt.typeCount=this.typeCount;
  System.arraycopy(this.types,0,tt.types,0,this.typeCount);
  return tt;
}
Program: 83362
Project: 83362
Buggy source:
@Override public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount){
  outer:   for (int i=0; i < this.methodCount; i++) {
    IMethod m=this.methods[i];
    if (m.getName() != name) {
      continue;
    }
    if (parameterCount != m.parameterCount()) {
      continue;
    }
    for (int p=0; p < parameterCount; p++) {
      IType t1=parameters[p].getType();
      IType t2=m.getParameter(p).getType();
      if (!t1.equals(t2)) {
        continue outer;
      }
    }
    return m;
  }
  return null;
}

Fixed version (ground truth):
@Override public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount,IType concrete){
  outer:   for (int i=0; i < this.methodCount; i++) {
    IMethod m=this.methods[i];
    if (m.getName() != name) {
      continue;
    }
    if (parameterCount != m.parameterCount()) {
      continue;
    }
    for (int p=0; p < parameterCount; p++) {
      IType t1=parameters[p].getType();
      IType t2=m.getParameter(p).getType().getConcreteType(concrete);
      if (!t1.equals(t2)) {
        continue outer;
      }
    }
    return m;
  }
  return null;
}
Program: 83363
Project: 83363
Buggy source:
@Override public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount){
  if (this.body != null) {
    IMethod m=this.body.getMethod(name,parameters,parameterCount);
    if (m != null) {
      return m;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount,IType concrete){
  if (this.body != null) {
    IMethod m=this.body.getMethod(name,parameters,parameterCount,concrete);
    if (m != null) {
      return m;
    }
  }
  return null;
}
Program: 83364
Project: 83364
Buggy source:
@Override public IMethod getSuperMethod(Name name,IParameter[] parameters,int parameterCount){
  if (this.superType != null) {
    IClass iclass=this.superType.getTheClass();
    if (iclass != null) {
      IMethod m=iclass.getMethod(name,parameters,parameterCount);
      if (m != null) {
        return m;
      }
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IClass iclass=this.interfaces[i].getTheClass();
    if (iclass != null) {
      IMethod m=iclass.getMethod(name,parameters,parameterCount);
      if (m != null) {
        return m;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMethod getSuperMethod(Name name,IParameter[] parameters,int parameterCount){
  if (this.superType != null) {
    IClass iclass=this.superType.getTheClass();
    if (iclass != null) {
      IMethod m=iclass.getMethod(name,parameters,parameterCount,this.superType);
      if (m != null) {
        return m;
      }
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i];
    IClass iclass=type.getTheClass();
    if (iclass != null) {
      IMethod m=iclass.getMethod(name,parameters,parameterCount,type);
      if (m != null) {
        return m;
      }
    }
  }
  return null;
}
Program: 83366
Project: 83366
Buggy source:
public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount);

Fixed version (ground truth):
public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount,IType concrete);
Program: 83367
Project: 83367
Buggy source:
public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount);

Fixed version (ground truth):
public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount,IType concrete);
Program: 83368
Project: 83368
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  IClassBody body=this.theClass.getBody();
  if (body != null) {
    if (markers != null && body.constructorCount() > 0) {
      markers.add(this.theClass.getPosition(),"String_Node_Str",this.theClass.getName().qualified);
    }
    IField f=body.getField(Name.instance);
    if (f != null) {
      this.instanceField=f;
      return;
    }
  }
  Field f=new Field(this.theClass,Name.instance,this.theClass.getType());
  f.modifiers=Modifiers.PUBLIC | Modifiers.CONST | Modifiers.SYNTHETIC;
  this.instanceField=f;
  if (this.theClass.getMethod(Name.toString,null,0) != null) {
    this.hasToString=true;
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  IClassBody body=this.theClass.getBody();
  if (body != null) {
    if (markers != null && body.constructorCount() > 0) {
      markers.add(this.theClass.getPosition(),"String_Node_Str",this.theClass.getName().qualified);
    }
    IField f=body.getField(Name.instance);
    if (f != null) {
      this.instanceField=f;
      return;
    }
  }
  Field f=new Field(this.theClass,Name.instance,this.theClass.getType());
  f.modifiers=Modifiers.PUBLIC | Modifiers.CONST | Modifiers.SYNTHETIC;
  this.instanceField=f;
  if (this.theClass.getMethod(Name.toString,null,0,null) != null) {
    this.hasToString=true;
  }
}
Program: 83369
Project: 83369
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar){
  if (typeVar.getGeneric().isMethod()) {
    return this.generics[typeVar.getIndex()];
  }
  return this.instanceType.resolveType(typeVar);
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (this.method.getTypeVariable(index) == typeVar) {
    return this.generics[index];
  }
  return this.instanceType.resolveType(typeVar);
}
Program: 83370
Project: 83370
Buggy source:
public GenericData(int count){
  this.generics=new IType[count];
  this.computedGenerics=count;
}

Fixed version (ground truth):
public GenericData(IMethod method,int count){
  this.method=method;
  this.generics=new IType[count];
  this.computedGenerics=count;
}
Program: 83371
Project: 83371
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(this.name);
  this.variance.appendPrefix(buffer);
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
  if (this.upperBoundCount > 0) {
    buffer.append(Formatting.Type.genericUpperBound);
    this.upperBounds[0].toString(prefix,buffer);
    for (int i=1; i < this.upperBoundCount; i++) {
      buffer.append(Formatting.Type.genericBoundSeperator);
      this.upperBounds[i].toString(prefix,buffer);
    }
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  this.variance.appendPrefix(buffer);
  buffer.append(this.name);
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
  if (this.upperBoundCount > 0) {
    buffer.append(Formatting.Type.genericUpperBound);
    this.upperBounds[0].toString(prefix,buffer);
    for (int i=1; i < this.upperBoundCount; i++) {
      buffer.append(Formatting.Type.genericBoundSeperator);
      this.upperBounds[i].toString(prefix,buffer);
    }
  }
}
Program: 83372
Project: 83372
Buggy source:
public PositionedTypeVarType(ICodePosition position,ITypeVariable typeVar){
  super(typeVar);
}

Fixed version (ground truth):
public PositionedTypeVarType(ICodePosition position,ITypeVariable typeVar){
  super(typeVar);
  this.position=position;
}
Program: 83373
Project: 83373
Buggy source:
@Override public IType resolve(MarkerList markers,IContext context,TypePosition position){
  if (this.bound != null) {
    this.bound=this.bound.resolve(markers,context,TypePosition.TYPE);
  }
  if (position != TypePosition.GENERIC_ARGUMENT) {
    markers.add(this.position,"String_Node_Str");
    return this.bound == null ? Types.ANY : this.bound;
  }
  return this;
}

Fixed version (ground truth):
@Override public IType resolve(MarkerList markers,IContext context,TypePosition position){
  if (this.bound != null) {
    this.bound=this.bound.resolve(markers,context,TypePosition.SUPER_TYPE_ARGUMENT);
  }
  if (position != TypePosition.GENERIC_ARGUMENT) {
    markers.add(this.position,"String_Node_Str");
    return this.bound == null ? Types.ANY : this.bound;
  }
  return this;
}
Program: 83374
Project: 83374
Buggy source:
@Override public GenericData getGenericData(GenericData genericData,IValue instance,IArguments arguments){
  if (!this.hasTypeVariables()) {
    return genericData;
  }
  if (genericData == null) {
    genericData=new GenericData(this.genericCount);
    if (instance != null) {
      genericData.instanceType=instance.getType();
    }
    this.inferTypes(genericData,instance,arguments);
    return genericData;
  }
  if (instance != null) {
    genericData.instanceType=instance.getType();
  }
  genericData.setTypeCount(this.genericCount);
  this.inferTypes(genericData,instance,arguments);
  return genericData;
}

Fixed version (ground truth):
@Override public GenericData getGenericData(GenericData genericData,IValue instance,IArguments arguments){
  if (!this.hasTypeVariables()) {
    return genericData;
  }
  if (genericData == null) {
    genericData=new GenericData(this,this.genericCount);
    if (instance != null) {
      genericData.instanceType=instance.getType();
    }
    this.inferTypes(genericData,instance,arguments);
    return genericData;
  }
  genericData.method=this;
  if (instance != null) {
    genericData.instanceType=instance.getType();
  }
  genericData.setTypeCount(this.genericCount);
  this.inferTypes(genericData,instance,arguments);
  return genericData;
}
Program: 83376
Project: 83376
Buggy source:
@Override public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount){
  return null;
}

Fixed version (ground truth):
@Override public IMethod getMethod(Name name,IParameter[] parameters,int parameterCount,IType concrete){
  return null;
}
Program: 83377
Project: 83377
Buggy source:
@Override public IType getReturnType(){
  if (this.variance == Variance.CONTRAVARIANT) {
    return Types.ANY;
  }
  return this.bound;
}

Fixed version (ground truth):
@Override public IType getReturnType(){
  if (this.bound == null || this.variance == Variance.CONTRAVARIANT) {
    return Types.ANY;
  }
  return this.bound;
}
Program: 83378
Project: 83378
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  this.value1.resolve(markers,context);
  this.value2.resolve(markers,context);
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  this.firstValue.resolve(markers,context);
  this.lastValue.resolve(markers,context);
  return this;
}
Program: 83379
Project: 83379
Buggy source:
@Override public int getTypeMatch(IType type){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.isElementType(elementType) ? 3 : 0;
  }
  if (Types.ITERABLE.equals(type) || RANGE.isSuperTypeOf(type)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.isElementType(iterableType) ? 3 : 0;
  }
  return type.isSuperTypeOf(RANGE) ? 2 : 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  return this.isType(type) ? 3 : 0;
}
Program: 83380
Project: 83380
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  this.value1.check(markers,context);
  this.value2.check(markers,context);
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  this.firstValue.check(markers,context);
  this.lastValue.check(markers,context);
}
Program: 83381
Project: 83381
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.withElementType(type,elementType,typeContext,markers,context);
  }
  if (Types.ITERABLE.equals(type) || RANGE.isSuperTypeOf(type)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.withElementType(type,iterableType,typeContext,markers,context);
  }
  return type.isSuperTypeOf(this.getType()) ? this : null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IType elementType;
  if (type.isArrayType()) {
    elementType=type.getElementType();
  }
 else   if (type.isSuperClassOf(RANGE)) {
    elementType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
  }
 else {
    return null;
  }
  if (this.isElementType(elementType)) {
    this.elementType=elementType;
    this.type=type;
    return this;
  }
  return null;
}
Program: 83382
Project: 83382
Buggy source:
@Override public boolean isType(IType type){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.isElementType(elementType);
  }
  if (Types.ITERABLE.equals(type) || RANGE.isSuperTypeOf(type)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.isElementType(iterableType);
  }
  return type.isSuperTypeOf(RANGE);
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (type.isArrayType()) {
    IType elementType=type.getElementType();
    return this.isElementType(elementType);
  }
  if (type.isSuperClassOf(RANGE)) {
    IType iterableType=type.resolveType(IterableForStatement.ITERABLE_TYPE);
    return this.isElementType(iterableType);
  }
  return false;
}
Program: 83384
Project: 83384
Buggy source:
private boolean isElementType(IType elementType){
  if (this.elementType != null) {
    return elementType.isSuperTypeOf(this.elementType);
  }
  return this.value1.isType(elementType) && this.value2.isType(elementType);
}

Fixed version (ground truth):
private boolean isElementType(IType elementType){
  if (this.elementType != Types.UNKNOWN) {
    return elementType.isSuperTypeOf(this.elementType);
  }
  return this.firstValue.isType(elementType) && this.lastValue.isType(elementType);
}
Program: 83385
Project: 83385
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  this.value1.checkTypes(markers,context);
  this.value2.checkTypes(markers,context);
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  IValue value1=this.firstValue.withType(elementType,elementType,markers,context);
  if (value1 == null) {
  }
 else {
    this.firstValue=value1;
  }
  IValue value2=this.lastValue.withType(elementType,elementType,markers,context);
  if (value2 == null) {
  }
 else {
    this.lastValue=value2;
  }
  this.firstValue.checkTypes(markers,context);
  this.lastValue.checkTypes(markers,context);
}
Program: 83386
Project: 83386
Buggy source:
@Override public IType getType(){
  if (this.type == null) {
    if (this.elementType == Types.UNKNOWN) {
      this.elementType=Types.findCommonSuperType(this.value1.getType(),this.value2.getType());
    }
    GenericType gt=new GenericType(RANGE_CLASS);
    if (this.elementType.isPrimitive()) {
      this.elementType=this.elementType.getReferenceType();
    }
    gt.addType(this.elementType);
    this.type=gt;
  }
  return this.type;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.type == null) {
    if (this.elementType == Types.UNKNOWN) {
      this.elementType=Types.findCommonSuperType(this.firstValue.getType(),this.lastValue.getType());
    }
    GenericType gt=new GenericType(RANGE_CLASS);
    if (this.elementType.isPrimitive()) {
      this.elementType=this.elementType.getReferenceType();
    }
    gt.addType(this.elementType);
    this.type=gt;
  }
  return this.type;
}
Program: 83387
Project: 83387
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  this.value1.toString(prefix,buffer);
  buffer.append("String_Node_Str");
  this.value2.toString(prefix,buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  this.firstValue.toString(prefix,buffer);
  buffer.append("String_Node_Str");
  this.lastValue.toString(prefix,buffer);
}
Program: 83388
Project: 83388
Buggy source:
public RangeOperator(IValue value1,IValue value2,IType type){
  this.value1=value1;
  this.value2=value2;
  this.elementType=type;
}

Fixed version (ground truth):
public RangeOperator(IValue value1,IValue value2,IType type){
  this.firstValue=value1;
  this.lastValue=value2;
  this.elementType=type;
}
Program: 83389
Project: 83389
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  this.value1.resolveTypes(markers,context);
  this.value2.resolveTypes(markers,context);
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  this.firstValue.resolveTypes(markers,context);
  this.lastValue.resolveTypes(markers,context);
}
Program: 83391
Project: 83391
Buggy source:
@Override public IClass getTheClass(){
  return null;
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return Types.OBJECT_CLASS;
}
Program: 83392
Project: 83392
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.instance != null) {
    this.instance.toString(prefix,buffer);
  }
  if (this.genericData != null) {
    if (this.instance != null || this.instance.valueTag() != FIELD_ACCESS) {
      buffer.append("String_Node_Str");
    }
    this.genericData.toString(prefix,buffer);
  }
  this.arguments.toString(prefix,buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.instance != null) {
    this.instance.toString(prefix,buffer);
  }
  if (this.genericData != null) {
    if (this.instance != null && this.instance.valueTag() != FIELD_ACCESS) {
      buffer.append("String_Node_Str");
    }
    this.genericData.toString(prefix,buffer);
  }
  this.arguments.toString(prefix,buffer);
}
Program: 83394
Project: 83394
Buggy source:
@Override public IType resolve(MarkerList markers,IContext context){
  this.resolveTypes(markers,context);
  return this;
}

Fixed version (ground truth):
@Override public IType resolve(MarkerList markers,IContext context){
  if (this.upperBound != null) {
    this.upperBound=this.upperBound.resolve(markers,context);
  }
  if (this.lowerBound != null) {
    this.lowerBound=this.lowerBound.resolve(markers,context);
  }
  return this;
}
Program: 83395
Project: 83395
Buggy source:
@Override public void writeTypeExpression(MethodWriter writer) throws BytecodeException {
  if (this.lowerBound != null) {
    this.lowerBound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  writer.writeLDC(this.upperBoundCount);
  writer.writeNewArray("String_Node_Str",1);
  for (int i=0; i < this.upperBoundCount; i++) {
    writer.writeInsn(Opcodes.DUP);
    writer.writeLDC(i);
    this.upperBounds[i].writeTypeExpression(writer);
    writer.writeInsn(Opcodes.AASTORE);
  }
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}

Fixed version (ground truth):
@Override public void writeTypeExpression(MethodWriter writer) throws BytecodeException {
  if (this.lowerBound != null) {
    this.lowerBound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  if (this.upperBound != null) {
    this.upperBound.writeTypeExpression(writer);
  }
 else {
    writer.writeInsn(Opcodes.ACONST_NULL);
  }
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}
Program: 83396
Project: 83396
Buggy source:
@Override public void appendSignature(StringBuilder buffer){
  if (this.lowerBound != null) {
    buffer.append('-');
    this.lowerBound.appendSignature(buffer);
  }
 else   if (this.upperBoundCount > 0) {
    buffer.append('+');
    this.upperBounds[0].appendSignature(buffer);
  }
 else {
    buffer.append("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void appendSignature(StringBuilder buffer){
  if (this.lowerBound != null) {
    buffer.append('-');
    this.lowerBound.appendSignature(buffer);
  }
 else   if (this.upperBound != null) {
    buffer.append('+');
    this.upperBound.appendSignature(buffer);
  }
 else {
    buffer.append('*');
  }
}
Program: 83397
Project: 83397
Buggy source:
@Override public IType getSuperType(){
  return this.upperBoundCount == 0 ? Types.UNKNOWN : this.upperBounds[0];
}

Fixed version (ground truth):
@Override public IType getSuperType(){
  return this.upperBound == null ? Types.UNKNOWN : this.upperBound;
}
Program: 83398
Project: 83398
Buggy source:
@Override public IType getConcreteType(ITypeContext context){
  if (this.lowerBound != null) {
    return this.lowerBound.getConcreteType(context);
  }
  WildcardType type=new WildcardType(this.position);
  type.upperBounds=new IType[this.upperBoundCount];
  type.upperBoundCount=this.upperBoundCount;
  for (int i=0; i < this.upperBoundCount; i++) {
    type.upperBounds[i]=this.upperBounds[i].getConcreteType(context);
  }
  return type;
}

Fixed version (ground truth):
@Override public IType getConcreteType(ITypeContext context){
  if (this.lowerBound != null) {
    return this.lowerBound.getConcreteType(context);
  }
  if (this.upperBound != null) {
    WildcardType copy=new WildcardType(this.position);
    copy.upperBound=this.upperBound.getConcreteType(context);
    return copy;
  }
  return this;
}
Program: 83399
Project: 83399
Buggy source:
@Override public IClass getTheClass(){
  return null;
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return this.upperBound != null ? this.upperBound.getTheClass() : Types.OBJECT_CLASS;
}
Program: 83400
Project: 83400
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  IType type;
  for (int i=0; i < this.upperBoundCount; i++) {
    type=this.upperBounds[i].resolveType(typeVar,concrete);
    if (type != null) {
      return type;
    }
  }
  return Types.ANY;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.upperBound != null) {
    return this.upperBound.resolveType(typeVar);
  }
  return Types.ANY;
}
Program: 83401
Project: 83401
Buggy source:
@Override public IDataMember resolveField(Name name){
  for (int i=0; i < this.upperBoundCount; i++) {
    IDataMember f=this.upperBounds[i].resolveField(name);
    if (f != null) {
      return f;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IDataMember resolveField(Name name){
  if (this.upperBound != null) {
    return this.upperBound.resolveField(name);
  }
  return null;
}
Program: 83402
Project: 83402
Buggy source:
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,Name name,IArguments arguments){
  if (this.upperBoundCount == 0) {
    Types.OBJECT_CLASS.getMethodMatches(list,instance,name,arguments);
    return;
  }
  for (int i=0; i < this.upperBoundCount; i++) {
    this.upperBounds[i].getMethodMatches(list,instance,name,arguments);
  }
}

Fixed version (ground truth):
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,Name name,IArguments arguments){
  if (this.upperBound != null) {
    this.upperBound.getMethodMatches(list,instance,name,arguments);
  }
}
Program: 83403
Project: 83403
Buggy source:
@Override public String getInternalName(){
  if (this.upperBoundCount > 0) {
    return this.upperBounds[0].getInternalName();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getInternalName(){
  if (this.upperBound != null) {
    return this.upperBound.getInternalName();
  }
  return "String_Node_Str";
}
Program: 83404
Project: 83404
Buggy source:
@Override public boolean equals(IType type){
  if (this.upperBoundCount > 0) {
    for (int i=0; i < this.upperBoundCount; i++) {
      if (!this.upperBounds[i].isSuperTypeOf(type)) {
        return false;
      }
    }
  }
  if (this.lowerBound != null) {
    if (!type.isSuperTypeOf(this.lowerBound)) {
      return false;
    }
  }
  return !type.isPrimitive();
}

Fixed version (ground truth):
@Override public boolean equals(IType type){
  if (this.upperBound != null) {
    if (!this.upperBound.isSuperTypeOf(type)) {
      return false;
    }
  }
  if (this.lowerBound != null) {
    if (!type.isSuperTypeOf(this.lowerBound)) {
      return false;
    }
  }
  return true;
}
Program: 83405
Project: 83405
Buggy source:
@Override public WildcardType clone(){
  WildcardType clone=new WildcardType(this.position);
  clone.lowerBound=this.lowerBound;
  clone.upperBoundCount=this.upperBoundCount;
  clone.upperBounds=this.upperBounds;
  return clone;
}

Fixed version (ground truth):
@Override public WildcardType clone(){
  WildcardType clone=new WildcardType(this.position);
  clone.lowerBound=this.lowerBound;
  clone.upperBound=this.upperBound;
  return clone;
}
Program: 83406
Project: 83406
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append('_');
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
  if (this.upperBoundCount > 0) {
    buffer.append(Formatting.Type.genericUpperBound);
    this.upperBounds[0].toString(prefix,buffer);
    for (int i=1; i < this.upperBoundCount; i++) {
      buffer.append(Formatting.Type.genericBoundSeperator);
      this.upperBounds[i].toString(prefix,buffer);
    }
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append('_');
  if (this.lowerBound != null) {
    buffer.append(Formatting.Type.genericLowerBound);
    this.lowerBound.toString(prefix,buffer);
  }
  if (this.upperBound != null) {
    buffer.append(Formatting.Type.genericUpperBound);
    this.upperBound.toString(prefix,buffer);
  }
}
Program: 83407
Project: 83407
Buggy source:
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  for (int i=0; i < this.upperBoundCount; i++) {
    this.upperBounds[i].inferTypes(concrete,typeContext);
  }
}

Fixed version (ground truth):
@Override public void inferTypes(IType concrete,ITypeContext typeContext){
  if (this.upperBound != null) {
    this.upperBound.inferTypes(concrete,typeContext);
  }
}
Program: 83408
Project: 83408
Buggy source:
@Override public String toString(){
  StringBuilder buf=new StringBuilder();
  this.method.toString("String_Node_Str",buf);
  return buf.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder buf=new StringBuilder();
  Util.methodSignatureToString(this.method,buf);
  return buf.toString();
}
Program: 83409
Project: 83409
Buggy source:
/** 
 * Returns true if   {@code type} is a subtype of this type
 * @param type
 * @return
 */
public default boolean isSuperTypeOf(IType type){
  if (this == type) {
    return true;
  }
  IClass thisClass=this.getTheClass();
  if (thisClass == Types.OBJECT_CLASS) {
    return true;
  }
  if (type.isArrayType()) {
    return false;
  }
  IClass thatClass=type.getTheClass();
  if (thatClass != null) {
    return thatClass == thisClass || thatClass.isSubTypeOf(this);
  }
  return type.equals(this);
}

Fixed version (ground truth):
/** 
 * Returns true if   {@code type} is a subtype of this type
 * @param type
 * @return
 */
public default boolean isSuperTypeOf(IType type){
  if (this == type) {
    return true;
  }
  IClass thisClass=this.getTheClass();
  if (thisClass == Types.OBJECT_CLASS) {
    return true;
  }
  if (type.typeTag() == WILDCARD_TYPE) {
    return type.equals(this);
  }
  if (type.isArrayType()) {
    return false;
  }
  IClass thatClass=type.getTheClass();
  if (thatClass != null) {
    return thatClass == thisClass || thatClass.isSubTypeOf(this);
  }
  return false;
}
Program: 83412
Project: 83412
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.resolve(markers,context);
  }
  IValue v=this.resolveFieldAccess(context);
  if (v != null) {
    return v;
  }
  Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.name.qualified);
  if (this.instance != null) {
    marker.addInfo("String_Node_Str" + this.instance.getType());
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance=this.instance.resolve(markers,context);
  }
  IValue v=this.resolveFieldAccess(markers,context);
  if (v != null) {
    return v;
  }
  Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
  marker.addInfo("String_Node_Str" + this.name.qualified);
  if (this.instance != null) {
    marker.addInfo("String_Node_Str" + this.instance.getType());
  }
  return this;
}
Program: 83413
Project: 83413
Buggy source:
protected IValue resolveFieldAccess(IContext context){
  IDataMember field=ICall.resolveField(context,this.instance,this.name);
  if (field != null) {
    if (field.isEnumConstant()) {
      EnumValue enumValue=new EnumValue(this.position);
      enumValue.name=this.name;
      enumValue.type=field.getType();
      return enumValue;
    }
    this.field=field;
    return this;
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,EmptyArguments.INSTANCE);
  if (method != null) {
    return this.toMethodCall(method);
  }
  if (this.instance == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass != null) {
      return new ClassAccess(this.position,iclass.getType());
    }
  }
  return null;
}

Fixed version (ground truth):
protected IValue resolveFieldAccess(MarkerList markers,IContext context){
  IDataMember field=ICall.resolveField(context,this.instance,this.name);
  if (field != null) {
    if (field.isEnumConstant()) {
      EnumValue enumValue=new EnumValue(this.position);
      enumValue.name=this.name;
      enumValue.type=field.getType();
      return enumValue;
    }
    this.field=field;
    return this;
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,EmptyArguments.INSTANCE);
  if (method != null) {
    AbstractCall mc=this.toMethodCall(method);
    mc.checkArguments(markers,context);
    return mc;
  }
  if (this.instance == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass != null) {
      return new ClassAccess(this.position,iclass.getType());
    }
  }
  return null;
}
Program: 83414
Project: 83414
Buggy source:
private AbstractCall resolveApply(MarkerList markers,IContext context){
  IValue instance;
  IMethod method;
  IDataMember field=context.resolveField(this.name);
  if (field == null) {
    IClass iclass=context.resolveClass(this.name);
    if (iclass == null) {
      return null;
    }
    IMethod match=IContext.resolveMethod(iclass,null,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=new ClassAccess(this.position,new ClassType(iclass));
  }
 else {
    FieldAccess access=new FieldAccess(this.position);
    access.field=field;
    access.name=this.name;
    access.dotless=this.dotless;
    IMethod match=IContext.resolveMethod(field.getType(),access,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=access;
  }
  ApplyMethodCall call=new ApplyMethodCall(this.position);
  call.method=method;
  call.instance=instance;
  call.arguments=this.arguments;
  call.genericData=this.genericData;
  return call;
}

Fixed version (ground truth):
private AbstractCall resolveApply(MarkerList markers,IContext context){
  IValue instance;
  IMethod method;
  IDataMember field=context.resolveField(this.name);
  if (field == null) {
    IClass iclass=IContext.resolveClass(context,this.name);
    if (iclass == null) {
      return null;
    }
    IMethod match=IContext.resolveMethod(iclass,null,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=new ClassAccess(this.position,new ClassType(iclass));
  }
 else {
    FieldAccess access=new FieldAccess(this.position);
    access.field=field;
    access.name=this.name;
    access.dotless=this.dotless;
    IMethod match=IContext.resolveMethod(field.getType(),access,Name.apply,this.arguments);
    if (match == null) {
      return null;
    }
    method=match;
    instance=access;
  }
  ApplyMethodCall call=new ApplyMethodCall(this.position);
  call.method=method;
  call.instance=instance;
  call.arguments=this.arguments;
  call.genericData=this.genericData;
  return call;
}