nus-yam/ex-repair huggingface dataset:
Program: 83095
Project: 83095
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  this.type.resolve(markers,context);
  this.arguments.resolve(markers,context);
  if (!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(this.position,"String_Node_Str");
      return this;
    }
    ArgumentList paramList=(ArgumentList)this.arguments;
    for (int i=0; i < len; i++) {
      IValue v=paramList.getValue(i);
      IValue v1=v.withType(Types.INT,Types.INT,markers,context);
      if (v1 == null) {
        Marker marker=markers.create(v.getPosition(),"String_Node_Str");
        marker.addInfo("String_Node_Str" + v.getType());
      }
 else {
        paramList.setValue(i,v1);
      }
    }
    return this;
  }
  this.constructor=IContext.resolveConstructor(this.type,this.arguments);
  if (this.constructor == null) {
    this.reportResolve(markers);
    return this;
  }
  if (this.constructor.getTheClass().isGeneric() && !this.type.isGenericType()) {
    this.type=this.constructor.checkGenericType(markers,position,context,type,arguments);
  }
  this.constructor.checkArguments(markers,this.position,context,this.type,this.arguments);
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  this.type.resolve(markers,context);
  this.arguments.resolve(markers,context);
  if (!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(this.position,"String_Node_Str");
      return this;
    }
    ArgumentList paramList=(ArgumentList)this.arguments;
    for (int i=0; i < len; i++) {
      IValue v=paramList.getValue(i);
      IValue v1=v.withType(Types.INT,Types.INT,markers,context);
      if (v1 == null) {
        Marker marker=markers.create(v.getPosition(),"String_Node_Str");
        marker.addInfo("String_Node_Str" + v.getType());
      }
 else {
        paramList.setValue(i,v1);
      }
    }
    return this;
  }
  this.constructor=IContext.resolveConstructor(this.type,this.arguments);
  if (this.constructor == null) {
    this.reportResolve(markers);
    return this;
  }
  if (this.constructor.getTheClass().isGeneric() && !this.type.isGenericType()) {
    this.type=this.constructor.checkGenericType(markers,this.position,context,this.type,this.arguments);
  }
  this.constructor.checkArguments(markers,this.position,context,this.type,this.arguments);
  return this;
}
Program: 83096
Project: 83096
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  this.arguments.resolve(markers,context);
  IClass theClass=this.type.getTheClass();
  if (theClass == null) {
    return;
  }
  int count=theClass.parameterCount();
  for (int i=0; i < count; i++) {
    IParameter param=theClass.getParameter(i);
    IType type=param.getType();
    IValue value=this.arguments.getValue(i,param);
    if (value == null) {
      if (param.getValue() == null) {
        markers.add(this.position,"String_Node_Str",this.type,param.getName());
      }
      continue;
    }
    IValue value1=value.withType(type,type,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str",param.getName());
      marker.addInfo("String_Node_Str" + type);
      marker.addInfo("String_Node_Str" + value.getType());
      continue;
    }
    value1=Util.constant(value1,markers);
    if (value1 != value) {
      this.arguments.setValue(i,param,value1);
    }
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  this.arguments.resolve(markers,context);
  IClass theClass=this.type.getTheClass();
  if (theClass == null) {
    return;
  }
  int count=theClass.parameterCount();
  for (int i=0; i < count; i++) {
    IParameter param=theClass.getParameter(i);
    IType type=param.getType();
    IValue value=this.arguments.getValue(i,param);
    if (value == null) {
      if (param.getValue() == null) {
        markers.add(this.position,"String_Node_Str",this.type,param.getName());
      }
      continue;
    }
    IValue value1=value.withType(type,type,markers,context);
    if (value1 == null) {
      Util.createTypeError(markers,value,type,type,"String_Node_Str",param.getName());
      continue;
    }
    value1=Util.constant(value1,markers);
    if (value1 != value) {
      this.arguments.setValue(i,param,value1);
    }
  }
}
Program: 83097
Project: 83097
Buggy source:
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.value=this.value.cleanup(context,compilableList);
  if (this.capturedFieldCount == 0) {
    if (this.value instanceof AbstractCall) {
      AbstractCall c=(AbstractCall)this.value;
      IMethod method=c.getMethod();
      if (this.checkCall(c.getValue(),c.getArguments(),method)) {
switch (method.getInvokeOpcode()) {
case Opcodes.INVOKEVIRTUAL:
          this.directInvokeOpcode=ClassFormat.H_INVOKEVIRTUAL;
        break;
case Opcodes.INVOKESTATIC:
      this.directInvokeOpcode=ClassFormat.H_INVOKESTATIC;
    break;
case Opcodes.INVOKEINTERFACE:
  this.directInvokeOpcode=ClassFormat.H_INVOKEINTERFACE;
break;
case Opcodes.INVOKESPECIAL:
this.directInvokeOpcode=ClassFormat.H_INVOKESPECIAL;
break;
}
this.name=method.getName().qualified;
this.owner=method.getTheClass().getInternalName();
this.lambdaDesc=method.getDescriptor();
return this;
}
}
 else if (this.value.getClass() == ConstructorCall.class) {
ConstructorCall c=(ConstructorCall)this.value;
IConstructor ctor=c.getConstructor();
if (this.checkCall(null,c.getArguments(),ctor)) {
this.directInvokeOpcode=ClassFormat.H_NEWINVOKESPECIAL;
this.name="String_Node_Str";
this.owner=ctor.getTheClass().getInternalName();
this.lambdaDesc=ctor.getDescriptor();
return this;
}
}
}
compilableList.addCompilable(this);
return this;
}

Fixed version (ground truth):
@Override public IValue cleanup(IContext context,IClassCompilableList compilableList){
  this.value=this.value.cleanup(context,compilableList);
  if (this.capturedFieldCount == 0) {
    if (this.value instanceof AbstractCall && this.value.valueTag() != COMPOUND_CALL) {
      AbstractCall c=(AbstractCall)this.value;
      IMethod method=c.getMethod();
      if (this.checkCall(c.getValue(),c.getArguments(),method)) {
switch (method.getInvokeOpcode()) {
case Opcodes.INVOKEVIRTUAL:
          this.directInvokeOpcode=ClassFormat.H_INVOKEVIRTUAL;
        break;
case Opcodes.INVOKESTATIC:
      this.directInvokeOpcode=ClassFormat.H_INVOKESTATIC;
    break;
case Opcodes.INVOKEINTERFACE:
  this.directInvokeOpcode=ClassFormat.H_INVOKEINTERFACE;
break;
case Opcodes.INVOKESPECIAL:
this.directInvokeOpcode=ClassFormat.H_INVOKESPECIAL;
break;
}
this.name=method.getName().qualified;
this.owner=method.getTheClass().getInternalName();
this.lambdaDesc=method.getDescriptor();
return this;
}
}
 else if (this.value.getClass() == ConstructorCall.class) {
ConstructorCall c=(ConstructorCall)this.value;
IConstructor ctor=c.getConstructor();
if (this.checkCall(null,c.getArguments(),ctor)) {
this.directInvokeOpcode=ClassFormat.H_NEWINVOKESPECIAL;
this.name="String_Node_Str";
this.owner=ctor.getTheClass().getInternalName();
this.lambdaDesc=ctor.getDescriptor();
return this;
}
}
}
compilableList.addCompilable(this);
return this;
}
Program: 83098
Project: 83098
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IMethod method=this.method;
  if (method == null) {
    method=IContext.resolveMethod(type,null,this.methodName,this.arguments);
    if (method == null) {
      StringBuilder builder=new StringBuilder();
      this.arguments.typesToString(builder);
      markers.add(this.literal.getPosition(),"String_Node_Str",this.literal.getType(),type,builder);
      this.type=type;
      return null;
    }
    this.method=method;
  }
  GenericData data=method.getGenericData(null,null,this.arguments);
  method.checkArguments(markers,this.literal.getPosition(),context,null,this.arguments,data);
  this.type=method.getType().getConcreteType(data);
  if (!type.isSuperTypeOf(this.type)) {
    Marker m=markers.create(this.literal.getPosition(),"String_Node_Str");
    m.addInfo("String_Node_Str" + type);
    m.addInfo("String_Node_Str" + this.type);
    StringBuilder sb=new StringBuilder("String_Node_Str");
    Util.methodSignatureToString(method,sb);
    m.addInfo(sb.toString());
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  IMethod method=this.method;
  if (method == null) {
    method=IContext.resolveMethod(type,null,this.methodName,this.arguments);
    if (method == null) {
      StringBuilder builder=new StringBuilder();
      this.arguments.typesToString(builder);
      markers.add(this.literal.getPosition(),"String_Node_Str",this.literal.getType(),type,builder);
      this.type=type;
      return null;
    }
    this.method=method;
  }
  GenericData data=method.getGenericData(null,null,this.arguments);
  method.checkArguments(markers,this.literal.getPosition(),context,null,this.arguments,data);
  this.type=method.getType().getConcreteType(data);
  if (!type.isSuperTypeOf(this.type)) {
    Marker m=markers.create(this.literal.getPosition(),"String_Node_Str");
    m.addInfo("String_Node_Str" + type.getConcreteType(typeContext));
    m.addInfo("String_Node_Str" + this.type);
    StringBuilder sb=new StringBuilder("String_Node_Str");
    Util.methodSignatureToString(method,sb);
    m.addInfo(sb.toString());
  }
  return this;
}
Program: 83100
Project: 83100
Buggy source:
/** 
 * Determines whether to generate a   {@code tableswitch} or a{@code lookupswitch} instruction, and returns {@code true} when a{@code tableswitch} should be generated.
 * @param low the lowest value
 * @param high the highest value
 * @param count the number of cases
 * @return true, if a tableswitch instruction should be used
 */
private static boolean useTableSwitch(int low,int high,int count){
  int tableSpace=4 + (high - low + 1);
  int tableTime=3;
  int lookupSpace=3 + 2 * count;
  int lookupTime=MathUtils.logBaseTwo(count);
  return count > 0 && tableSpace + 3 * tableTime <= lookupSpace + 3 * lookupTime;
}

Fixed version (ground truth):
/** 
 * Determines whether to generate a   {@code tableswitch} or a{@code lookupswitch} instruction, and returns {@code true} when a{@code tableswitch} should be generated.
 * @param low the lowest value
 * @param high the highest value
 * @param count the number of cases
 * @return true, if a tableswitch instruction should be used
 */
private static boolean useTableSwitch(int low,int high,int count){
  int tableSpace=4 + high - low + 1;
  int tableTime=3;
  int lookupSpace=3 + 2 * count;
  int lookupTime=MathUtils.logBaseTwo(count);
  return count > 0 && tableSpace + 3 * tableTime <= lookupSpace + 3 * lookupTime;
}
Program: 83101
Project: 83101
Buggy source:
@Override public void foldConstants(){
  if (this.bound != null)   this.bound.foldConstants();
}

Fixed version (ground truth):
@Override public void foldConstants(){
  if (this.bound != null) {
    this.bound.foldConstants();
  }
}
Program: 83102
Project: 83102
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if (this.bound != null)   this.bound.check(markers,context);
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if (this.bound != null) {
    this.bound.check(markers,context);
  }
}
Program: 83103
Project: 83103
Buggy source:
@Override public void cleanup(IContext context,IClassCompilableList compilableList){
  if (this.bound != null)   this.bound.cleanup(context,compilableList);
}

Fixed version (ground truth):
@Override public void cleanup(IContext context,IClassCompilableList compilableList){
  if (this.bound != null) {
    this.bound.cleanup(context,compilableList);
  }
}
Program: 83104
Project: 83104
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  if (this.type != null)   this.type.resolve(markers,context);
  if (this.annotations != null) {
    this.annotations.resolve(markers,context);
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  if (this.type != null) {
    this.type.resolve(markers,context);
  }
  if (this.annotations != null) {
    this.annotations.resolve(markers,context);
  }
}
Program: 83105
Project: 83105
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.type != null)   this.type.checkType(markers,context,TypePosition.RETURN_TYPE);
  if (this.annotations != null) {
    this.annotations.checkTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.type != null) {
    this.type.checkType(markers,context,TypePosition.RETURN_TYPE);
  }
  if (this.annotations != null) {
    this.annotations.checkTypes(markers,context);
  }
}
Program: 83106
Project: 83106
Buggy source:
@Override public void foldConstants(){
  if (this.type != null)   this.type.foldConstants();
  if (this.annotations != null) {
    this.annotations.foldConstants();
  }
}

Fixed version (ground truth):
@Override public void foldConstants(){
  if (this.type != null) {
    this.type.foldConstants();
  }
  if (this.annotations != null) {
    this.annotations.foldConstants();
  }
}
Program: 83107
Project: 83107
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if (this.type != null)   this.type.check(markers,context);
  if (this.annotations != null) {
    this.annotations.check(markers,context,this.getElementType());
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if (this.type != null) {
    this.type.check(markers,context);
  }
  if (this.annotations != null) {
    this.annotations.check(markers,context,this.getElementType());
  }
}
Program: 83108
Project: 83108
Buggy source:
@Override public int getInvokeOpcode(){
  if ((modifiers & Modifiers.STATIC) != 0) {
    return Opcodes.INVOKESTATIC;
  }
  if ((modifiers & Modifiers.PRIVATE) == Modifiers.PRIVATE) {
    return Opcodes.INVOKESPECIAL;
  }
  if (this.theClass.isInterface()) {
    return Opcodes.INVOKEINTERFACE;
  }
  return Opcodes.INVOKEVIRTUAL;
}

Fixed version (ground truth):
@Override public int getInvokeOpcode(){
  if ((this.modifiers & Modifiers.STATIC) != 0) {
    return Opcodes.INVOKESTATIC;
  }
  if ((this.modifiers & Modifiers.PRIVATE) == Modifiers.PRIVATE) {
    return Opcodes.INVOKESPECIAL;
  }
  if (this.theClass.isInterface()) {
    return Opcodes.INVOKEINTERFACE;
  }
  return Opcodes.INVOKEVIRTUAL;
}
Program: 83110
Project: 83110
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance.check(markers,context);
  }
  if (this.method != null) {
    IType type1=this.instance.getType();
    IType type2=this.getType();
    if (!type1.isSuperTypeOf(type2)) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name,this.instance.toString());
      marker.addInfo("String_Node_Str" + type1);
      marker.addInfo("String_Node_Str" + type2);
    }
    this.method.checkCall(markers,this.position,context,this.instance,this.arguments,this.getGenericData());
  }
  this.arguments.check(markers,context);
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if (this.instance != null) {
    this.instance.check(markers,context);
  }
  if (this.method != null) {
    IType type1=this.instance.getType();
    IType type2=super.getType();
    if (!type1.isSuperTypeOf(type2)) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name,this.instance.toString());
      marker.addInfo("String_Node_Str" + type1);
      marker.addInfo("String_Node_Str" + type2);
    }
    this.method.checkCall(markers,this.position,context,this.instance,this.arguments,this.getGenericData());
  }
  this.arguments.check(markers,context);
}
Program: 83111
Project: 83111
Buggy source:
@Override protected IValue resolveCall(MarkerList markers,IContext context){
  int type=this.instance.valueTag();
  if (type == APPLY_CALL) {
    AbstractCall ac=(AbstractCall)this.instance;
    IValue op=new MethodCall(this.position,ac,this.name,this.arguments).resolveCall(markers,context);
    IValue update=new UpdateMethodCall(this.position,ac.instance,ac.arguments.withLastValue(Name.update,op)).resolveCall(markers,context);
    return update;
  }
 else   if (type == SUBSCRIPT_GET) {
    AbstractCall ac=(AbstractCall)this.instance;
    IValue op=new MethodCall(this.position,ac,this.name,this.arguments).resolveCall(markers,context);
    IValue subscript_$eq=new SubscriptSetter(this.position,ac.instance,ac.arguments.withLastValue(Name.subscript_$eq,op)).resolveCall(markers,context);
    return subscript_$eq;
  }
 else   if (type == FIELD_ACCESS) {
    return this;
  }
  throw new Error();
}

Fixed version (ground truth):
@Override protected IValue resolveCall(MarkerList markers,IContext context){
  int type=this.instance.valueTag();
  if (type == APPLY_CALL) {
    AbstractCall ac=(AbstractCall)this.instance;
    IValue op=new MethodCall(this.position,ac,this.name,this.arguments).resolveCall(markers,context);
    IValue update=new UpdateMethodCall(this.position,ac.instance,ac.arguments.withLastValue(Name.update,op)).resolveCall(markers,context);
    return update;
  }
 else   if (type == SUBSCRIPT_GET) {
    AbstractCall ac=(AbstractCall)this.instance;
    IValue op=new MethodCall(this.position,ac,this.name,this.arguments).resolveCall(markers,context);
    IValue subscript_$eq=new SubscriptSetter(this.position,ac.instance,ac.arguments.withLastValue(Name.subscript_$eq,op)).resolveCall(markers,context);
    return subscript_$eq;
  }
 else   if (type != FIELD_ACCESS) {
    throw new Error();
  }
  IMethod m=this.method=ICall.resolveMethod(context,this.instance,this.name,this.arguments);
  if (m == null) {
    ICall.addResolveMarker(markers,position,instance,name,arguments);
  }
  return this;
}
Program: 83112
Project: 83112
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  if (this.value == null) {
    return;
  }
  if (this.instance == null) {
    this.value.writeExpression(writer,this.field.getTheClass().getType());
    writer.writeInsn(Opcodes.AUTO_DUP);
  }
 else {
    this.instance.writeExpression(writer);
    this.value.writeExpression(writer);
    writer.writeInsn(Opcodes.AUTO_DUP_X1);
  }
  this.field.writeSet(writer,null,null,this.getLineNumber());
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  if (this.instance == null) {
    this.value.writeExpression(writer,this.field.getType());
    writer.writeInsn(Opcodes.AUTO_DUP);
  }
 else {
    this.instance.writeExpression(writer);
    this.value.writeExpression(writer);
    writer.writeInsn(Opcodes.AUTO_DUP_X1);
  }
  this.field.writeSet(writer,null,null,this.getLineNumber());
}
Program: 83113
Project: 83113
Buggy source:
@Override public void writeSet(MethodWriter writer,IValue instance,IValue value,int lineNumber) throws BytecodeException {
  if (this.className == null) {
    writer.writeInsn(Opcodes.AUTO_POP);
    return;
  }
  String extended=this.type.getExtendedName();
  writer.writeFieldInsn(Opcodes.PUTSTATIC,this.className,this.name.qualified,extended);
}

Fixed version (ground truth):
@Override public void writeSet(MethodWriter writer,IValue instance,IValue value,int lineNumber) throws BytecodeException {
  if (value != null) {
    value.writeExpression(writer,this.type);
  }
  if (this.className == null) {
    writer.writeInsn(Opcodes.AUTO_POP);
    return;
  }
  String extended=this.type.getExtendedName();
  writer.writeFieldInsn(Opcodes.PUTSTATIC,this.className,this.name.qualified,extended);
}
Program: 83114
Project: 83114
Buggy source:
@Override public void parse(IParserManager pm,IToken token){
  int type=token.type();
switch (this.mode) {
case OPEN_BRACKET:
    pm.pushParser(new ExpressionParser(this));
  this.mode=SEPARATOR | COLON;
this.startPosition=token;
if (type != Symbols.OPEN_SQUARE_BRACKET) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
case SEPARATOR | COLON:
if (type == Symbols.CLOSE_SQUARE_BRACKET) {
pm.popParser();
this.end(token);
return;
}
if (type == Symbols.COLON) {
this.mode=SEPARATOR;
this.map=true;
this.values2=new IValue[this.valueCount];
pm.pushParser(new ExpressionParser(this));
return;
}
this.mode=SEPARATOR;
pm.pushParser(new ExpressionParser(this));
if (type != Symbols.COMMA && type != Symbols.SEMICOLON) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
case SEPARATOR:
if (type == Symbols.CLOSE_SQUARE_BRACKET) {
pm.popParser();
this.end(token);
return;
}
this.mode=this.map ? COLON : SEPARATOR;
pm.pushParser(new ExpressionParser(this));
if (type != Symbols.COMMA && type != Symbols.SEMICOLON) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
case COLON:
if (type == Symbols.CLOSE_SQUARE_BRACKET) {
this.end(token);
pm.popParser();
return;
}
this.mode=SEPARATOR;
pm.pushParser(new ExpressionParser(this));
if (type != Symbols.COLON) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
}
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token){
  int type=token.type();
switch (this.mode) {
case OPEN_BRACKET:
    pm.pushParser(new ExpressionParser(this));
  this.mode=SEPARATOR | COLON;
this.startPosition=token;
if (type != Symbols.OPEN_SQUARE_BRACKET) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
case SEPARATOR | COLON:
if (type == Symbols.CLOSE_SQUARE_BRACKET) {
pm.popParser();
this.end(token);
return;
}
if (type == Symbols.COLON) {
this.mode=SEPARATOR;
this.map=true;
this.values2=new IValue[this.valueCount];
pm.pushParser(new ExpressionParser(this));
return;
}
this.mode=SEPARATOR;
pm.pushParser(new ExpressionParser(this));
if (type != Symbols.COMMA && type != Symbols.SEMICOLON) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
case SEPARATOR:
if (type == Symbols.CLOSE_SQUARE_BRACKET) {
pm.popParser();
this.end(token);
return;
}
this.mode=this.map ? COLON : SEPARATOR;
pm.pushParser(new ExpressionParser(this));
if (type != Symbols.COMMA && type != Symbols.SEMICOLON) {
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
case COLON:
if (type == Symbols.CLOSE_SQUARE_BRACKET) {
this.end(token);
pm.popParser();
return;
}
this.mode=SEPARATOR;
pm.pushParser(new ExpressionParser(this));
if (type != Symbols.COLON) {
pm.reparse();
pm.report(new SyntaxError(token,"String_Node_Str"));
}
return;
}
}
Program: 83115
Project: 83115
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  if (!this.theClass.isSubTypeOf(Types.ANNOTATION)) {
    this.theClass.addInterface(Types.ANNOTATION);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (!this.theClass.isSubTypeOf(Annotation.Types.ANNOTATION)) {
    this.theClass.addInterface(Annotation.Types.ANNOTATION);
  }
}
Program: 83116
Project: 83116
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  if (this.theClass == null) {
    return;
  }
  if (this.retention == null) {
    IAnnotation retention=this.theClass.getAnnotation(Types.RETENTION_CLASS);
    if (retention != null) {
      INamed value=(INamed)retention.getArguments().getValue(0,Annotation.VALUE);
      this.retention=RetentionPolicy.valueOf(value.getName().qualified);
    }
  }
  if (this.targets != null) {
    return;
  }
  IAnnotation target=this.theClass.getAnnotation(Types.TARGET_CLASS);
  if (target == null) {
    return;
  }
  this.targets=new TreeSet();
  IValueList values=(IValueList)target.getArguments().getValue(0,Annotation.VALUE);
  if (values == null) {
    return;
  }
  int count=values.valueCount();
  for (int i=0; i < count; i++) {
    INamed value=(INamed)values.getValue(i);
    this.targets.add(ElementType.valueOf(value.getName().qualified));
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  if (this.theClass == null) {
    return;
  }
  if (this.retention == null) {
    IAnnotation retention=this.theClass.getAnnotation(Annotation.Types.RETENTION_CLASS);
    if (retention != null) {
      INamed value=(INamed)retention.getArguments().getValue(0,Annotation.VALUE);
      this.retention=RetentionPolicy.valueOf(value.getName().qualified);
    }
  }
  if (this.targets != null) {
    return;
  }
  IAnnotation target=this.theClass.getAnnotation(Annotation.Types.TARGET_CLASS);
  if (target == null) {
    return;
  }
  this.targets=new TreeSet();
  IValueList values=(IValueList)target.getArguments().getValue(0,Annotation.VALUE);
  if (values == null) {
    return;
  }
  int count=values.valueCount();
  for (int i=0; i < count; i++) {
    INamed value=(INamed)values.getValue(i);
    this.targets.add(ElementType.valueOf(value.getName().qualified));
  }
}
Program: 83117
Project: 83117
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == Types.UNKNOWN) {
    return this;
  }
  if (type.isArrayType()) {
    return this;
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.NIL_CONVERTIBLE_CLASS);
  if (annotation != null) {
    this.methodName=LiteralExpression.getMethodName(annotation);
    this.requiredType=type;
    return this;
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type == dyvil.tools.compiler.ast.type.Types.UNKNOWN) {
    return this;
  }
  if (type.isArrayType()) {
    return this;
  }
  IAnnotation annotation=type.getTheClass().getAnnotation(Types.NIL_CONVERTIBLE_CLASS);
  if (annotation != null) {
    this.methodName=LiteralExpression.getMethodName(annotation);
    this.requiredType=type;
    return this;
  }
  return null;
}
Program: 83118
Project: 83118
Buggy source:
@Override public IType getType(){
  return this.requiredType == null ? Types.UNKNOWN : this.requiredType;
}

Fixed version (ground truth):
@Override public IType getType(){
  return this.requiredType == null ? dyvil.tools.compiler.ast.type.Types.UNKNOWN : this.requiredType;
}
Program: 83119
Project: 83119
Buggy source:
@Override public IValue withType(IType arrayType,ITypeContext typeContext,MarkerList markers,IContext context){
  IType elementType;
  if (!arrayType.isArrayType()) {
    IClass iclass=arrayType.getTheClass();
    IAnnotation annotation;
    if ((annotation=iclass.getAnnotation(Types.ARRAY_CONVERTIBLE)) != null) {
      return new LiteralExpression(this,annotation).withType(arrayType,typeContext,markers,context);
    }
    if (arrayType.classEquals(Types.ITERABLE)) {
      return new LiteralExpression(this,getArrayToIterable()).withType(arrayType,typeContext,markers,context);
    }
 else     if (iclass != Types.OBJECT_CLASS) {
      return null;
    }
 else {
      elementType=this.getElementType();
    }
  }
 else {
    elementType=arrayType.getElementType();
  }
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(elementType)) {
      return null;
    }
  }
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    IValue value1=value.withType(elementType,typeContext,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + this.requiredType);
      marker.addInfo("String_Node_Str" + value.getType());
    }
 else {
      value=value1;
      this.values[i]=value1;
    }
  }
  this.elementType=elementType;
  this.requiredType=arrayType;
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType arrayType,ITypeContext typeContext,MarkerList markers,IContext context){
  IType elementType;
  if (!arrayType.isArrayType()) {
    IClass iclass=arrayType.getTheClass();
    IAnnotation annotation;
    if ((annotation=iclass.getAnnotation(Types.ARRAY_CONVERTIBLE)) != null) {
      return new LiteralExpression(this,annotation).withType(arrayType,typeContext,markers,context);
    }
    if (arrayType.classEquals(dyvil.tools.compiler.ast.type.Types.ITERABLE)) {
      return new LiteralExpression(this,getArrayToIterable()).withType(arrayType,typeContext,markers,context);
    }
 else     if (iclass != dyvil.tools.compiler.ast.type.Types.OBJECT_CLASS) {
      return null;
    }
 else {
      elementType=this.getElementType();
    }
  }
 else {
    elementType=arrayType.getElementType();
  }
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(elementType)) {
      return null;
    }
  }
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    IValue value1=value.withType(elementType,typeContext,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(value.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + this.requiredType);
      marker.addInfo("String_Node_Str" + value.getType());
    }
 else {
      value=value1;
      this.values[i]=value1;
    }
  }
  this.elementType=elementType;
  this.requiredType=arrayType;
  return this;
}
Program: 83120
Project: 83120
Buggy source:
public static IType getCommonType(IValue[] values,int valueCount){
  if (valueCount == 0) {
    return Types.ANY;
  }
  IType t=values[0].getType();
  for (int i=1; i < valueCount; i++) {
    IType t1=values[i].getType();
    t=Types.combine(t,t1);
    if (t == null) {
      return Types.ANY;
    }
  }
  return t;
}

Fixed version (ground truth):
public static IType getCommonType(IValue[] values,int valueCount){
  if (valueCount == 0) {
    return dyvil.tools.compiler.ast.type.Types.ANY;
  }
  IType t=values[0].getType();
  for (int i=1; i < valueCount; i++) {
    IType t1=values[i].getType();
    t=dyvil.tools.compiler.ast.type.Types.combine(t,t1);
    if (t == null) {
      return dyvil.tools.compiler.ast.type.Types.ANY;
    }
  }
  return t;
}
Program: 83121
Project: 83121
Buggy source:
private boolean isConvertibleFrom(IType type){
  IClass iclass=type.getTheClass();
  return iclass == Types.OBJECT_CLASS || iclass.getAnnotation(Types.ARRAY_CONVERTIBLE) != null || Types.ITERABLE.isSuperClassOf(type);
}

Fixed version (ground truth):
private boolean isConvertibleFrom(IType type){
  IClass iclass=type.getTheClass();
  return iclass == dyvil.tools.compiler.ast.type.Types.OBJECT_CLASS || iclass.getAnnotation(Types.ARRAY_CONVERTIBLE) != null || dyvil.tools.compiler.ast.type.Types.ITERABLE.isSuperClassOf(type);
}
Program: 83122
Project: 83122
Buggy source:
private static IMethod getArrayToIterable(){
  if (ARRAY_TO_ITERABLE != null) {
    return ARRAY_TO_ITERABLE;
  }
  return ARRAY_TO_ITERABLE=Types.getObjectArray().getBody().getMethod(Name.getQualified("String_Node_Str"));
}

Fixed version (ground truth):
private static IMethod getArrayToIterable(){
  if (ARRAY_TO_ITERABLE != null) {
    return ARRAY_TO_ITERABLE;
  }
  return ARRAY_TO_ITERABLE=dyvil.tools.compiler.ast.type.Types.getObjectArray().getBody().getMethod(Name.getQualified("String_Node_Str"));
}
Program: 83123
Project: 83123
Buggy source:
@Override public float getTypeMatch(IType type){
  float distance=type.getSubTypeDistance(Types.STRING);
  if (distance != 0) {
    return distance;
  }
  return this.isConvertible(type) ? CONVERSION_MATCH : 0;
}

Fixed version (ground truth):
@Override public float getTypeMatch(IType type){
  float distance=type.getSubTypeDistance(dyvil.tools.compiler.ast.type.Types.STRING);
  if (distance != 0) {
    return distance;
  }
  return this.isConvertible(type) ? CONVERSION_MATCH : 0;
}
Program: 83124
Project: 83124
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  int len=this.count / 2;
  for (int i=0; i < len; i++) {
    IValue v=this.values[i];
    v.check(markers,context);
    if (v.getType() == Types.VOID) {
      markers.add(v.getPosition(),"String_Node_Str");
    }
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  int len=this.count / 2;
  for (int i=0; i < len; i++) {
    IValue v=this.values[i];
    v.check(markers,context);
    if (v.getType() == dyvil.tools.compiler.ast.type.Types.VOID) {
      markers.add(v.getPosition(),"String_Node_Str");
    }
  }
}
Program: 83125
Project: 83125
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isSuperTypeOf(Types.STRING)) {
    return this;
  }
  IClass iclass=type.getTheClass();
  if (iclass.getAnnotation(Types.STRING_CONVERTIBLE_CLASS) != null) {
    return new LiteralExpression(this).withType(type,typeContext,markers,context);
  }
  if (iclass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null) {
    StringValue string;
    int len=this.count / 2;
    if (len > 0) {
      StringBuilder builder=new StringBuilder();
      builder.append(this.strings[0]);
      for (int i=1; i <= len; i++) {
        builder.append('\\').append(i);
        builder.append(this.strings[i]);
      }
      string=new StringValue(this.position,builder.toString());
    }
 else {
      string=new StringValue("String_Node_Str");
    }
    ArgumentList list=new ArgumentList(1 + len);
    list.addValue(string);
    for (int i=0; i < len; i++) {
      list.addValue(this.values[i]);
    }
    return new LiteralExpression(this,list).withType(type,typeContext,markers,context);
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (type.isSuperTypeOf(dyvil.tools.compiler.ast.type.Types.STRING)) {
    return this;
  }
  IClass iclass=type.getTheClass();
  if (iclass.getAnnotation(dyvil.tools.compiler.ast.type.Types.STRING_CONVERTIBLE_CLASS) != null) {
    return new LiteralExpression(this).withType(type,typeContext,markers,context);
  }
  if (iclass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null) {
    StringValue string;
    int len=this.count / 2;
    if (len > 0) {
      StringBuilder builder=new StringBuilder();
      builder.append(this.strings[0]);
      for (int i=1; i <= len; i++) {
        builder.append('\\').append(i);
        builder.append(this.strings[i]);
      }
      string=new StringValue(this.position,builder.toString());
    }
 else {
      string=new StringValue("String_Node_Str");
    }
    ArgumentList list=new ArgumentList(1 + len);
    list.addValue(string);
    for (int i=0; i < len; i++) {
      list.addValue(this.values[i]);
    }
    return new LiteralExpression(this,list).withType(type,typeContext,markers,context);
  }
  return null;
}
Program: 83126
Project: 83126
Buggy source:
@Override public boolean isType(IType type){
  if (type.isSuperTypeOf(Types.STRING)) {
    return true;
  }
  return this.isConvertible(type);
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (type.isSuperTypeOf(dyvil.tools.compiler.ast.type.Types.STRING)) {
    return true;
  }
  return this.isConvertible(type);
}
Program: 83127
Project: 83127
Buggy source:
@Override public IType getType(){
  return Types.STRING;
}

Fixed version (ground truth):
@Override public IType getType(){
  return dyvil.tools.compiler.ast.type.Types.STRING;
}
Program: 83128
Project: 83128
Buggy source:
private boolean isConvertible(IType type){
  IClass theClass=type.getTheClass();
  return theClass.getAnnotation(Types.STRING_CONVERTIBLE_CLASS) != null || theClass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null;
}

Fixed version (ground truth):
private boolean isConvertible(IType type){
  IClass theClass=type.getTheClass();
  return theClass.getAnnotation(dyvil.tools.compiler.ast.type.Types.STRING_CONVERTIBLE_CLASS) != null || theClass.getAnnotation(Types.FORMAT_STRING_CONVERTIBLE) != null;
}
Program: 83129
Project: 83129
Buggy source:
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  if (this.method != null) {
    this.method.writeCall(writer,null,this.arguments,this.tupleType,this.getLineNumber());
    return;
  }
  String internal=this.tupleType.getInternalName();
  writer.writeTypeInsn(Opcodes.NEW,internal);
  writer.writeInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    value.writeExpression(writer,Types.OBJECT);
  }
  String owner=internal;
  String desc=TupleType.getConstructorDescriptor(this.valueCount);
  writer.writeInvokeInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer) throws BytecodeException {
  if (this.method != null) {
    this.method.writeCall(writer,null,this.arguments,this.tupleType,this.getLineNumber());
    return;
  }
  String internal=this.tupleType.getInternalName();
  writer.writeTypeInsn(Opcodes.NEW,internal);
  writer.writeInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    IValue value=this.values[i];
    value.writeExpression(writer,dyvil.tools.compiler.ast.type.Types.OBJECT);
  }
  String owner=internal;
  String desc=TupleType.getConstructorDescriptor(this.valueCount);
  writer.writeInvokeInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false);
}
Program: 83130
Project: 83130
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type == null) {
    this.type=Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolveType(markers,context);
  ClassGenericType generic=new ClassGenericType(Types.CLASS_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  if (this.type == null) {
    this.type=dyvil.tools.compiler.ast.type.Types.UNKNOWN;
    markers.add(this.position,"String_Node_Str");
    return;
  }
  this.type=this.type.resolveType(markers,context);
  ClassGenericType generic=new ClassGenericType(Types.CLASS_CLASS);
  generic.addType(this.type);
  this.genericType=generic;
}
Program: 83131
Project: 83131
Buggy source:
@Override protected IValue resolveCall(MarkerList markers,IContext context){
  int args=this.arguments.size();
  if (args == 1) {
    IValue op;
    if (this.instance != null) {
      op=Operators.getPriority(this.instance,this.name,this.arguments.getFirstValue());
    }
 else {
      op=Operators.getPriority(this.name,this.arguments.getFirstValue());
    }
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,this.arguments);
  if (method != null) {
    this.method=method;
    this.checkArguments(markers,context);
    return this;
  }
  if (args == 1 && this.instance != null) {
    String qualified=this.name.qualified;
    if (qualified.endsWith("String_Node_Str")) {
      String unqualified=this.name.unqualified;
      Name name=Name.get(qualified.substring(0,qualified.length() - 3),unqualified.substring(0,unqualified.length() - 1));
      CompoundCall cc=new CompoundCall(this.position,this.instance,name,this.arguments);
      return cc.resolveCall(markers,context);
    }
    IValue op=Operators.get(this.instance,this.name,this.arguments.getFirstValue());
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  if (this.instance == null) {
    AbstractCall apply=this.resolveApply(markers,context);
    if (apply != null) {
      apply.checkArguments(markers,context);
      return apply;
    }
  }
  ICall.addResolveMarker(markers,this.position,this.instance,this.name,this.arguments);
  return this;
}

Fixed version (ground truth):
@Override protected IValue resolveCall(MarkerList markers,IContext context){
  int args=this.arguments.size();
  if (args == 1) {
    IValue op;
    if (this.instance != null) {
      op=Operators.getPriority(this.instance,this.name,this.arguments.getFirstValue());
    }
 else {
      op=Operators.getPriority(this.name,this.arguments.getFirstValue());
    }
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  IMethod method=ICall.resolveMethod(context,this.instance,this.name,this.arguments);
  if (method != null) {
    this.method=method;
    this.checkArguments(markers,context);
    return this;
  }
  if (args == 1 && this.instance != null) {
    String qualified=this.name.qualified;
    if (qualified.endsWith("String_Node_Str")) {
      Name name=ExpressionParser.stripEq(this.name);
      CompoundCall cc=new CompoundCall(this.position,this.instance,name,this.arguments);
      return cc.resolveCall(markers,context);
    }
    IValue op=Operators.get(this.instance,this.name,this.arguments.getFirstValue());
    if (op != null) {
      op.setPosition(this.position);
      return op;
    }
  }
  if (this.instance == null) {
    AbstractCall apply=this.resolveApply(markers,context);
    if (apply != null) {
      apply.checkArguments(markers,context);
      return apply;
    }
  }
  ICall.addResolveMarker(markers,this.position,this.instance,this.name,this.arguments);
  return this;
}
Program: 83132
Project: 83132
Buggy source:
@Override public IValue checkAssign(MarkerList markers,IContext context,ICodePosition position,IValue instance,IValue newValue){
  if ((this.modifiers & Modifiers.FINAL) != 0) {
    markers.add(position,"String_Node_Str",this.name.unqualified);
  }
  IValue value1=IType.convertValue(newValue,this.type,instance.getType(),markers,context);
  if (value1 == null) {
    Marker marker=markers.create(newValue.getPosition(),"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + newValue.getType());
  }
 else {
    newValue=value1;
  }
  return newValue;
}

Fixed version (ground truth):
@Override public IValue checkAssign(MarkerList markers,IContext context,ICodePosition position,IValue instance,IValue newValue){
  if ((this.modifiers & Modifiers.FINAL) != 0) {
    markers.add(position,"String_Node_Str",this.name.unqualified);
  }
  IValue value1=IType.convertValue(newValue,this.type,this.type,markers,context);
  if (value1 == null) {
    Marker marker=markers.create(newValue.getPosition(),"String_Node_Str",this.name.unqualified);
    marker.addInfo("String_Node_Str" + this.type);
    marker.addInfo("String_Node_Str" + newValue.getType());
  }
 else {
    newValue=value1;
  }
  return newValue;
}
Program: 83133
Project: 83133
Buggy source:
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (!this.isMethodTypeVariable(typeVar)) {
    return;
  }
  if (index < this.genericCount) {
    this.generics[index]=Types.combine(this.generics[index],type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}

Fixed version (ground truth):
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (!this.isMethodTypeVariable(typeVar)) {
    return;
  }
  if (index < this.genericCount) {
    if (this.generics[index] == null) {
      this.generics[index]=type;
      return;
    }
    this.generics[index]=Types.combine(this.generics[index],type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}
Program: 83136
Project: 83136
Buggy source:
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.pattern != null) {
    this.pattern.resolve(markers,context);
    if (this.type == null) {
      this.getType();
    }
    IType type1=this.type.resolveType(PAR_TYPE);
    this.pattern=this.pattern.withType(type1,markers);
  }
  IContext context1=new CombiningContext(this,context);
  if (this.condition != null) {
    this.condition=this.condition.resolve(markers,context1);
  }
  if (this.action != null) {
    this.action=this.action.resolve(markers,context1);
  }
  return this;
}

Fixed version (ground truth):
@Override public IValue resolve(MarkerList markers,IContext context){
  if (this.pattern != null) {
    this.pattern.resolve(markers,context);
    if (this.type == null) {
      this.getType();
    }
    IType type1=this.type.resolveTypeSafely(PAR_TYPE);
    this.pattern=this.pattern.withType(type1,markers);
  }
  IContext context1=new CombiningContext(this,context);
  if (this.condition != null) {
    this.condition=this.condition.resolve(markers,context1);
  }
  if (this.action != null) {
    this.action=this.action.resolve(markers,context1);
  }
  return this;
}
Program: 83137
Project: 83137
Buggy source:
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.isType(type)) {
    this.type=type;
    IType type1=this.type.resolveType(RETURN_TYPE);
    this.action=this.action.withType(type1,typeContext,markers,context);
    return this;
  }
  return null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type,ITypeContext typeContext,MarkerList markers,IContext context){
  if (this.isType(type)) {
    this.type=type;
    IType type1=this.type.resolveTypeSafely(RETURN_TYPE);
    this.action=this.action.withType(type1,typeContext,markers,context);
    return this;
  }
  return null;
}