nus-yam/ex-repair huggingface dataset:
Program: 83639
Project: 83639
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: 83642
Project: 83642
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: 83646
Project: 83646
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: 83649
Project: 83649
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: 83650
Project: 83650
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: 83651
Project: 83651
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: 83652
Project: 83652
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: 83653
Project: 83653
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: 83657
Project: 83657
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: 83659
Project: 83659
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: 83662
Project: 83662
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: 83664
Project: 83664
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: 83665
Project: 83665
Buggy source:
@Override public int columnOf(E element);

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

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

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

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

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

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

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

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

Fixed version (ground truth):
public int rowOf(Object element);
Program: 83674
Project: 83674
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: 83675
Project: 83675
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: 83676
Project: 83676
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: 83677
Project: 83677
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: 83678
Project: 83678
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: 83679
Project: 83679
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: 83680
Project: 83680
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: 83681
Project: 83681
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: 83682
Project: 83682
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);
}
Program: 83683
Project: 83683
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.valueCount; i++) {
    this.values[i].checkTypes(markers,context);
  }
  if (this.tupleType instanceof TupleType) {
    return;
  }
  IMethod m=IContext.resolveMethod(markers,this.getType(),null,Name.apply,this.arguments=new ArgumentList(this.values,this.valueCount));
  if (m == null) {
    StringBuilder builder=new StringBuilder();
    if (this.valueCount > 0) {
      this.values[0].getType().toString("String_Node_Str",builder);
      for (int i=1; i < this.valueCount; i++) {
        builder.append("String_Node_Str");
        this.values[i].getType().toString("String_Node_Str",builder);
      }
    }
    markers.add(this.position,"String_Node_Str",builder.toString(),this.tupleType.toString());
  }
 else {
    this.method=m;
    m.checkArguments(markers,null,this.arguments,null);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.tupleType instanceof TupleType) {
    ITypeList typeList=(ITypeList)this.tupleType;
    for (int i=0; i < this.valueCount; i++) {
      IValue v1=this.values[i].withType(typeList.getType(i));
      if (v1 != null) {
        this.values[i]=v1;
      }
 else {
      }
      this.values[i].checkTypes(markers,context);
    }
    return;
  }
  IMethod m=IContext.resolveMethod(markers,this.getType(),null,Name.apply,this.arguments=new ArgumentList(this.values,this.valueCount));
  if (m == null) {
    StringBuilder builder=new StringBuilder();
    if (this.valueCount > 0) {
      this.values[0].getType().toString("String_Node_Str",builder);
      for (int i=1; i < this.valueCount; i++) {
        builder.append("String_Node_Str");
        this.values[i].getType().toString("String_Node_Str",builder);
      }
    }
    markers.add(this.position,"String_Node_Str",builder.toString(),this.tupleType.toString());
  }
 else {
    this.method=m;
    m.checkArguments(markers,null,this.arguments,null);
  }
}
Program: 83684
Project: 83684
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  TupleType type=new TupleType();
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    v.resolveTypes(markers,context);
    type.addType(v.getType());
  }
  type.getTheClass();
  this.tupleType=type;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  TupleType tupleType=new TupleType();
  for (int i=0; i < this.valueCount; i++) {
    IValue v=this.values[i];
    v.resolveTypes(markers,context);
    IType t=v.getType();
    if (t.isPrimitive()) {
      tupleType.addType(t.getReferenceType());
    }
 else {
      tupleType.addType(t);
    }
  }
  this.tupleType=tupleType;
}
Program: 83685
Project: 83685
Buggy source:
@Override public IClass resolveClass(String name){
  for (  IClass iclass : this.classes) {
    if (name.equals(iclass.getName().qualified)) {
      return iclass;
    }
  }
  return this.loadClass(name);
}

Fixed version (ground truth):
@Override public synchronized IClass resolveClass(String name){
  for (  IClass iclass : this.classes) {
    if (name.equals(iclass.getName().qualified)) {
      return iclass;
    }
  }
  return this.loadClass(name);
}
Program: 83686
Project: 83686
Buggy source:
private IClass loadClass(String name){
synchronized (this) {
    InputStream is=this.library.getInputStream(this.internalName + name + "String_Node_Str");
    if (is != null) {
      ExternalClass bclass=new ExternalClass(Name.getQualified(name));
      this.classes.add(bclass);
      return ClassReader.loadClass(bclass,is,false);
    }
  }
  return null;
}

Fixed version (ground truth):
private IClass loadClass(String name,Library library){
  InputStream is=library.getInputStream(this.internalName + name + "String_Node_Str");
  if (is != null) {
    ExternalClass bclass=new ExternalClass(Name.getQualified(name));
    this.classes.add(bclass);
    return ClassReader.loadClass(bclass,is,false);
  }
  return null;
}
Program: 83687
Project: 83687
Buggy source:
@Override public Package resolvePackage(String name){
  Package pack=super.resolvePackage(name);
  if (pack != null) {
    return pack;
  }
  String name1=this.internalName + name;
  pack=this.library.resolvePackage(name1);
  if (pack != null) {
    this.addSubPackage(pack);
    return pack;
  }
  return null;
}

Fixed version (ground truth):
@Override public Package resolvePackage(String name){
  Package pack=super.resolvePackage(name);
  if (pack != null) {
    return pack;
  }
  String name1=this.internalName + name;
  pack=this.library.resolvePackage(name1);
  if (pack != null) {
    this.addSubPackage(pack);
    return pack;
  }
  for (  Library lib : DyvilCompiler.config.libraries) {
    if (lib == this.library) {
      continue;
    }
    pack=lib.resolvePackage(name1);
    if (pack != null) {
      this.addSubPackage(pack);
    }
  }
  return null;
}
Program: 83688
Project: 83688
Buggy source:
@Override public IClass getTheClass(){
  IClass iclass=tupleClasses[this.typeCount];
  if (iclass != null) {
    return iclass;
  }
  iclass=Package.dyvilTuple.resolveClass("String_Node_Str" + this.typeCount);
  tupleClasses[this.typeCount]=iclass;
  return iclass;
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return getTupleClass(this.typeCount);
}
Program: 83689
Project: 83689
Buggy source:
@Override public IField resolveField(Name name){
  IField field=this.body.getProperty(name);
  if (field != null) {
    return field;
  }
  field=this.body.getField(name);
  if (field != null) {
    return field;
  }
  if (!this.superTypesResolved) {
    this.resolveSuperTypes();
  }
  if (this.superType != null) {
    IField match=this.superType.resolveField(name);
    if (match != null) {
      return match;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IField resolveField(Name name){
  if (!this.genericsResolved) {
    this.resolveGenerics();
  }
  IField field=this.body.getProperty(name);
  if (field != null) {
    return field;
  }
  field=this.body.getField(name);
  if (field != null) {
    return field;
  }
  if (!this.superTypesResolved) {
    this.resolveSuperTypes();
  }
  if (this.superType != null) {
    IField match=this.superType.resolveField(name);
    if (match != null) {
      return match;
    }
  }
  return null;
}
Program: 83690
Project: 83690
Buggy source:
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,Name name,IArguments arguments){
  this.body.getMethodMatches(list,instance,name,arguments);
  if (!list.isEmpty()) {
    return;
  }
  if (!this.superTypesResolved) {
    this.resolveSuperTypes();
  }
  if (this.superType != null) {
    this.superType.getMethodMatches(list,instance,name,arguments);
  }
  if (!list.isEmpty()) {
    return;
  }
  for (int i=0; i < this.interfaceCount; i++) {
    this.interfaces[i].getMethodMatches(list,instance,name,arguments);
  }
}

Fixed version (ground truth):
@Override public void getMethodMatches(List<MethodMatch> list,IValue instance,Name name,IArguments arguments){
  if (!this.genericsResolved) {
    this.resolveGenerics();
  }
  this.body.getMethodMatches(list,instance,name,arguments);
  if (!list.isEmpty()) {
    return;
  }
  if (!this.superTypesResolved) {
    this.resolveSuperTypes();
  }
  if (this.superType != null) {
    this.superType.getMethodMatches(list,instance,name,arguments);
  }
  if (!list.isEmpty()) {
    return;
  }
  for (int i=0; i < this.interfaceCount; i++) {
    this.interfaces[i].getMethodMatches(list,instance,name,arguments);
  }
}
Program: 83691
Project: 83691
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
    this.value.checkTypes(markers,context);
    return;
  }
  if (!this.typeHint && this.type.isSuperTypeOf(this.value.getType())) {
    markers.add(this.position,"String_Node_Str");
    this.typeHint=true;
  }
  IValue value1=this.value.withType(this.type);
  if (value1 != null && value1 != this.value) {
    this.value=value1;
    this.typeHint=true;
  }
  this.value.checkTypes(markers,context);
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if (this.type == Types.VOID) {
    markers.add(this.position,"String_Node_Str");
    this.value.checkTypes(markers,context);
    return;
  }
  if (!this.typeHint && this.type.isSuperTypeOf(this.value.getType())) {
    markers.add(this.position,"String_Node_Str");
    this.typeHint=true;
  }
  if (this.type.isResolved()) {
    IValue value1=this.value.withType(this.type);
    if (value1 != null && value1 != this.value) {
      this.value=value1;
      this.typeHint=true;
    }
    this.value.checkTypes(markers,context);
  }
}
Program: 83692
Project: 83692
Buggy source:
@Override public String toString(){
  if (this.size == 0) {
    return "String_Node_Str";
  }
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append(this.elements[0]);
  for (int i=1; i < this.size; i++) {
    buf.append("String_Node_Str");
    buf.append(this.elements[i]);
  }
  buf.append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  if (this.size == 0) {
    return "String_Node_Str";
  }
  StringBuilder buf=new StringBuilder(this.size * 10).append('[');
  buf.append(this.elements[0]);
  for (int i=1; i < this.size; i++) {
    buf.append("String_Node_Str");
    buf.append(this.elements[i]);
  }
  buf.append(']');
  return buf.toString();
}
Program: 83693
Project: 83693
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + this.element + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return new StringBuilder('[').append(this.element).append(']').toString();
}
Program: 83694
Project: 83694
Buggy source:
@Override public void $plus$plus$eq(Collection<? extends E> collection){
  int len=collection.size();
  this.ensureCapacity(this.size + len);
  Object[] array=collection.toArray();
  System.arraycopy(array,0,this.elements,this.size,len);
}

Fixed version (ground truth):
@Override public void $plus$plus$eq(Collection<? extends E> collection){
  int len=collection.size();
  this.ensureCapacity(this.size + len);
  Object[] array=collection.toArray();
  System.arraycopy(array,0,this.elements,this.size,len);
  this.size+=len;
}
Program: 83695
Project: 83695
Buggy source:
@Override public String toString(){
  if (this.size == 0) {
    return "String_Node_Str";
  }
  StringBuilder buf=new StringBuilder("String_Node_Str");
  buf.append(this.elements[0]);
  for (int i=1; i < this.size; i++) {
    buf.append("String_Node_Str");
    buf.append(this.elements[i]);
  }
  buf.append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  if (this.size == 0) {
    return "String_Node_Str";
  }
  StringBuilder buf=new StringBuilder(this.size * 10).append('[');
  buf.append(this.elements[0]);
  for (int i=1; i < this.size; i++) {
    buf.append("String_Node_Str");
    buf.append(this.elements[i]);
  }
  buf.append(']');
  return buf.toString();
}
Program: 83696
Project: 83696
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  IMethod match=IContext.resolveMethod(markers,this.type,null,Name.apply,this.argument);
  if (match == null) {
    IValue value=this.argument.getFirstValue();
    markers.add(value.getPosition(),"String_Node_Str",value.getType().toString(),this.type.toString());
  }
 else {
    this.method=match;
  }
  match.checkArguments(markers,null,this.argument,null);
  this.argument.checkTypes(markers,context);
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  IMethod match=IContext.resolveMethod(markers,this.type,null,Name.apply,this.argument);
  if (match == null) {
    IValue value=this.argument.getFirstValue();
    markers.add(value.getPosition(),"String_Node_Str",value.getType().toString(),this.type.toString());
  }
 else {
    this.method=match;
    match.checkArguments(markers,null,this.argument,null);
  }
  this.argument.checkTypes(markers,context);
}
Program: 83697
Project: 83697
Buggy source:
@Override public void writeExpression(MethodWriter writer){
  this.value.writeExpression(writer);
  if (this.type.isPrimitive()) {
    writePrimitiveCast(this.value.getType(),(PrimitiveType)this.type,writer);
  }
 else {
    writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
  }
}

Fixed version (ground truth):
@Override public void writeExpression(MethodWriter writer){
  this.value.writeExpression(writer);
  if (this.typeHint) {
    return;
  }
  if (this.type.isPrimitive()) {
    writePrimitiveCast(this.value.getType(),(PrimitiveType)this.type,writer);
  }
 else {
    writer.writeTypeInsn(Opcodes.CHECKCAST,this.type.getInternalName());
  }
}
Program: 83698
Project: 83698
Buggy source:
@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);
}

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");
    this.typeHint=true;
  }
  IValue value1=this.value.withType(this.type);
  if (value1 != null && value1 != this.value) {
    this.value=value1;
    this.typeHint=true;
  }
  this.value.checkTypes(markers,context);
}
Program: 83699
Project: 83699
Buggy source:
@Override public void reset(){
  this.mode=NAME;
  this.boundMode=0;
  this.type=null;
  this.arrayDimensions=0;
  this.arrayDimensions2=0;
}

Fixed version (ground truth):
@Override public void reset(){
  this.mode=NAME;
  this.boundMode=0;
  this.type=null;
}
Program: 83700
Project: 83700
Buggy source:
public void end(){
  if (this.type != null && this.arrayDimensions > 0) {
    this.type=ArrayType.getArrayType(this.type,this.arrayDimensions);
  }
  this.typed.setType(this.type);
}

Fixed version (ground truth):
public void end(){
  this.typed.setType(this.type);
}
Program: 83702
Project: 83702
Buggy source:
@Override public int getTypeMatch(IType type){
  if (!type.isArrayType()) {
    return type.getTheClass().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 total / this.valueCount;
}
Program: 83703
Project: 83703
Buggy source:
@Override public IValue withType(IType type){
  if (!type.isArrayType()) {
    if (type.getTheClass().getAnnotation(ARRAY_CONVERTIBLE) != null) {
      return new LiteralExpression(type,this);
    }
    return null;
  }
  IType type1=type.getElementType();
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(type1)) {
      return null;
    }
  }
  this.elementType=type1;
  this.requiredType=type;
  return this;
}

Fixed version (ground truth):
@Override public IValue withType(IType type){
  if (!type.isArrayType()) {
    IClass iclass=type.getTheClass();
    if (iclass == Types.OBJECT_CLASS) {
      return this;
    }
    if (iclass.getAnnotation(ARRAY_CONVERTIBLE) != null) {
      return new LiteralExpression(type,this);
    }
    return null;
  }
  IType type1=type.getElementType();
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(type1)) {
      return null;
    }
  }
  this.elementType=type1;
  this.requiredType=type;
  return this;
}
Program: 83704
Project: 83704
Buggy source:
@Override public boolean isType(IType type){
  if (!type.isArrayType()) {
    return type.getTheClass().getAnnotation(ARRAY_CONVERTIBLE) != null;
  }
  if (this.valueCount == 0) {
    return true;
  }
  IType type1=type.getElementType();
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(type1)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean isType(IType type){
  if (!type.isArrayType()) {
    IClass iclass=type.getTheClass();
    return iclass == Types.OBJECT_CLASS || iclass.getAnnotation(ARRAY_CONVERTIBLE) != null;
  }
  if (this.valueCount == 0) {
    return true;
  }
  IType type1=type.getElementType();
  for (int i=0; i < this.valueCount; i++) {
    if (!this.values[i].isType(type1)) {
      return false;
    }
  }
  return true;
}
Program: 83705
Project: 83705
Buggy source:
@Override public boolean isSuperTypeOf(IType type){
  int arrayDims=type.getArrayDimensions();
  if (arrayDims == 0) {
    return false;
  }
  int thisDims=this.getArrayDimensions();
  if (arrayDims > thisDims) {
    return this.type.getTheClass() == Types.OBJECT_CLASS;
  }
  return this.type.isSuperTypeOf(type);
}

Fixed version (ground truth):
@Override public boolean isSuperTypeOf(IType type){
  int arrayDims=type.getArrayDimensions();
  if (arrayDims == 0) {
    return false;
  }
  int thisDims=this.getArrayDimensions();
  if (arrayDims > thisDims) {
    return this.type.getTheClass() == Types.OBJECT_CLASS;
  }
  return this.type.isSuperTypeOf(type.getElementType());
}
Program: 83706
Project: 83706
Buggy source:
@Override public void addStaticImport(HeaderComponent component){
  int index=this.staticImportCount++;
  if (index >= this.staticImports.length) {
    HeaderComponent[] temp=new HeaderComponent[index];
    System.arraycopy(this.staticImports,0,temp,0,this.staticImports.length);
    this.staticImports=temp;
  }
  this.staticImports[index]=component;
}

Fixed version (ground truth):
@Override public void addStaticImport(HeaderComponent component){
  int index=this.staticImportCount++;
  if (index >= this.staticImports.length) {
    HeaderComponent[] temp=new HeaderComponent[index + 1];
    System.arraycopy(this.staticImports,0,temp,0,this.staticImports.length);
    this.staticImports=temp;
  }
  this.staticImports[index]=component;
}
Program: 83707
Project: 83707
Buggy source:
@Override public void addImport(HeaderComponent component){
  int index=this.importCount++;
  if (index >= this.imports.length) {
    HeaderComponent[] temp=new HeaderComponent[index];
    System.arraycopy(this.imports,0,temp,0,this.imports.length);
    this.imports=temp;
  }
  this.imports[index]=component;
}

Fixed version (ground truth):
@Override public void addImport(HeaderComponent component){
  int index=this.importCount++;
  if (index >= this.imports.length) {
    HeaderComponent[] temp=new HeaderComponent[index + 1];
    System.arraycopy(this.imports,0,temp,0,this.imports.length);
    this.imports=temp;
  }
  this.imports[index]=component;
}