nus-yam/ex-repair huggingface dataset:
Program: 83578
Project: 83578
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  super.checkTypes(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].checkTypes(markers,context);
  }
  if (this.value != null) {
    this.value.checkTypes(markers,context);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    this.checkOverride(markers,context);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  super.checkTypes(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].checkTypes(markers,context);
  }
  if (this.value != null) {
    this.value.checkTypes(markers,this);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    this.checkOverride(markers,context);
  }
}
Program: 83579
Project: 83579
Buggy source:
@Override public int getSignatureMatch(Name name,IValue instance,IArguments arguments){
  if (name != null && name != this.name) {
    return 0;
  }
  if (arguments == null) {
    return 1;
  }
  int parIndex=0;
  int match=1;
  int len=arguments.size();
  int mods=this.modifiers & Modifiers.INFIX;
  if (instance != null && mods == Modifiers.INFIX) {
    IType t2=this.parameters[0].getType();
    int m=instance.getTypeMatch(t2);
    if (m == 0) {
      return 0;
    }
    match+=m;
    parIndex=1;
  }
  if ((this.modifiers & Modifiers.VARARGS) != 0) {
    int parCount=this.parameterCount - 1;
    if (len <= parCount) {
      return 0;
    }
    int m;
    IParameter varParam=this.parameters[parCount];
    for (int i=parIndex; i < parCount; i++) {
      IParameter par=this.parameters[i + parIndex];
      m=arguments.getTypeMatch(i,par);
      if (m == 0) {
        return 0;
      }
      match+=m;
    }
    for (int i=parCount + parIndex; i < len; i++) {
      m=arguments.getVarargsTypeMatch(i,varParam);
      if (m == 0) {
        return 0;
      }
      match+=m;
    }
    return match;
  }
 else   if (len > this.parameterCount) {
    return 0;
  }
  for (int i=0; parIndex < this.parameterCount; parIndex++, i++) {
    IParameter par=this.parameters[parIndex];
    int m=arguments.getTypeMatch(i,par);
    if (m == 0) {
      return 0;
    }
    match+=m;
  }
  return match;
}

Fixed version (ground truth):
@Override public int getSignatureMatch(Name name,IValue instance,IArguments arguments){
  if (name != null && name != this.name) {
    return 0;
  }
  if (arguments == null) {
    return 1;
  }
  if (instance == null && this.modifiers == Modifiers.PREFIX) {
    int m=arguments.getFirstValue().getTypeMatch(this.theClass.getType());
    if (m == 0) {
      return 0;
    }
    return 1 + m;
  }
  int parIndex=0;
  int match=1;
  int len=arguments.size();
  int mods=this.modifiers & Modifiers.INFIX;
  if (instance != null && mods == Modifiers.INFIX) {
    IType t2=this.parameters[0].getType();
    int m=instance.getTypeMatch(t2);
    if (m == 0) {
      return 0;
    }
    match+=m;
    parIndex=1;
  }
  if ((this.modifiers & Modifiers.VARARGS) != 0) {
    int parCount=this.parameterCount - 1;
    if (len <= parCount) {
      return 0;
    }
    int m;
    IParameter varParam=this.parameters[parCount];
    for (int i=parIndex; i < parCount; i++) {
      IParameter par=this.parameters[i + parIndex];
      m=arguments.getTypeMatch(i,par);
      if (m == 0) {
        return 0;
      }
      match+=m;
    }
    for (int i=parCount + parIndex; i < len; i++) {
      m=arguments.getVarargsTypeMatch(i,varParam);
      if (m == 0) {
        return 0;
      }
      match+=m;
    }
    return match;
  }
 else   if (len > this.parameterCount) {
    return 0;
  }
  for (int i=0; parIndex < this.parameterCount; parIndex++, i++) {
    IParameter par=this.parameters[parIndex];
    int m=arguments.getTypeMatch(i,par);
    if (m == 0) {
      return 0;
    }
    match+=m;
  }
  return match;
}
Program: 83581
Project: 83581
Buggy source:
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance){
  if (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
        return null;
      }
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      markers.add(position,"String_Node_Str",this.name.unqualified);
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    markers.add(position,"String_Node_Str",this.name.unqualified);
    return new ThisValue(position,this.theClass.getType());
  }
  return instance;
}

Fixed version (ground truth):
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance,IContext context){
  if (instance != null) {
    if ((this.modifiers & Modifiers.STATIC) != 0) {
      if (instance.valueTag() != IValue.CLASS_ACCESS) {
        markers.add(position,"String_Node_Str",this.name.unqualified);
        return null;
      }
    }
 else     if (instance.valueTag() == IValue.CLASS_ACCESS) {
      markers.add(position,"String_Node_Str",this.name.unqualified);
    }
  }
 else   if ((this.modifiers & Modifiers.STATIC) == 0) {
    markers.add(position,"String_Node_Str",this.name.unqualified);
    return new ThisValue(position,this.theClass.getType());
  }
  return instance;
}
Program: 83582
Project: 83582
Buggy source:
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance){
  return instance;
}

Fixed version (ground truth):
@Override public IValue checkAccess(MarkerList markers,ICodePosition position,IValue instance,IContext context){
  return instance;
}
Program: 83583
Project: 83583
Buggy source:
@Override public IType getType(){
  if (this.requiredType != null) {
    return this.requiredType;
  }
  return this.requiredType=this.values[this.valueCount - 1].getType();
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.requiredType != null) {
    return this.requiredType;
  }
  if (this.valueCount == 0) {
    return this.requiredType=Types.VOID;
  }
  return this.requiredType=this.values[this.valueCount - 1].getType();
}
Program: 83585
Project: 83585
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.value != null) {
    this.value.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.value != null) {
    this.value.check(markers,context);
  }
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
  }
}
Program: 83586
Project: 83586
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.get != null) {
    this.get.check(markers,context);
  }
  if (this.set != null) {
    this.set.check(markers,context);
  }
 else   if (this.get == null) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.get != null) {
    this.get.check(markers,context);
  }
  if (this.set != null) {
    this.set.check(markers,context);
    if (this.type == Types.VOID) {
      markers.add(this.position,"String_Node_Str");
    }
  }
 else   if (this.get == null) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
}
Program: 83587
Project: 83587
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  this.value.check(markers,context);
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  this.value.check(markers,context);
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
  }
}
Program: 83588
Project: 83588
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue.check(markers,context);
  }
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
  }
}
Program: 83589
Project: 83589
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue.check(markers,context);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  super.check(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue.check(markers,context);
  }
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
  }
}
Program: 83590
Project: 83590
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label conditionLabel=this.conditionLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeTargetLabel(startLabel);
  this.action.writeStatement(writer);
  writer.writeLabel(conditionLabel);
  this.condition.writeJump(writer,startLabel);
  writer.writeLabel(endLabel);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label conditionLabel=this.conditionLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeTargetLabel(startLabel);
  this.action.writeStatement(writer);
  writer.writeLabel(conditionLabel);
  if (this.condition != null) {
    this.condition.writeJump(writer,startLabel);
  }
 else {
    writer.writeJumpInsn(Opcodes.GOTO,startLabel);
  }
  writer.writeLabel(endLabel);
}
Program: 83591
Project: 83591
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if (this.action != null) {
    this.action.check(markers,context);
  }
  if (this.condition != null) {
    this.condition.check(markers,context);
  }
 else {
    markers.add(this.position,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if (this.action != null) {
    this.action.check(markers,context);
  }
  if (this.condition != null) {
    this.condition.check(markers,context);
  }
}
Program: 83592
Project: 83592
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.action != null) {
    this.action.check(markers,context);
  }
  if (this.condition != null) {
    IValue condition1=this.condition.withType(Types.BOOLEAN);
    if (condition1 == null) {
      Marker marker=markers.create(this.condition.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + this.condition.getType());
    }
 else {
      this.condition=condition1;
    }
    this.condition.checkTypes(markers,context);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.action != null) {
    this.action.checkTypes(markers,context);
  }
  if (this.condition != null) {
    IValue condition1=this.condition.withType(Types.BOOLEAN);
    if (condition1 == null) {
      Marker marker=markers.create(this.condition.getPosition(),"String_Node_Str");
      marker.addInfo("String_Node_Str" + this.condition.getType());
    }
 else {
      this.condition=condition1;
    }
    this.condition.checkTypes(markers,context);
  }
}
Program: 83593
Project: 83593
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Statements.doStart);
  if (this.action != null) {
    buffer.append(' ');
    this.action.toString(prefix,buffer);
    buffer.append(' ');
  }
  buffer.append(Formatting.Statements.doWhile);
  if (this.condition != null) {
    this.condition.toString(prefix,buffer);
  }
  buffer.append(Formatting.Statements.doEnd);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Statements.doStart);
  if (this.action != null) {
    buffer.append(' ');
    this.action.toString(prefix,buffer);
  }
  if (this.condition != null) {
    buffer.append(' ');
    buffer.append(Formatting.Statements.doWhile);
    this.condition.toString(prefix,buffer);
    buffer.append(Formatting.Statements.doEnd);
  }
}
Program: 83594
Project: 83594
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  org.objectweb.asm.Label elseStart=new org.objectweb.asm.Label();
  if (this.elseThen != null) {
    org.objectweb.asm.Label elseEnd=new org.objectweb.asm.Label();
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
    writer.writeLabel(elseStart);
    this.elseThen.writeStatement(writer);
    writer.writeLabel(elseEnd);
  }
 else {
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeLabel(elseStart);
  }
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.then == null) {
    this.condition.writeExpression(writer);
    writer.writeInsn(Opcodes.POP);
    return;
  }
  org.objectweb.asm.Label elseStart=new org.objectweb.asm.Label();
  if (this.elseThen != null) {
    org.objectweb.asm.Label elseEnd=new org.objectweb.asm.Label();
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeJumpInsn(Opcodes.GOTO,elseEnd);
    writer.writeLabel(elseStart);
    this.elseThen.writeStatement(writer);
    writer.writeLabel(elseEnd);
  }
 else {
    this.condition.writeInvJump(writer,elseStart);
    this.then.writeStatement(writer);
    writer.writeLabel(elseStart);
  }
}
Program: 83595
Project: 83595
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar){
  return this.type.resolveType(typeVar);
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  return concrete.isArrayType() ? this.type.resolveType(typeVar,concrete.getElementType()) : null;
}
Program: 83596
Project: 83596
Buggy source:
public static IType getPrimitiveType(IType type){
  if (type.isArrayType()) {
    return type;
  }
  IClass iclass=type.getTheClass();
  if (iclass == Types.VOID_CLASS) {
    return Types.VOID;
  }
  if (iclass == Types.BYTE_CLASS) {
    return Types.BYTE;
  }
  if (iclass == Types.SHORT_CLASS) {
    return Types.SHORT;
  }
  if (iclass == Types.CHAR_CLASS) {
    return Types.CHAR;
  }
  if (iclass == Types.INT_CLASS) {
    return Types.INT;
  }
  if (iclass == Types.LONG_CLASS) {
    return Types.LONG;
  }
  if (iclass == Types.FLOAT_CLASS) {
    return Types.FLOAT;
  }
  if (iclass == Types.DOUBLE_CLASS) {
    return Types.DOUBLE;
  }
  return type;
}

Fixed version (ground truth):
public static IType getPrimitiveType(IType type){
  if (type.isArrayType()) {
    return type;
  }
  IClass iclass=type.getTheClass();
  if (iclass == Types.VOID_CLASS) {
    return Types.VOID;
  }
  if (iclass == Types.BOOLEAN_CLASS) {
    return Types.BOOLEAN;
  }
  if (iclass == Types.BYTE_CLASS) {
    return Types.BYTE;
  }
  if (iclass == Types.SHORT_CLASS) {
    return Types.SHORT;
  }
  if (iclass == Types.CHAR_CLASS) {
    return Types.CHAR;
  }
  if (iclass == Types.INT_CLASS) {
    return Types.INT;
  }
  if (iclass == Types.LONG_CLASS) {
    return Types.LONG;
  }
  if (iclass == Types.FLOAT_CLASS) {
    return Types.FLOAT;
  }
  if (iclass == Types.DOUBLE_CLASS) {
    return Types.DOUBLE;
  }
  return type;
}
Program: 83597
Project: 83597
Buggy source:
public static void readMethodType(String desc,IMethodSignature method){
  int i=1;
  if (desc.charAt(0) == '<') {
    while (desc.charAt(i) != '>') {
      i=readGeneric(desc,i,method);
    }
    i+=2;
  }
  while (desc.charAt(i) != ')') {
    i=readTypeList(desc,i,method);
  }
  i++;
  readTyped(desc,i,method);
}

Fixed version (ground truth):
public static void readMethodType(String desc,IMethodSignature method){
  int i=1;
  if (desc.charAt(0) == '<') {
    while (desc.charAt(i) != '>') {
      i=readGeneric(desc,i,method);
    }
    i+=2;
  }
  while (desc.charAt(i) != ')') {
    i=readTypeList(desc,i,method);
  }
  i++;
  i=readTyped(desc,i,method);
  int len=desc.length();
  while (i < len && desc.charAt(i) == '^') {
    i=readException(desc,i + 1,method);
  }
}
Program: 83598
Project: 83598
Buggy source:
public static void readConstructorType(String desc,IConstructor constructor){
  int i=1;
  while (desc.charAt(i) != ')') {
    i=readTypeList(desc,i,constructor);
  }
}

Fixed version (ground truth):
public static void readConstructorType(String desc,IConstructor constructor){
  int i=1;
  while (desc.charAt(i) != ')') {
    i=readTypeList(desc,i,constructor);
  }
  i+=2;
  int len=desc.length();
  while (i < len && desc.charAt(i) == '^') {
    i=readException(desc,i + 1,constructor);
  }
}
Program: 83599
Project: 83599
Buggy source:
@Override public boolean addRawAnnotation(String type){
switch (type) {
case "String_Node_Str":
    this.modifiers|=Modifiers.INLINE;
  return false;
case "String_Node_Str":
this.modifiers|=Modifiers.INFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.PREFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.SEALED;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.NATIVE;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.STRICT;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.DEPRECATED;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.OVERRIDE;
return false;
}
return true;
}

Fixed version (ground truth):
@Override public boolean addRawAnnotation(String type){
switch (type) {
case "String_Node_Str":
    this.modifiers|=Modifiers.INLINE;
  return false;
case "String_Node_Str":
case "String_Node_Str":
this.modifiers|=Modifiers.INFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.PREFIX;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.SEALED;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.NATIVE;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.STRICT;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.DEPRECATED;
return false;
case "String_Node_Str":
this.modifiers|=Modifiers.OVERRIDE;
return false;
}
return true;
}
Program: 83602
Project: 83602
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label conditionLabel=this.conditionLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeLabel(startLabel);
  this.action.writeStatement(writer);
  writer.writeLabel(conditionLabel);
  this.condition.writeJump(writer,startLabel);
  writer.writeLabel(endLabel);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label conditionLabel=this.conditionLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeTargetLabel(startLabel);
  this.action.writeStatement(writer);
  writer.writeLabel(conditionLabel);
  this.condition.writeJump(writer,startLabel);
  writer.writeLabel(endLabel);
}
Program: 83603
Project: 83603
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Statements.doStart);
  if (this.action != null) {
    if (this.action.isStatement()) {
      buffer.append('\n').append(prefix);
      this.action.toString(prefix,buffer);
      buffer.append('\n').append(prefix);
    }
 else {
      buffer.append(' ');
      this.action.toString(prefix,buffer);
      buffer.append(' ');
    }
  }
  buffer.append(Formatting.Statements.doWhile);
  if (this.condition != null) {
    this.condition.toString(prefix,buffer);
  }
  buffer.append(Formatting.Statements.doEnd);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Statements.doStart);
  if (this.action != null) {
    buffer.append(' ');
    this.action.toString(prefix,buffer);
    buffer.append(' ');
  }
  buffer.append(Formatting.Statements.doWhile);
  if (this.condition != null) {
    this.condition.toString(prefix,buffer);
  }
  buffer.append(Formatting.Statements.doEnd);
}
Program: 83604
Project: 83604
Buggy source:
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeLabel(startLabel);
  this.condition.writeInvJump(writer,endLabel);
  this.action.writeStatement(writer);
  writer.writeJumpInsn(Opcodes.GOTO,startLabel);
  writer.writeLabel(endLabel);
}

Fixed version (ground truth):
@Override public void writeStatement(MethodWriter writer) throws BytecodeException {
  if (this.action == null) {
    this.condition.writeStatement(writer);
  }
  org.objectweb.asm.Label startLabel=this.startLabel.target=new org.objectweb.asm.Label();
  org.objectweb.asm.Label endLabel=this.endLabel.target=new org.objectweb.asm.Label();
  writer.writeTargetLabel(startLabel);
  this.condition.writeInvJump(writer,endLabel);
  this.action.writeStatement(writer);
  writer.writeJumpInsn(Opcodes.GOTO,startLabel);
  writer.writeLabel(endLabel);
}
Program: 83605
Project: 83605
Buggy source:
public static void compile(File file,IClassCompilable iclass){
  FileUtils.createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    ClassWriter writer=new ClassWriter();
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Throwable ex) {
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void compile(File file,IClassCompilable iclass){
  FileUtils.createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    ClassWriter writer=new ClassWriter();
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Throwable ex) {
    DyvilCompiler.logger.warning("String_Node_Str" + file + "String_Node_Str"+ ex.getMessage());
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83606
Project: 83606
Buggy source:
public void visitVarInsn(int opcode,int index) throws BytecodeException {
switch (opcode) {
case ILOAD:
    this.push(INT);
  return;
case LLOAD:
this.push(LONG);
return;
case FLOAD:
this.push(FLOAT);
return;
case DLOAD:
this.push(DOUBLE);
return;
case ALOAD:
this.push(this.locals[index]);
return;
case ISTORE:
this.setLocal(index,INT);
this.pop();
return;
case LSTORE:
this.setLocal(index,LONG);
this.pop();
return;
case FSTORE:
this.setLocal(index,FLOAT);
this.pop();
return;
case DSTORE:
this.setLocal(index,DOUBLE);
this.pop();
return;
case ASTORE:
if (index > this.localCount) {
this.setLocal(index,this.stack[this.stackCount - 1]);
}
this.pop();
return;
}
}

Fixed version (ground truth):
public void visitVarInsn(int opcode,int index) throws BytecodeException {
switch (opcode) {
case ILOAD:
    this.push(INT);
  return;
case LLOAD:
this.push(LONG);
return;
case FLOAD:
this.push(FLOAT);
return;
case DLOAD:
this.push(DOUBLE);
return;
case ALOAD:
this.push(this.locals[index]);
return;
case ISTORE:
this.setLocal(index,INT);
this.pop();
return;
case LSTORE:
this.setLocal(index,LONG);
this.pop();
return;
case FSTORE:
this.setLocal(index,FLOAT);
this.pop();
return;
case DSTORE:
this.setLocal(index,DOUBLE);
this.pop();
return;
case ASTORE:
if (index >= this.localCount) {
this.setLocal(index,this.peek());
}
this.pop();
return;
}
}
Program: 83607
Project: 83607
Buggy source:
public static Object fieldType(String desc){
  char c=desc.charAt(0);
switch (c) {
case 'V':
    return null;
case 'B':
  return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case '[':
return desc;
case 'L':
return desc.substring(1,desc.length() - 1);
default :
return null;
}
}

Fixed version (ground truth):
public static Object fieldType(String desc){
  char c=desc.charAt(0);
switch (c) {
case 'V':
    return null;
case 'Z':
  return ClassFormat.BOOLEAN;
case 'B':
return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case '[':
return desc;
case 'L':
return desc.substring(1,desc.length() - 1);
default :
return null;
}
}
Program: 83608
Project: 83608
Buggy source:
public static Object returnType(String desc){
  int index=desc.lastIndexOf(')') + 1;
  char c=desc.charAt(index);
switch (c) {
case 'V':
    return null;
case 'B':
  return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case '[':
return desc.substring(index);
case 'L':
return desc.substring(index + 1,desc.length() - 1);
default :
return null;
}
}

Fixed version (ground truth):
public static Object returnType(String desc){
  int index=desc.lastIndexOf(')') + 1;
  char c=desc.charAt(index);
switch (c) {
case 'V':
    return null;
case 'Z':
  return ClassFormat.BOOLEAN;
case 'B':
return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case '[':
return desc.substring(index);
case 'L':
return desc.substring(index + 1,desc.length() - 1);
default :
return null;
}
}
Program: 83612
Project: 83612
Buggy source:
public static Object fieldType(String desc){
  char c=desc.charAt(0);
switch (c) {
case 'V':
    return null;
case 'B':
  return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case 'L':
return desc.substring(1,desc.length() - 1);
default :
return null;
}
}

Fixed version (ground truth):
public static Object fieldType(String desc){
  char c=desc.charAt(0);
switch (c) {
case 'V':
    return null;
case 'B':
  return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case '[':
return desc;
case 'L':
return desc.substring(1,desc.length() - 1);
default :
return null;
}
}
Program: 83613
Project: 83613
Buggy source:
public static Object returnType(String desc){
  int index=desc.lastIndexOf(')') + 1;
  char c=desc.charAt(index);
switch (c) {
case 'V':
    return null;
case 'B':
  return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case 'L':
return desc.substring(index + 1,desc.length() - 1);
default :
return null;
}
}

Fixed version (ground truth):
public static Object returnType(String desc){
  int index=desc.lastIndexOf(')') + 1;
  char c=desc.charAt(index);
switch (c) {
case 'V':
    return null;
case 'B':
  return ClassFormat.BYTE;
case 'S':
return ClassFormat.SHORT;
case 'C':
return ClassFormat.CHAR;
case 'I':
return ClassFormat.INT;
case 'J':
return ClassFormat.LONG;
case 'F':
return ClassFormat.FLOAT;
case 'D':
return ClassFormat.DOUBLE;
case '[':
return desc.substring(index);
case 'L':
return desc.substring(index + 1,desc.length() - 1);
default :
return null;
}
}
Program: 83616
Project: 83616
Buggy source:
public static void compile(File file,IClassCompilable iclass){
  FileUtils.createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    ClassWriter writer=new ClassWriter();
    iclass.write(writer);
    writer.visitEnd();
    byte[] bytes=writer.toByteArray();
    os.write(bytes,0,bytes.length);
  }
 catch (  Throwable ex) {
    DyvilCompiler.logger.warning("String_Node_Str" + file + "String_Node_Str"+ ex.getMessage());
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}

Fixed version (ground truth):
public static void compile(File file,IClassCompilable iclass){
  byte[] bytes;
  try {
    ClassWriter writer=new ClassWriter();
    iclass.write(writer);
    writer.visitEnd();
    bytes=writer.toByteArray();
  }
 catch (  Throwable ex) {
    DyvilCompiler.logger.warning("String_Node_Str" + file + "String_Node_Str"+ ex);
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
    return;
  }
  FileUtils.createFile(file);
  try (OutputStream os=new BufferedOutputStream(new FileOutputStream(file))){
    os.write(bytes,0,bytes.length);
  }
 catch (  IOException ex) {
    DyvilCompiler.logger.warning("String_Node_Str" + file + "String_Node_Str"+ ex);
    DyvilCompiler.logger.throwing("String_Node_Str","String_Node_Str",ex);
  }
}
Program: 83617
Project: 83617
Buggy source:
public void visitFrame(MethodVisitor mv){
  int locals=this.localCount;
  while (locals > 0 && this.locals[locals - 1] == TOP) {
    locals--;
  }
  int stack=this.stackCount;
  while (stack > 0 && this.stack[stack - 1] == TOP) {
    stack--;
  }
  mv.visitFrame(org.objectweb.asm.Opcodes.F_NEW,locals,this.locals,stack,this.stack);
}

Fixed version (ground truth):
public void visitFrame(MethodVisitor mv){
  Object[] locals=new Object[this.localCount];
  int localIndex=0;
  for (int i=0; i < this.localCount; i++) {
    Object o=this.locals[i];
    locals[localIndex++]=o;
    if (o == LONG || o == DOUBLE) {
      i++;
    }
  }
  int stack=this.stackCount;
  while (stack > 0 && this.stack[stack - 1] == TOP) {
    stack--;
  }
  mv.visitFrame(org.objectweb.asm.Opcodes.F_NEW,localIndex,locals,stack,this.stack);
}
Program: 83618
Project: 83618
Buggy source:
public Object popAndGet() throws StackUnderflowException {
  Object o1=this.stack[--this.stackCount];
  if (o1 == TOP) {
    Object o=this.stack[this.stackCount - 1];
    if (o == LONG || o == DOUBLE) {
      --this.stackCount;
      return o;
    }
  }
  return o1;
}

Fixed version (ground truth):
public Object popAndGet() throws StackUnderflowException {
  Object o=this.stack[--this.stackCount];
  if (o == LONG || o == DOUBLE) {
    this.actualStackCount-=2;
  }
 else {
    this.actualStackCount--;
  }
  return o;
}
Program: 83619
Project: 83619
Buggy source:
public void push(Object type){
  if (type == LONG || type == DOUBLE) {
    this.ensureStack(this.stackCount + 2);
    this.stack[this.stackCount++]=type;
    this.stack[this.stackCount++]=TOP;
    return;
  }
  this.ensureStack(this.stackCount + 1);
  this.stack[this.stackCount++]=type;
}

Fixed version (ground truth):
public void push(Object type){
  if (type == LONG || type == DOUBLE) {
    this.actualStackCount+=2;
  }
 else {
    this.actualStackCount++;
  }
  this.ensureStack(this.stackCount + 1);
  this.stack[this.stackCount++]=type;
}
Program: 83620
Project: 83620
Buggy source:
public Object peek(){
  Object o=this.stack[this.stackCount - 1];
  if (o == TOP) {
    Object o1=this.stack[this.stackCount - 2];
    if (o1 == LONG || o1 == DOUBLE) {
      return o1;
    }
  }
  return o;
}

Fixed version (ground truth):
public Object peek(){
  return this.stack[this.stackCount - 1];
}
Program: 83621
Project: 83621
Buggy source:
public void pop() throws StackUnderflowException {
  if (this.stack[--this.stackCount] == TOP) {
    Object o=this.stack[this.stackCount - 1];
    if (o == LONG || o == DOUBLE) {
      --this.stackCount;
    }
  }
}

Fixed version (ground truth):
public void pop() throws StackUnderflowException {
  Object o=this.stack[--this.stackCount];
  if (o == LONG || o == DOUBLE) {
    this.actualStackCount-=2;
  }
 else {
    this.actualStackCount--;
  }
}
Program: 83622
Project: 83622
Buggy source:
private void ensureStack(int count){
  if (count > this.stack.length) {
    Object[] newLocals=new Object[count];
    System.arraycopy(this.stack,0,newLocals,0,this.stack.length);
    this.stack=newLocals;
  }
  if (count > this.maxStack) {
    this.maxStack=count;
  }
}

Fixed version (ground truth):
private void ensureStack(int count){
  if (count > this.stack.length) {
    Object[] newLocals=new Object[count];
    System.arraycopy(this.stack,0,newLocals,0,this.stack.length);
    this.stack=newLocals;
  }
  if (this.actualStackCount > this.maxStack) {
    this.maxStack=this.actualStackCount;
  }
}
Program: 83623
Project: 83623
Buggy source:
public Frame copy(){
  Frame copy=new Frame(this.stackCount,this.stack,this.localCount,this.locals);
  copy.maxLocals=this.maxLocals;
  copy.maxStack=this.maxStack;
  return copy;
}

Fixed version (ground truth):
public Frame copy(){
  Frame copy=new Frame(this.stackCount,this.stack,this.localCount,this.locals);
  copy.maxLocals=this.maxLocals;
  copy.maxStack=this.maxStack;
  copy.actualStackCount=this.actualStackCount;
  return copy;
}
Program: 83625
Project: 83625
Buggy source:
private boolean writeIINC(MethodWriter writer,IField f) throws BytecodeException {
  if (this.arguments.size() == 1 && f.getType() == Types.INT && f.isVariable()) {
    boolean minus=false;
    if (this.name == Name.plus || (minus=this.name == Name.minus)) {
      IValue value1=this.arguments.getFirstValue();
      if (IValue.isNumeric(value1.valueTag())) {
        int count=((INumericValue)value1).intValue();
        writer.writeIINC(((IVariable)f).getIndex(),minus ? -count : count);
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean writeIINC(MethodWriter writer,IField f) throws BytecodeException {
  if (this.arguments.size() == 1 && f.getType() == Types.INT && f.isVariable()) {
    if (((IVariable)f).isCaptureType()) {
      return false;
    }
    boolean minus=false;
    if (this.name == Name.plus || (minus=this.name == Name.minus)) {
      IValue value1=this.arguments.getFirstValue();
      if (IValue.isNumeric(value1.valueTag())) {
        int count=((INumericValue)value1).intValue();
        writer.writeIINC(((IVariable)f).getIndex(),minus ? -count : count);
        return true;
      }
    }
  }
  return false;
}
Program: 83626
Project: 83626
Buggy source:
public IType getCaptureType(){
  return this.refType != null ? this.refType : this.variable.getType();
}

Fixed version (ground truth):
@Override public IType getCaptureType(boolean init){
  return this.refType != null ? this.refType : this.variable.getCaptureType(init);
}
Program: 83627
Project: 83627
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    this.checkOverride(markers,context);
  }
  super.check(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].check(markers,context);
  }
  for (int i=0; i < this.exceptionCount; i++) {
    IType t=this.exceptions[i];
    if (!Types.THROWABLE.isSuperTypeOf(t)) {
      Marker m=markers.create(t.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + t);
    }
  }
  if (this.value != null) {
    this.value.check(markers,this);
  }
 else   if (this.isStatic()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0 && !this.theClass.isAbstract()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    this.checkOverride(markers,context);
  }
  super.check(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].check(markers,context);
  }
  for (int i=0; i < this.exceptionCount; i++) {
    IType t=this.exceptions[i];
    if (!Types.THROWABLE.isSuperTypeOf(t)) {
      Marker m=markers.create(t.getPosition(),"String_Node_Str");
      m.addInfo("String_Node_Str" + t);
    }
  }
  if (this.value != null) {
    this.value.check(markers,this);
  }
 else   if (this.isStatic()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0 && !this.theClass.isAbstract()) {
    markers.add(this.position,"String_Node_Str",this.name);
  }
  String desc=this.getDescriptor();
  IClassBody body=this.theClass.getBody();
  for (int i=body.methodCount() - 1; i >= 0; i--) {
    IMethod m=body.getMethod(i);
    if (m != this && m.getName() == this.name) {
      if (m.getDescriptor().equals(desc)) {
        markers.add(this.position,"String_Node_Str",this.name,desc);
      }
    }
  }
}
Program: 83628
Project: 83628
Buggy source:
@Override public boolean isType(IType type){
  return type == Types.VOID || type == Types.UNKNOWN;
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  return type == Types.VOID;
}
Program: 83629
Project: 83629
Buggy source:
@Override public IValue withType(IType type){
  return type == Types.VOID || type == Types.UNKNOWN ? this : null;
}

Fixed version (ground truth):
@Override public IValue withType(IType type){
  return type == Types.VOID ? this : null;
}
Program: 83630
Project: 83630
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  this.left.checkTypes(markers,context);
  this.right.checkTypes(markers,context);
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  this.left.checkTypes(markers,context);
  this.right.checkTypes(markers,context);
  IType type1=this.left.getType();
  IType type2=this.right.getType();
  if (!type1.equals(type2)) {
    Marker m=markers.create(this.position,"String_Node_Str");
    m.addInfo("String_Node_Str" + type1);
    m.addInfo("String_Node_Str" + type2);
  }
}
Program: 83631
Project: 83631
Buggy source:
@Override public IField resolveField(Name name){
  if (this.variable != null && this.variable.getName() == name) {
    return this.variable;
  }
switch (this.type) {
case ARRAY:
    if (name == $index) {
      return this.var1;
    }
  if (name == $length) {
    return this.var2;
  }
if (name == $array) {
  return this.var3;
}
break;
case STRING:
if (name == $index) {
return this.var1;
}
if (name == $length) {
return this.var2;
}
if (name == $string) {
return this.var3;
}
break;
case ITERATOR:
if (name == $iterator) {
return this.var1;
}
break;
}
if (this.type == ARRAY) {
}
return this.context.resolveField(name);
}

Fixed version (ground truth):
@Override public IField resolveField(Name name){
  if (this.variable != null && this.variable.getName() == name) {
    return this.variable;
  }
switch (this.type) {
case ARRAY:
    if (name == $index) {
      return this.var1;
    }
  if (name == $length) {
    return this.var2;
  }
if (name == $array) {
  return this.var3;
}
break;
case STRING:
if (name == $index) {
return this.var1;
}
if (name == $length) {
return this.var2;
}
if (name == $string) {
return this.var3;
}
break;
case ITERATOR:
if (name == $iterator) {
return this.var1;
}
break;
}
return this.context.resolveField(name);
}
Program: 83632
Project: 83632
Buggy source:
public static IMethod resolveMethod(IContext context,IValue instance,Name name,IArguments arguments){
  List<MethodMatch> matches=new ArrayList();
  if (instance != null) {
    IType type=instance.getType();
    if (type != null) {
      type.getMethodMatches(matches,instance,name,arguments);
      if (!matches.isEmpty()) {
        return IContext.getBestMethod(matches);
      }
    }
  }
 else   if (arguments.size() == 1) {
    IValue v=arguments.getFirstValue();
    IType type=v.getType();
    if (type != null) {
      type.getMethodMatches(matches,instance,name,EmptyArguments.INSTANCE);
      if (!matches.isEmpty()) {
        return IContext.getBestMethod(matches);
      }
    }
  }
  context.getMethodMatches(matches,instance,name,arguments);
  if (!matches.isEmpty()) {
    return IContext.getBestMethod(matches);
  }
  Types.PREDEF_CLASS.getMethodMatches(matches,instance,name,arguments);
  if (!matches.isEmpty()) {
    return IContext.getBestMethod(matches);
  }
  return null;
}

Fixed version (ground truth):
public static IMethod resolveMethod(IContext context,IValue instance,Name name,IArguments arguments){
  List<MethodMatch> matches=new ArrayList();
  if (instance != null) {
    IType type=instance.getType();
    if (type != null) {
      type.getMethodMatches(matches,instance,name,arguments);
      if (!matches.isEmpty()) {
        return IContext.getBestMethod(matches);
      }
    }
  }
  context.getMethodMatches(matches,instance,name,arguments);
  if (!matches.isEmpty()) {
    return IContext.getBestMethod(matches);
  }
  Types.PREDEF_CLASS.getMethodMatches(matches,instance,name,arguments);
  if (!matches.isEmpty()) {
    return IContext.getBestMethod(matches);
  }
  if (instance == null && arguments.size() == 1) {
    IValue v=arguments.getFirstValue();
    IType type=v.getType();
    if (type != null) {
      type.getMethodMatches(matches,instance,name,EmptyArguments.INSTANCE);
      if (!matches.isEmpty()) {
        return IContext.getBestMethod(matches);
      }
    }
  }
  return null;
}
Program: 83633
Project: 83633
Buggy source:
@Override public IType getType(){
  if (this.valueCount == 0) {
    return Types.VOID;
  }
  if (this.requiredType != null) {
    return this.requiredType;
  }
  int len=this.valueCount;
  if (len == 0) {
    this.elementType=Types.UNKNOWN;
    return this.requiredType=Types.UNKNOWN;
  }
  IType t=this.values[0].getType();
  for (int i=1; i < len; i++) {
    IType t1=this.values[i].getType();
    t=Type.findCommonSuperType(t,t1);
    if (t == null) {
      t=Types.ANY;
      break;
    }
  }
  this.elementType=t;
  if (t.getTheClass() == Types.TUPLE2_CLASS) {
    GenericType type=new GenericType(Types.MAP_CLASS);
    type.genericCount=2;
switch (t.typeTag()) {
case IType.GENERIC_TYPE:
case IType.TUPLE_TYPE:
      ITypeList t1=(ITypeList)t;
    type.generics[0]=t1.getType(0);
  type.generics[1]=t1.getType(1);
break;
default :
type.generics[0]=type.generics[1]=Types.ANY;
}
return this.requiredType=type;
}
return this.requiredType=new ArrayType(t);
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.valueCount == 0) {
    return Types.VOID;
  }
  if (this.requiredType != null) {
    return this.requiredType;
  }
  int len=this.valueCount;
  if (len == 0) {
    this.elementType=Types.UNKNOWN;
    return this.requiredType=Types.UNKNOWN;
  }
  IType t=this.values[0].getType();
  for (int i=1; i < len; i++) {
    IType t1=this.values[i].getType();
    t=Types.findCommonSuperType(t,t1);
    if (t == null) {
      t=Types.ANY;
      break;
    }
  }
  this.elementType=t;
  if (t.getTheClass() == Types.TUPLE2_CLASS) {
    GenericType type=new GenericType(Types.MAP_CLASS);
    type.genericCount=2;
switch (t.typeTag()) {
case IType.GENERIC_TYPE:
case IType.TUPLE_TYPE:
      ITypeList t1=(ITypeList)t;
    type.generics[0]=t1.getType(0);
  type.generics[1]=t1.getType(1);
break;
default :
type.generics[0]=type.generics[1]=Types.ANY;
}
return this.requiredType=type;
}
return this.requiredType=new ArrayType(t);
}
Program: 83634
Project: 83634
Buggy source:
@Override public IType getType(){
  if (this.type != null) {
    return this.type;
  }
  int len=this.caseCount;
  if (len == 0) {
    this.type=Types.VOID;
    return this.type;
  }
  IType t=null;
  for (int i=0; i < len; i++) {
    IValue v=this.cases[i].value;
    if (v == null) {
      continue;
    }
    IType t1=this.cases[i].value.getType();
    if (t == null) {
      t=t1;
      continue;
    }
    t=Type.findCommonSuperType(t,t1);
    if (t == null) {
      return this.type=Types.VOID;
    }
  }
  if (t == null) {
    return this.type=Types.VOID;
  }
  return this.type=t;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.type != null) {
    return this.type;
  }
  int len=this.caseCount;
  if (len == 0) {
    this.type=Types.VOID;
    return this.type;
  }
  IType t=null;
  for (int i=0; i < len; i++) {
    IValue v=this.cases[i].value;
    if (v == null) {
      continue;
    }
    IType t1=this.cases[i].value.getType();
    if (t == null) {
      t=t1;
      continue;
    }
    t=Types.findCommonSuperType(t,t1);
    if (t == null) {
      return this.type=Types.VOID;
    }
  }
  if (t == null) {
    return this.type=Types.VOID;
  }
  return this.type=t;
}
Program: 83637
Project: 83637
Buggy source:
@Override public IType getType(){
  if (this.commonType != null) {
    return this.commonType;
  }
  if (this.then != null) {
    if (this.elseThen != null) {
      return this.commonType=Type.findCommonSuperType(this.then.getType(),this.elseThen.getType());
    }
    return this.commonType=this.then.getType();
  }
  return this.commonType=Types.VOID;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.commonType != null) {
    return this.commonType;
  }
  if (this.then != null) {
    if (this.elseThen != null) {
      return this.commonType=Types.findCommonSuperType(this.then.getType(),this.elseThen.getType());
    }
    return this.commonType=this.then.getType();
  }
  return this.commonType=Types.VOID;
}
Program: 83638
Project: 83638
Buggy source:
@Override public IType getType(){
  if (this.commonType != null) {
    return this.commonType;
  }
  if (this.finallyBlock != null) {
    return this.commonType=this.finallyBlock.getType();
  }
  if (this.action == null) {
    return Types.UNKNOWN;
  }
  IType type=this.action.getType();
  for (int i=0; i < this.catchBlockCount; i++) {
    IType t1=this.catchBlocks[i].action.getType();
    type=Type.findCommonSuperType(type,t1);
    if (type == null) {
      return this.commonType=Types.ANY;
    }
  }
  return this.commonType=type;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.commonType != null) {
    return this.commonType;
  }
  if (this.finallyBlock != null) {
    return this.commonType=this.finallyBlock.getType();
  }
  if (this.action == null) {
    return Types.UNKNOWN;
  }
  IType type=this.action.getType();
  for (int i=0; i < this.catchBlockCount; i++) {
    IType t1=this.catchBlocks[i].action.getType();
    type=Types.findCommonSuperType(type,t1);
    if (type == null) {
      return this.commonType=Types.ANY;
    }
  }
  return this.commonType=type;
}