nus-yam/ex-repair huggingface dataset:
Program: 84911
Project: 84911
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: 84912
Project: 84912
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: 84915
Project: 84915
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: 84916
Project: 84916
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: 84917
Project: 84917
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: 84918
Project: 84918
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: 84919
Project: 84919
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: 84920
Project: 84920
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: 84921
Project: 84921
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: 84922
Project: 84922
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: 84924
Project: 84924
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: 84925
Project: 84925
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: 84926
Project: 84926
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: 84927
Project: 84927
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: 84928
Project: 84928
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: 84929
Project: 84929
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: 84930
Project: 84930
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: 84931
Project: 84931
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: 84932
Project: 84932
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: 84933
Project: 84933
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: 84936
Project: 84936
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: 84937
Project: 84937
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;
}
Program: 84938
Project: 84938
Buggy source:
@Override public IType getType(){
  if (this.type == null) {
    if (this.elementType == null) {
      this.elementType=Types.findCommonSuperType(this.value1.getType(),this.value2.getType());
    }
    GenericType gt=new GenericType(RANGE_CLASS);
    if (this.elementType.isPrimitive()) {
      this.elementType=this.elementType.getReferenceType();
      this.value1=this.value1.withType(this.elementType);
      this.value2=this.value2.withType(this.elementType);
    }
    gt.addType(this.elementType);
    this.type=gt;
  }
  return this.type;
}

Fixed version (ground truth):
@Override public IType getType(){
  if (this.type == null) {
    if (this.elementType == Types.UNKNOWN) {
      this.elementType=Types.findCommonSuperType(this.value1.getType(),this.value2.getType());
    }
    GenericType gt=new GenericType(RANGE_CLASS);
    if (this.elementType.isPrimitive()) {
      this.elementType=this.elementType.getReferenceType();
      this.value1=this.value1.withType(this.elementType);
      this.value2=this.value2.withType(this.elementType);
    }
    gt.addType(this.elementType);
    this.type=gt;
  }
  return this.type;
}
Program: 84941
Project: 84941
Buggy source:
@Override public IField resolveField(Name name){
  if (this.variable != null && this.variable.name == name) {
    return this.variable;
  }
  return this.context.resolveField(name);
}

Fixed version (ground truth):
@Override public IField resolveField(Name name){
  if (this.variable.name == name) {
    return this.variable;
  }
  return this.context.resolveField(name);
}
Program: 84945
Project: 84945
Buggy source:
public static void writeEquals(MethodWriter writer,IField field){
  IType type=field.getType();
  if (type.isPrimitive()) {
    writer.writeVarInsn(ALOAD,0);
    field.writeGet(writer,null);
    writer.writeVarInsn(ALOAD,2);
    field.writeGet(writer,null);
    Label label=new Label();
switch (((PrimitiveType)type).typecode) {
case ClassFormat.T_BOOLEAN:
case ClassFormat.T_BYTE:
case ClassFormat.T_SHORT:
case ClassFormat.T_CHAR:
case ClassFormat.T_INT:
      writer.writeJumpInsn(IF_ICMPEQ,label);
    break;
case ClassFormat.T_LONG:
  writer.writeJumpInsn(IF_LCMPEQ,label);
break;
case ClassFormat.T_FLOAT:
writer.writeJumpInsn(IF_FCMPEQ,label);
break;
case ClassFormat.T_DOUBLE:
writer.writeJumpInsn(IF_FCMPEQ,label);
break;
}
writer.writeLDC(0);
writer.writeInsn(IRETURN);
writer.writeLabel(label);
return;
}
Label elseLabel=new Label();
Label endLabel=new Label();
writer.writeVarInsn(ALOAD,0);
field.writeGet(writer,null);
writer.writeJumpInsn(IFNONNULL,elseLabel);
writer.writeVarInsn(ALOAD,2);
field.writeGet(writer,null);
writer.writeJumpInsn(IFNULL,endLabel);
writer.writeLDC(0);
writer.writeInsn(IRETURN);
writer.writeLabel(elseLabel);
writer.writeVarInsn(ALOAD,0);
field.writeGet(writer,null);
writer.writeVarInsn(ALOAD,2);
field.writeGet(writer,null);
writer.writeInvokeInsn(INVOKEVIRTUAL,"String_Node_Str","String_Node_Str","String_Node_Str",false);
writer.writeJumpInsn(IFNE,endLabel);
writer.writeLDC(0);
writer.writeInsn(IRETURN);
writer.writeLabel(endLabel);
}

Fixed version (ground truth):
public static void writeEquals(MethodWriter writer,IField field){
  IType type=field.getType();
  if (type.isPrimitive()) {
    writer.writeVarInsn(ALOAD,0);
    field.writeGet(writer,null);
    writer.writeVarInsn(ALOAD,2);
    field.writeGet(writer,null);
    Label label=new Label();
switch (((PrimitiveType)type).typecode) {
case ClassFormat.T_BOOLEAN:
case ClassFormat.T_BYTE:
case ClassFormat.T_SHORT:
case ClassFormat.T_CHAR:
case ClassFormat.T_INT:
      writer.writeJumpInsn(IF_ICMPEQ,label);
    break;
case ClassFormat.T_LONG:
  writer.writeJumpInsn(IF_LCMPEQ,label);
break;
case ClassFormat.T_FLOAT:
writer.writeJumpInsn(IF_FCMPEQ,label);
break;
case ClassFormat.T_DOUBLE:
writer.writeJumpInsn(IF_FCMPEQ,label);
break;
}
writer.writeLDC(0);
writer.writeInsn(IRETURN);
writer.writeLabel(label);
return;
}
Label elseLabel=new Label();
Label endLabel=new Label();
writer.writeVarInsn(ALOAD,0);
field.writeGet(writer,null);
writer.writeJumpInsn(IFNONNULL,elseLabel);
writer.writeVarInsn(ALOAD,2);
field.writeGet(writer,null);
writer.writeJumpInsn(IFNULL,endLabel);
writer.writeLDC(0);
writer.writeInsn(IRETURN);
writer.writeLabel(elseLabel);
writer.writeVarInsn(ALOAD,0);
field.writeGet(writer,null);
writer.writeVarInsn(ALOAD,2);
field.writeGet(writer,null);
if (type.isArrayType()) {
writeArrayEquals(writer,type.getElementType());
}
 else {
writer.writeInvokeInsn(INVOKEVIRTUAL,"String_Node_Str","String_Node_Str","String_Node_Str",false);
}
writer.writeJumpInsn(IFNE,endLabel);
writer.writeLDC(0);
writer.writeInsn(IRETURN);
writer.writeLabel(endLabel);
}
Program: 84948
Project: 84948
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.superType != null) {
    IType type=this.superType.resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i].resolveType(typeVar);
    if (type != null) {
      return type.getConcreteType(concrete);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar,IType concrete){
  if (this.superType != null) {
    IType type=this.superType.resolveType(typeVar);
    if (type != Types.ANY) {
      return type.getConcreteType(concrete);
    }
  }
  for (int i=0; i < this.interfaceCount; i++) {
    IType type=this.interfaces[i].resolveType(typeVar);
    if (type != Types.ANY) {
      return type.getConcreteType(concrete);
    }
  }
  return Types.ANY;
}
Program: 84949
Project: 84949
Buggy source:
public void addCommonType(IType type1,IType type2,IType common){
  StringBuilder buf=new StringBuilder();
  buf.append(type1.getInternalName()).append(type2.getInternalName());
  this.commonTypes.put(buf.toString(),common.getInternalName());
}

Fixed version (ground truth):
public void addCommonType(IType type1,IType type2,IType common){
  this.commonTypes.put(type1.getInternalName().concat(type2.getInternalName()),common.getInternalName());
}
Program: 84950
Project: 84950
Buggy source:
@Override protected String getCommonSuperClass(String type1,String type2){
  StringBuilder buf=new StringBuilder();
  buf.append(type1).append(type2);
  return this.commonTypes.get(buf.toString());
}

Fixed version (ground truth):
@Override protected String getCommonSuperClass(String type1,String type2){
  String common=this.commonTypes.get(type1.concat(type2));
  return common == null ? "String_Node_Str" : common;
}
Program: 84951
Project: 84951
Buggy source:
@Override public int getTypeMatch(IType type){
  if (!type.isArrayType()) {
    IClass iclass=type.getTheClass();
    return iclass == Types.OBJECT_CLASS || iclass.getAnnotation(ARRAY_CONVERTIBLE) != null ? 2 : 0;
  }
  if (this.valueCount == 0) {
    return 3;
  }
  IType type1=type.getElementType();
  int total=0;
  for (int i=0; i < this.valueCount; i++) {
    int m=this.values[i].getTypeMatch(type1);
    if (m == 0) {
      return 0;
    }
    total+=m;
  }
  return total / this.valueCount;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (!type.isArrayType()) {
    IClass iclass=type.getTheClass();
    return iclass == Types.OBJECT_CLASS || iclass.getAnnotation(ARRAY_CONVERTIBLE) != null ? 2 : 0;
  }
  if (this.valueCount == 0) {
    return 3;
  }
  IType type1=type.getElementType();
  int total=0;
  for (int i=0; i < this.valueCount; i++) {
    int m=this.values[i].getTypeMatch(type1);
    if (m == 0) {
      return 0;
    }
    total+=m;
  }
  return 1 + total / this.valueCount;
}
Program: 84952
Project: 84952
Buggy source:
@Override public void appendSignature(StringBuilder buffer){
  if (this.lowerBound != null) {
    buffer.append('-');
    this.lowerBound.appendSignature(buffer);
  }
 else {
    buffer.append('+');
    this.upperBounds[0].appendSignature(buffer);
  }
}

Fixed version (ground truth):
@Override public void appendSignature(StringBuilder buffer){
  if (this.lowerBound != null) {
    buffer.append('-');
    this.lowerBound.appendSignature(buffer);
  }
 else   if (this.upperBoundCount > 0) {
    buffer.append('+');
    this.upperBounds[0].appendSignature(buffer);
  }
 else {
    buffer.append("String_Node_Str");
  }
}
Program: 84956
Project: 84956
Buggy source:
/** 
 * Returns an empty collection. This method is primarily for use with the  {@code nil} literal in <i>Dyvil</i>.
 * @see List#apply()
 * @return an empty collection
 */
public static <E>Collection<E> apply(){
  return List.apply();
}

Fixed version (ground truth):
public static <E>Collection<E> apply(E... elements){
  return List.apply(elements);
}
Program: 84958
Project: 84958
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    this.packageDeclaration.setPackage(this.buffer.toString());
    pm.popParser();
    return;
  }
  if (type == Symbols.DOT) {
    this.buffer.append('.');
    return;
  }
  if (ParserUtil.isIdentifier(type)) {
    this.buffer.append(token.nameValue().qualified);
    return;
  }
  throw new SyntaxError(token,"String_Node_Str" + token);
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (type == Symbols.SEMICOLON) {
    this.packageDeclaration.setPackage(this.buffer.toString());
    pm.popParser();
    return;
  }
  if (type == Keywords.TYPE) {
    this.buffer.append("String_Node_Str");
    return;
  }
  if (type == Keywords.ANNOTATION) {
    this.buffer.append("String_Node_Str");
    return;
  }
  if (type == Symbols.DOT) {
    this.buffer.append('.');
    return;
  }
  if (ParserUtil.isIdentifier(type)) {
    this.buffer.append(token.nameValue().qualified);
    return;
  }
  throw new SyntaxError(token,"String_Node_Str" + token);
}
Program: 84961
Project: 84961
Buggy source:
@Override public void apply(Collection<ICompilationUnit> units){
  for (  ICompilationUnit unit : units) {
    this.apply.accept(unit);
  }
}

Fixed version (ground truth):
@Override public void apply(Collection<ICompilationUnit> units){
  for (  ICompilationUnit unit : units) {
    try {
      this.apply.accept(unit);
    }
 catch (    Throwable t) {
      DyvilCompiler.logger.warning(this.name + "String_Node_Str" + unit.getInputFile()+ "String_Node_Str");
      DyvilCompiler.logger.throwing(this.name,"String_Node_Str",t);
    }
  }
}
Program: 84963
Project: 84963
Buggy source:
@Override public String getSignature(){
  if (this.genericCount == 0 && !this.theClass.isGeneric()) {
    return null;
  }
  StringBuilder buffer=new StringBuilder();
  if (this.genericCount > 0) {
    buffer.append('<');
    for (int i=0; i < this.genericCount; i++) {
      this.generics[i].appendSignature(buffer);
    }
    buffer.append('>');
  }
  buffer.append('(');
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].getType().appendSignature(buffer);
  }
  buffer.append(')');
  this.type.appendExtendedName(buffer);
  return buffer.toString();
}

Fixed version (ground truth):
@Override public String getSignature(){
  if (this.genericCount == 0 && !this.theClass.isGeneric()) {
    return null;
  }
  StringBuilder buffer=new StringBuilder();
  if (this.genericCount > 0) {
    buffer.append('<');
    for (int i=0; i < this.genericCount; i++) {
      this.generics[i].appendSignature(buffer);
    }
    buffer.append('>');
  }
  buffer.append('(');
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].getType().appendSignature(buffer);
  }
  buffer.append(')');
  this.type.appendSignature(buffer);
  return buffer.toString();
}
Program: 84964
Project: 84964
Buggy source:
@Override public int columnOf(E element);

Fixed version (ground truth):
@Override public int columnOf(Object element);
Program: 84965
Project: 84965
Buggy source:
@Override public Tuple2<Int,Int> cellOf(E element);

Fixed version (ground truth):
@Override public Tuple2<Int,Int> cellOf(Object element);
Program: 84966
Project: 84966
Buggy source:
@Override public int rowOf(E element);

Fixed version (ground truth):
@Override public int rowOf(Object element);
Program: 84967
Project: 84967
Buggy source:
@Override public int columnOf(E element);

Fixed version (ground truth):
@Override public int columnOf(Object element);
Program: 84968
Project: 84968
Buggy source:
@Override public Tuple2<Int,Int> cellOf(E element);

Fixed version (ground truth):
@Override public Tuple2<Int,Int> cellOf(Object element);
Program: 84969
Project: 84969
Buggy source:
@Override public int rowOf(E element);

Fixed version (ground truth):
@Override public int rowOf(Object element);
Program: 84970
Project: 84970
Buggy source:
public int columnOf(E element);

Fixed version (ground truth):
public int columnOf(Object element);
Program: 84971
Project: 84971
Buggy source:
public Tuple2<Int,Int> cellOf(E element);

Fixed version (ground truth):
public Tuple2<Int,Int> cellOf(Object element);
Program: 84972
Project: 84972
Buggy source:
public int rowOf(E element);

Fixed version (ground truth):
public int rowOf(Object element);
Program: 84973
Project: 84973
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Class.bodyStart).append('\n');
  String prefix1=prefix + Formatting.Class.bodyIndent;
  if (this.classCount > 0) {
    for (int i=0; i < this.classCount; i++) {
      IClass c=this.classes[i];
      if (c != this.theClass) {
        c.toString(prefix1,buffer);
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.fieldCount > 0) {
    for (int i=0; i < this.fieldCount; i++) {
      this.fields[i].toString(prefix1,buffer);
      buffer.append('\n');
    }
    buffer.append('\n');
  }
  if (this.constructorCount > 0) {
    for (int i=0; i < this.constructorCount; i++) {
      this.constructors[i].toString(prefix1,buffer);
      if (i + 1 < this.constructorCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.propertyCount > 0) {
    for (int i=0; i < this.propertyCount; i++) {
      this.properties[i].toString(prefix1,buffer);
      if (i + 1 < this.propertyCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.methodCount > 0) {
    for (int i=0; i < this.methodCount; i++) {
      IMethod method=this.methods[i];
      method.toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.methodCount) {
        buffer.append('\n');
      }
    }
  }
  buffer.append(prefix).append(Formatting.Class.bodyEnd);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  buffer.append(Formatting.Class.bodyStart).append('\n');
  String prefix1=prefix + Formatting.Class.bodyIndent;
  if (this.classCount > 0) {
    for (int i=0; i < this.classCount; i++) {
      this.classes[i].toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.classCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.fieldCount > 0) {
    for (int i=0; i < this.fieldCount; i++) {
      this.fields[i].toString(prefix1,buffer);
      buffer.append('\n');
    }
    buffer.append('\n');
  }
  if (this.constructorCount > 0) {
    for (int i=0; i < this.constructorCount; i++) {
      this.constructors[i].toString(prefix1,buffer);
      if (i + 1 < this.constructorCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.propertyCount > 0) {
    for (int i=0; i < this.propertyCount; i++) {
      this.properties[i].toString(prefix1,buffer);
      if (i + 1 < this.propertyCount) {
        buffer.append('\n');
      }
    }
    buffer.append('\n');
  }
  if (this.methodCount > 0) {
    for (int i=0; i < this.methodCount; i++) {
      IMethod method=this.methods[i];
      method.toString(prefix1,buffer);
      buffer.append('\n');
      if (i + 1 < this.methodCount) {
        buffer.append('\n');
      }
    }
  }
  buffer.append(prefix).append(Formatting.Class.bodyEnd);
}
Program: 84974
Project: 84974
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  for (int i=0; i < this.annotationCount; i++) {
    Annotation a=this.annotations[i];
    String fullName=a.type.getInternalName();
    if (fullName != null && this.addRawAnnotation(fullName)) {
      this.removeAnnotation(i--);
      continue;
    }
    a.resolve(markers,context);
  }
  this.metadata.resolve(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].resolve(markers,this);
  }
  if (this.body != null) {
    this.body.resolve(markers,this);
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  for (int i=0; i < this.annotationCount; i++) {
    Annotation a=this.annotations[i];
    String fullName=a.type.getInternalName();
    if (fullName != null && !this.addRawAnnotation(fullName)) {
      this.removeAnnotation(i--);
      continue;
    }
    a.resolve(markers,context);
  }
  this.metadata.resolve(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].resolve(markers,this);
  }
  if (this.body != null) {
    this.body.resolve(markers,this);
  }
}
Program: 84975
Project: 84975
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  for (int i=0; i < this.annotationCount; i++) {
    buffer.append(prefix);
    this.annotations[i].toString(prefix,buffer);
    buffer.append('\n');
  }
  buffer.append(prefix).append(ModifierTypes.CLASS.toString(this.modifiers));
  buffer.append(ModifierTypes.CLASS_TYPE.toString(this.modifiers)).append(this.name);
  if (this.genericCount > 0) {
    buffer.append('[');
    Util.astToString(prefix,this.generics,this.genericCount,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  if (this.parameterCount > 0) {
    buffer.append('(');
    Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(')');
  }
  if (this.superType == null) {
    buffer.append("String_Node_Str");
  }
 else   if (this.superType != Types.OBJECT) {
    buffer.append("String_Node_Str");
    this.superType.toString("String_Node_Str",buffer);
  }
  if (this.interfaceCount > 0) {
    buffer.append("String_Node_Str");
    Util.astToString(prefix,this.interfaces,this.interfaceCount,Formatting.Class.superClassesSeperator,buffer);
  }
  if (this.body != null) {
    buffer.append('\n');
    this.body.toString(prefix,buffer);
  }
 else {
    buffer.append(';');
  }
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  for (int i=0; i < this.annotationCount; i++) {
    buffer.append(prefix);
    this.annotations[i].toString(prefix,buffer);
    buffer.append('\n');
  }
  buffer.append(prefix).append(ModifierTypes.CLASS.toString(this.modifiers));
  buffer.append(ModifierTypes.CLASS_TYPE.toString(this.modifiers)).append(this.name);
  if (this.genericCount > 0) {
    buffer.append('[');
    Util.astToString(prefix,this.generics,this.genericCount,Formatting.Type.genericSeperator,buffer);
    buffer.append(']');
  }
  if (this.parameterCount > 0) {
    buffer.append('(');
    Util.astToString(prefix,this.parameters,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(')');
  }
  if (this.superType == null) {
    buffer.append("String_Node_Str");
  }
 else   if (this.superType != Types.OBJECT) {
    buffer.append("String_Node_Str");
    this.superType.toString("String_Node_Str",buffer);
  }
  if (this.interfaceCount > 0) {
    buffer.append("String_Node_Str");
    Util.astToString(prefix,this.interfaces,this.interfaceCount,Formatting.Class.superClassesSeperator,buffer);
  }
  if (this.body != null) {
    buffer.append('\n').append(prefix);
    this.body.toString(prefix,buffer);
  }
 else {
    buffer.append(';');
  }
}
Program: 84976
Project: 84976
Buggy source:
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
 else   if (type.isSuperTypeOf(this.type)) {
    return 2;
  }
  return 0;
}

Fixed version (ground truth):
@Override public int getTypeMatch(IType type){
  if (this.type.equals(type)) {
    return 3;
  }
  if (type.isSuperTypeOf(this.type)) {
    return 2;
  }
  return 0;
}
Program: 84977
Project: 84977
Buggy source:
@Override public void check(MarkerList markers,IContext context){
  this.value.check(markers,context);
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
  }
  boolean primitiveType=this.type.isPrimitive();
  boolean primitiveValue=this.value.isPrimitive();
  if (primitiveType) {
    if (!primitiveValue) {
      markers.add(this.position,"String_Node_Str");
    }
  }
 else   if (primitiveValue) {
    markers.add(this.position,"String_Node_Str");
  }
 else   if (this.value.isType(this.type)) {
    markers.add(this.position,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void check(MarkerList markers,IContext context){
  this.value.check(markers,context);
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
  }
  boolean primitiveType=this.type.isPrimitive();
  boolean primitiveValue=this.value.isPrimitive();
  if (primitiveType) {
    if (!primitiveValue) {
      markers.add(this.position,"String_Node_Str");
    }
  }
 else   if (primitiveValue) {
    markers.add(this.position,"String_Node_Str");
  }
}
Program: 84978
Project: 84978
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  IValue value1=this.value.withType(this.type);
  if (value1 != null) {
    this.value=value1;
  }
  this.value.checkTypes(markers,context);
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.type.isSuperTypeOf(this.value.getType())) {
    markers.add(this.position,"String_Node_Str");
  }
  IValue value1=this.value.withType(this.type);
  if (value1 != null && value1 != this.value) {
    this.value=value1;
  }
  this.value.checkTypes(markers,context);
}
Program: 84979
Project: 84979
Buggy source:
public static void writeToString(MethodWriter writer,IType type){
  int dims=type.getArrayDimensions();
switch (dims) {
case 0:
    StringBuilder desc=new StringBuilder().append('(');
  if (type.isPrimitive()) {
    type.appendExtendedName(desc);
  }
 else   if (type.classEquals(Types.STRING)) {
    desc.append("String_Node_Str");
  }
 else {
    desc.append("String_Node_Str");
  }
desc.append("String_Node_Str");
writer.writeInvokeInsn(INVOKEVIRTUAL,"String_Node_Str","String_Node_Str",desc.toString(),false);
return;
case 1:
writer.writeInsn(Opcodes.SWAP);
writer.writeInsn(Opcodes.DUP_X1);
writeArrayToString(writer,type);
return;
default :
writer.writeInsn(Opcodes.SWAP);
writer.writeInsn(Opcodes.DUP_X1);
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
}
}

Fixed version (ground truth):
public static void writeToString(MethodWriter writer,IType type){
  if (type.isArrayType()) {
    writer.writeInsn(Opcodes.SWAP);
    writer.writeInsn(Opcodes.DUP_X1);
    writeArrayToString(writer,type.getElementType());
    return;
  }
  StringBuilder desc=new StringBuilder().append('(');
  if (type.isPrimitive()) {
    type.appendExtendedName(desc);
  }
 else   if (type.classEquals(Types.STRING)) {
    desc.append("String_Node_Str");
  }
 else {
    desc.append("String_Node_Str");
  }
  desc.append("String_Node_Str");
  writer.writeInvokeInsn(INVOKEVIRTUAL,"String_Node_Str","String_Node_Str",desc.toString(),false);
  return;
}
Program: 84980
Project: 84980
Buggy source:
public static void writeArrayToString(MethodWriter writer,IType type){
  if (type.typeTag() == IType.PRIMITIVE_TYPE) {
switch (((PrimitiveType)type).typecode) {
case ClassFormat.T_BOOLEAN:
      writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
    return;
case ClassFormat.T_BYTE:
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_SHORT:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_CHAR:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_INT:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_LONG:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_FLOAT:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_DOUBLE:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
}
}
 else {
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
}
}

Fixed version (ground truth):
public static void writeArrayToString(MethodWriter writer,IType type){
switch (type.typeTag()) {
case IType.PRIMITIVE_TYPE:
switch (((PrimitiveType)type).typecode) {
case ClassFormat.T_BOOLEAN:
      writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
    return;
case ClassFormat.T_BYTE:
  writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_SHORT:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_CHAR:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_INT:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_LONG:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_FLOAT:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
case ClassFormat.T_DOUBLE:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
default :
return;
}
case IType.ARRAY_TYPE:
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
default :
writer.writeInvokeInsn(Opcodes.INVOKESTATIC,"String_Node_Str","String_Node_Str","String_Node_Str",true);
return;
}
}
Program: 84981
Project: 84981
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  if (this.method != null) {
    this.method.writeCall(writer,null,this.arguments,this.tupleType);
    return;
  }
  TupleType tt=(TupleType)this.tupleType;
  writer.writeTypeInsn(Opcodes.NEW,this.tupleType.getInternalName());
  writer.writeInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].writeExpression(writer);
  }
  String owner=tt.getInternalName();
  String desc=tt.getConstructorDescriptor();
  writer.writeInvokeInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false);
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  if (this.method != null) {
    this.method.writeCall(writer,null,this.arguments,this.tupleType);
    return;
  }
  String internal=this.tupleType.getInternalName();
  writer.writeTypeInsn(Opcodes.NEW,internal);
  writer.writeInsn(Opcodes.DUP);
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].writeExpression(writer);
  }
  String owner=internal;
  String desc=TupleType.getConstructorDescriptor(this.valueCount);
  writer.writeInvokeInsn(Opcodes.INVOKESPECIAL,owner,"String_Node_Str",desc,false);
}