nus-yam/ex-repair huggingface dataset:
Program: 84562
Project: 84562
Buggy source:
@Override public IDataMember resolveField(Name name){
  if (!this.genericsResolved) {
    this.resolveGenerics();
  }
  IDataMember 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) {
    IDataMember match=this.superType.resolveField(name);
    if (match != null) {
      return match;
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IDataMember resolveField(Name name){
  if (!this.genericsResolved) {
    this.resolveGenerics();
  }
  if (!this.parametersResolved) {
    this.resolveParameters();
  }
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    if (param.getName() == name) {
      return param;
    }
  }
  IDataMember 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) {
    IDataMember match=this.superType.resolveField(name);
    if (match != null) {
      return match;
    }
  }
  return null;
}
Program: 84563
Project: 84563
Buggy source:
public ExternalField(IClass iclass){
  super(iclass);
}

Fixed version (ground truth):
public ExternalField(IClass iclass,int access,Name name,IType type){
  super(iclass,name,type);
  this.modifiers=access;
}
Program: 84564
Project: 84564
Buggy source:
@Override public void addImport(IImport iimport){
  int index=this.importCount++;
  if (index >= this.imports.length) {
    IImport[] temp=new IImport[index];
    System.arraycopy(this.imports,0,temp,0,this.imports.length);
    this.imports=temp;
  }
  this.imports[index]=iimport;
}

Fixed version (ground truth):
@Override public void addImport(IImport iimport){
  int index=this.importCount++;
  if (index >= this.imports.length) {
    IImport[] temp=new IImport[index + 1];
    System.arraycopy(this.imports,0,temp,0,this.imports.length);
    this.imports=temp;
  }
  this.imports[index]=iimport;
}
Program: 84565
Project: 84565
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue=this.defaultValue.resolve(markers,context);
    boolean inferType=false;
    if (this.type == Types.UNKNOWN) {
      inferType=true;
      this.type=this.defaultValue.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
        this.type=Types.ANY;
      }
    }
    IValue value1=this.defaultValue.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.defaultValue.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.defaultValue.getType());
    }
 else {
      this.defaultValue=value1;
      if (inferType) {
        this.type=value1.getType();
      }
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
    this.type=Types.ANY;
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  this.modifiers|=Modifiers.PUBLIC;
  super.resolve(markers,context);
  if (this.defaultValue != null) {
    this.defaultValue=this.defaultValue.resolve(markers,context);
    boolean inferType=false;
    if (this.type == Types.UNKNOWN) {
      inferType=true;
      this.type=this.defaultValue.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
        this.type=Types.ANY;
      }
    }
    IValue value1=this.defaultValue.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.defaultValue.getPosition(),"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.defaultValue.getType());
    }
 else {
      this.defaultValue=value1;
      if (inferType) {
        this.type=value1.getType();
      }
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
    this.type=Types.ANY;
  }
}
Program: 84566
Project: 84566
Buggy source:
public ClassParameter(Name name,IType type){
  this.name=name;
  this.type=type;
}

Fixed version (ground truth):
public ClassParameter(IClass theClass,int access,Name name,IType type){
  this.theClass=theClass;
  this.name=name;
  this.type=type;
  this.modifiers=access;
}
Program: 84567
Project: 84567
Buggy source:
@Override public void visitEnd(){
}

Fixed version (ground truth):
@Override public void visitEnd(){
  this.theClass.visitEnd();
}
Program: 84568
Project: 84568
Buggy source:
@Override public AnnotationVisitor visitAnnotation(String name,boolean visible){
  String internal=ClassFormat.extendedToInternal(name);
  if (this.theClass.addRawAnnotation(internal)) {
    Annotation annotation=new Annotation(null,ClassFormat.internalToType(internal));
    return new AnnotationVisitorImpl(this.theClass,annotation);
  }
  return null;
}

Fixed version (ground truth):
@Override public AnnotationVisitor visitAnnotation(String type,boolean visible){
  return this.theClass.visitAnnotation(type,visible);
}
Program: 84573
Project: 84573
Buggy source:
@Override public void compile(){
  if (ICompilationUnit.printMarkers(this.markers,"String_Node_Str",this.name,this.inputFile)) {
    return;
  }
  HeaderFile.write(this.outputFile,this);
}

Fixed version (ground truth):
@Override public void compile(){
  if (this.printMarkers()) {
    return;
  }
  HeaderFile.write(this.outputFile,this);
}
Program: 84574
Project: 84574
Buggy source:
@Override public void compile(){
  if (ICompilationUnit.printMarkers(this.markers,"String_Node_Str",this.name,this.inputFile)) {
    return;
  }
  for (int i=0; i < this.classCount; i++) {
    IClass iclass=this.classes[i];
    String name=iclass.getName().qualified;
    if (!name.equals(this.name)) {
      name=this.name + "String_Node_Str" + name+ "String_Node_Str";
    }
 else {
      name+="String_Node_Str";
    }
    File file=new File(this.outputDirectory,name);
    ClassWriter.compile(file,iclass);
    IClassBody body=iclass.getBody();
    if (body != null) {
      int len=body.classCount();
      for (int j=0; j < len; j++) {
        IClass iclass1=body.getClass(j);
        name=this.name + "String_Node_Str" + iclass1.getName().qualified+ "String_Node_Str";
        file=new File(this.outputDirectory,name);
        ClassWriter.compile(file,iclass1);
      }
    }
  }
  for (int i=0; i < this.innerClassCount; i++) {
    IClassCompilable iclass=this.innerClasses[i];
    String name=iclass.getFileName() + "String_Node_Str";
    File file=new File(this.outputDirectory,name);
    ClassWriter.compile(file,iclass);
  }
}

Fixed version (ground truth):
@Override public void compile(){
  if (this.printMarkers()) {
    return;
  }
  for (int i=0; i < this.classCount; i++) {
    IClass iclass=this.classes[i];
    String name=iclass.getName().qualified;
    if (!name.equals(this.name)) {
      name=this.name + "String_Node_Str" + name+ "String_Node_Str";
    }
 else {
      name+="String_Node_Str";
    }
    File file=new File(this.outputDirectory,name);
    ClassWriter.compile(file,iclass);
    IClassBody body=iclass.getBody();
    if (body != null) {
      int len=body.classCount();
      for (int j=0; j < len; j++) {
        IClass iclass1=body.getClass(j);
        name=this.name + "String_Node_Str" + iclass1.getName().qualified+ "String_Node_Str";
        file=new File(this.outputDirectory,name);
        ClassWriter.compile(file,iclass1);
      }
    }
  }
  for (int i=0; i < this.innerClassCount; i++) {
    IClassCompilable iclass=this.innerClasses[i];
    String name=iclass.getFileName() + "String_Node_Str";
    File file=new File(this.outputDirectory,name);
    ClassWriter.compile(file,iclass);
  }
}
Program: 84575
Project: 84575
Buggy source:
public void findUnits(FileFinder fileFinder){
  if (!this.includedFiles.isEmpty()) {
    for (    String s : this.includedFiles) {
      File source=new File(sourceDir,s);
      File output=new File(outputDir,s);
      Package pack=packageFromFile(s,source.isDirectory());
      fileFinder.findUnits(source,output,pack);
    }
    return;
  }
  fileFinder.findUnits(sourceDir,outputDir,Package.rootPackage);
}

Fixed version (ground truth):
public void findUnits(FileFinder fileFinder){
  if (!this.includedFiles.isEmpty()) {
    for (    String s : this.includedFiles) {
      File source=new File(sourceDir,s);
      File output=new File(outputDir,s);
      Package pack=packageFromFile(s,source.isDirectory());
      fileFinder.process(source,output,pack);
    }
    return;
  }
  fileFinder.process(sourceDir,outputDir,Package.rootPackage);
}
Program: 84576
Project: 84576
Buggy source:
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.name=name;
      this.annotation.type=new NamedType(token.raw(),name);
      this.mode=PARAMETERS_START;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      IToken next=token.next();
      if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Symbols.COLON) {
        ArgumentMap map=new ArgumentMap();
        this.annotation.arguments=map;
        pm.pushParser(new ExpressionMapParser(map));
      }
 else {
        ArgumentList list=new ArgumentList();
        this.annotation.arguments=list;
        pm.pushParser(new ExpressionListParser(list));
      }
      this.mode=PARAMETERS_END;
      return;
    }
    if (type == Symbols.OPEN_SQUARE_BRACKET) {
      SingleArgument arg=new SingleArgument();
      this.annotation.arguments=arg;
      pm.popParser();
      pm.pushParser(new ExpressionParser(arg),true);
      return;
    }
    pm.popParser(true);
    return;
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.CLOSE_PARENTHESIS) {
      pm.popParser();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void parse(IParserManager pm,IToken token) throws SyntaxError {
  int type=token.type();
  if (this.mode == NAME) {
    if (ParserUtil.isIdentifier(type)) {
      Name name=token.nameValue();
      this.annotation.name=name;
      this.annotation.type=new NamedType(token.raw(),name);
      this.mode=PARAMETERS_START;
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
  if (this.mode == PARAMETERS_START) {
    if (type == Symbols.OPEN_PARENTHESIS) {
      IToken next=token.next();
      if (ParserUtil.isIdentifier(next.type()) && next.next().type() == Symbols.COLON) {
        ArgumentMap map=new ArgumentMap();
        this.annotation.arguments=map;
        pm.pushParser(new ExpressionMapParser(map));
      }
 else {
        ArgumentList list=new ArgumentList();
        this.annotation.arguments=list;
        pm.pushParser(new ExpressionListParser(list));
      }
      this.mode=PARAMETERS_END;
      return;
    }
    if (type == Symbols.OPEN_SQUARE_BRACKET) {
      SingleArgument arg=new SingleArgument();
      this.annotation.arguments=arg;
      pm.popParser();
      pm.pushParser(pm.newExpressionParser(arg),true);
      return;
    }
    pm.popParser(true);
    return;
  }
  if (this.mode == PARAMETERS_END) {
    if (type == Symbols.CLOSE_PARENTHESIS) {
      pm.popParser();
      return;
    }
    throw new SyntaxError(token,"String_Node_Str");
  }
}
Program: 84580
Project: 84580
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (this.method.getTypeVariable(index) == typeVar) {
    return this.generics[index];
  }
  return this.instanceType.resolveType(typeVar);
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (this.method.getTypeVariable(index) == typeVar) {
    if (index > this.genericCount) {
      return new TypeVarType(typeVar);
    }
    return this.generics[index];
  }
  return this.instanceType.resolveType(typeVar);
}
Program: 84581
Project: 84581
Buggy source:
@Override public void addMapping(ITypeVariable typeVar,IType type){
  int index=typeVar.getIndex();
  if (index < this.genericCount) {
    this.generics[index]=this.generics[index].combine(type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}

Fixed version (ground truth):
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (this.method.getTypeVariable(index) != typeVar) {
    return;
  }
  if (index < this.genericCount) {
    this.generics[index]=this.generics[index].combine(type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}
Program: 84583
Project: 84583
Buggy source:
@Override public IClass getTheClass(){
  return null;
}

Fixed version (ground truth):
@Override public IClass getTheClass(){
  return NULL_CLASS;
}
Program: 84584
Project: 84584
Buggy source:
private boolean computeVariable(REPLVariable field){
  this.getClassName();
  MarkerList markers=new MarkerList();
  field.resolveTypes(markers,this);
  field.resolve(markers,this);
  field.checkTypes(markers,this);
  field.check(markers,this);
  if (this.reportErrors(markers)) {
    this.cleanup();
    return false;
  }
  field.foldConstants();
  this.compileInnerClasses();
  field.compute(this.currentClassName);
  this.cleanup();
  return true;
}

Fixed version (ground truth):
private boolean computeVariable(REPLVariable field){
  this.getClassName();
  MarkerList markers=new MarkerList();
  field.resolveTypes(markers,this);
  field.resolve(markers,this);
  field.checkTypes(markers,this);
  field.check(markers,this);
  if (this.reportErrors(markers)) {
    this.cleanup();
    return false;
  }
  this.compileVariable(field);
  return true;
}
Program: 84585
Project: 84585
Buggy source:
@Override public void setValue(IValue value){
  Name name=Name.getQualified("String_Node_Str" + resultIndex);
  REPLVariable field=new REPLVariable(CODE_POSITION,name,Types.UNKNOWN,value);
  field.modifiers=Modifiers.FINAL;
  if (this.computeVariable(field)) {
    if (field.getType() != Types.VOID) {
      this.variables.put(field.name,field);
      System.out.println(field.toString());
      resultIndex++;
    }
  }
}

Fixed version (ground truth):
@Override public void setValue(IValue value){
  Name name=Name.getQualified("String_Node_Str" + resultIndex);
  this.getClassName();
  MarkerList markers=new MarkerList();
  value.resolveTypes(markers,this);
  value=value.resolve(markers,this);
  IType type=value.getType();
  IValue value1=value.withType(type,type,markers,this);
  if (value1 == null) {
  }
 else {
    value=value1;
    type=value1.getType();
  }
  value.checkTypes(markers,this);
  value.check(markers,this);
  if (this.reportErrors(markers)) {
    this.cleanup();
    return;
  }
  REPLVariable field=new REPLVariable(CODE_POSITION,name,type,value);
  field.modifiers=Modifiers.FINAL;
  this.compileVariable(field);
  if (type != Types.VOID) {
    this.variables.put(field.name,field);
    System.out.println(field.toString());
    resultIndex++;
  }
}
Program: 84586
Project: 84586
Buggy source:
@Override public IConstructor getConstructor(int index){
  return this.constructors[index];
}

Fixed version (ground truth):
@Override public IConstructor getConstructor(IParameter[] parameters,int parameterCount){
  outer:   for (int i=0; i < this.constructorCount; i++) {
    IConstructor c=this.constructors[i];
    if (c.parameterCount() != parameterCount) {
      continue;
    }
    for (int p=0; p < parameterCount; p++) {
      IType classParamType=parameters[p].getType();
      IType constructorParamType=c.getParameter(p).getType();
      if (!classParamType.equals(constructorParamType)) {
        continue outer;
      }
    }
    return c;
  }
  return null;
}
Program: 84587
Project: 84587
Buggy source:
public ClassMetadata(IClass iclass){
  this.theClass=iclass;
  Constructor constructor=new Constructor(this.theClass);
  constructor.modifiers=Modifiers.PUBLIC;
  this.constructor=constructor;
}

Fixed version (ground truth):
public ClassMetadata(IClass iclass){
  this.theClass=iclass;
}
Program: 84588
Project: 84588
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  IType superType=this.theClass.getSuperType();
  if (superType == null) {
    return;
  }
  IConstructor match=IContext.resolveConstructor(superType,EmptyArguments.INSTANCE);
  if (match != null) {
    this.superConstructor=match;
    return;
  }
  markers.add(this.theClass.getPosition(),"String_Node_Str",superType.toString());
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  if ((this.methods & CONSTRUCTOR) != 0) {
    return;
  }
  IType superType=this.theClass.getSuperType();
  if (superType == null) {
    return;
  }
  IConstructor match=IContext.resolveConstructor(superType,EmptyArguments.INSTANCE);
  if (match != null) {
    this.superConstructor=match;
    return;
  }
  markers.add(this.theClass.getPosition(),"String_Node_Str",superType.toString());
}
Program: 84589
Project: 84589
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  this.constructor.type=this.theClass.getType();
  int parameterCount=this.theClass.parameterCount();
  IParameter[] parameters=this.theClass.getParameters();
  this.constructor.setParameters(parameters,parameterCount);
  if (parameterCount > 0 && parameters[parameterCount - 1].isVarargs()) {
    this.constructor.setVarargs();
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  IClassBody body=this.theClass.getBody();
  if (body != null) {
    IConstructor c=body.getConstructor(this.theClass.getParameters(),this.theClass.parameterCount());
    if (c != null) {
      this.constructor=c;
      this.methods|=CONSTRUCTOR;
      return;
    }
  }
  Constructor constructor=new Constructor(this.theClass);
  constructor.type=this.theClass.getType();
  constructor.modifiers=Modifiers.PUBLIC;
  int parameterCount=this.theClass.parameterCount();
  IParameter[] parameters=this.theClass.getParameters();
  constructor.setParameters(parameters,parameterCount);
  if (parameterCount > 0 && parameters[parameterCount - 1].isVarargs()) {
    constructor.setVarargs();
  }
  this.constructor=constructor;
}
Program: 84590
Project: 84590
Buggy source:
@Override public void getConstructorMatches(List<ConstructorMatch> list,IArguments arguments){
  int match=this.constructor.getSignatureMatch(arguments);
  if (match > 0) {
    list.add(new ConstructorMatch(this.constructor,match));
  }
}

Fixed version (ground truth):
@Override public void getConstructorMatches(List<ConstructorMatch> list,IArguments arguments){
  if ((this.methods & CONSTRUCTOR) != 0) {
    return;
  }
  int match=this.constructor.getSignatureMatch(arguments);
  if (match > 0) {
    list.add(new ConstructorMatch(this.constructor,match));
  }
}
Program: 84591
Project: 84591
Buggy source:
@Override public void write(ClassWriter writer,IValue instanceFields) throws BytecodeException {
  StatementList list=new StatementList();
  if (instanceFields != null) {
    list.addValue(instanceFields);
  }
  if (this.superConstructor != null) {
    list.addValue(new InitializerCall(null,this.superConstructor,EmptyArguments.INSTANCE,true));
  }
  int count=this.theClass.parameterCount();
  for (int i=0; i < count; i++) {
    IParameter param=this.theClass.getParameter(i);
    list.addValue(new ClassParameterSetter(this.theClass,param));
  }
  this.constructor.setValue(list);
  this.constructor.write(writer,instanceFields);
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer,IValue instanceFields) throws BytecodeException {
  if ((this.methods & CONSTRUCTOR) != 0) {
    return;
  }
  StatementList list=new StatementList();
  if (instanceFields != null) {
    list.addValue(instanceFields);
  }
  if (this.superConstructor != null) {
    list.addValue(new InitializerCall(null,this.superConstructor,EmptyArguments.INSTANCE,true));
  }
  int count=this.theClass.parameterCount();
  for (int i=0; i < count; i++) {
    IParameter param=this.theClass.getParameter(i);
    list.addValue(new ClassParameterSetter(this.theClass,param));
  }
  this.constructor.setValue(list);
  this.constructor.write(writer,instanceFields);
}
Program: 84592
Project: 84592
Buggy source:
@Override public IType resolveType(Name name){
  if (name == this.name) {
    return new ClassType(this);
  }
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable var=this.generics[i];
    if (var.getName() == name) {
      return new TypeVarType(var);
    }
  }
  return this.unit.resolveType(name);
}

Fixed version (ground truth):
@Override public IType resolveType(Name name){
  if (name == this.name) {
    return new ClassType(this);
  }
  if (this.body != null) {
    IClass iclass=this.body.getClass(name);
    if (iclass != null) {
      return new ClassType(iclass);
    }
  }
  for (int i=0; i < this.genericCount; i++) {
    ITypeVariable var=this.generics[i];
    if (var.getName() == name) {
      return new TypeVarType(var);
    }
  }
  if (this.outerClass != null) {
    return this.outerClass.resolveType(name);
  }
  return this.unit.resolveType(name);
}
Program: 84593
Project: 84593
Buggy source:
@Override public IClass resolveClass(Name name){
  if (this.body != null) {
    IClass clazz=this.body.getClass(name);
    if (clazz != null) {
      return clazz;
    }
  }
  if (this.outerClass != null) {
    return this.outerClass.resolveClass(name);
  }
  return this.unit.resolveClass(name);
}

Fixed version (ground truth):
@Override public IClass resolveClass(Name name){
  if (this.body != null) {
    IClass iclass=this.body.getClass(name);
    if (iclass != null) {
      return iclass;
    }
  }
  if (this.outerClass != null) {
    return this.outerClass.resolveClass(name);
  }
  return this.unit.resolveClass(name);
}
Program: 84594
Project: 84594
Buggy source:
public IConstructor getConstructor(int index);

Fixed version (ground truth):
public IConstructor getConstructor(IParameter[] parameters,int parameterCount);
Program: 84595
Project: 84595
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.genericCount; i++) {
    this.generics[i].resolveTypes(markers,context);
  }
  super.resolveTypes(markers,this);
  for (int i=0; i < this.annotationCount; i++) {
    Annotation annotation=this.annotations[i];
    if (annotation.type.getTheClass() != Types.INTRINSIC_CLASS) {
      continue;
    }
    try {
      Array array=(Array)annotation.arguments.getValue(0,Annotation.VALUE);
      int len=array.valueCount();
      int[] opcodes=new int[len];
      for (int j=0; j < len; j++) {
        IntValue v=(IntValue)array.getValue(j);
        opcodes[j]=v.value;
      }
      this.intrinsicOpcodes=opcodes;
    }
 catch (    NullPointerException|ClassCastException ex) {
    }
    break;
  }
  for (int i=0; i < this.exceptionCount; i++) {
    this.exceptions[i]=this.exceptions[i].resolve(markers,this,TypePosition.TYPE);
  }
  int index=(this.modifiers & Modifiers.STATIC) == 0 ? 1 : 0;
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.resolveTypes(markers,this);
    param.setIndex(index);
    IType type=param.getType();
    if (type == Types.LONG || type == Types.DOUBLE) {
      index+=2;
    }
 else {
      index++;
    }
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,this);
  }
 else   if (this.theClass.hasModifier(Modifiers.ABSTRACT)) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.genericCount; i++) {
    this.generics[i].resolveTypes(markers,context);
  }
  super.resolveTypes(markers,this);
  for (int i=0; i < this.annotationCount; i++) {
    Annotation annotation=this.annotations[i];
    if (annotation.type.getTheClass() != Types.INTRINSIC_CLASS) {
      continue;
    }
    try {
      Array array=(Array)annotation.arguments.getValue(0,Annotation.VALUE);
      int len=array.valueCount();
      int[] opcodes=new int[len];
      for (int j=0; j < len; j++) {
        IntValue v=(IntValue)array.getValue(j);
        opcodes[j]=v.value;
      }
      this.intrinsicOpcodes=opcodes;
    }
 catch (    NullPointerException|ClassCastException ex) {
    }
    break;
  }
  for (int i=0; i < this.exceptionCount; i++) {
    this.exceptions[i]=this.exceptions[i].resolve(markers,this,TypePosition.TYPE);
  }
  int index=(this.modifiers & Modifiers.STATIC) == 0 ? 1 : 0;
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.resolveTypes(markers,this);
    param.setIndex(index);
    IType type=param.getType();
    if (type == Types.LONG || type == Types.DOUBLE) {
      index+=2;
    }
 else {
      index++;
    }
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,this);
  }
 else   if (this.theClass.hasModifier(Modifiers.INTERFACE_CLASS)) {
    this.modifiers|=Modifiers.ABSTRACT | Modifiers.PUBLIC;
  }
 else   if (this.theClass.hasModifier(Modifiers.ABSTRACT)) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
}
Program: 84598
Project: 84598
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar){
  return this.map.get(typeVar);
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar){
  IType type=this.map.get(typeVar);
  if (type == null) {
    return Types.ANY;
  }
  return type;
}
Program: 84600
Project: 84600
Buggy source:
@Override public void write(ClassWriter writer) throws BytecodeException {
  boolean instance=this.thisClass != null;
  int modifiers=instance ? Modifiers.PRIVATE | Modifiers.SYNTHETIC : Modifiers.PRIVATE | Modifiers.STATIC | Modifiers.SYNTHETIC;
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(modifiers,this.name,this.getLambdaDescriptor(),null,null));
  if (instance) {
    mw.setThisType(this.thisClass.getInternalName());
  }
  int index=0;
  for (int i=0; i < this.capturedFieldCount; i++) {
    CaptureVariable capture=this.capturedFields[i];
    capture.index=index;
    index=mw.registerParameter(index,capture.variable.getName().qualified,capture.getReferenceType(),0);
  }
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.setIndex(index);
    index=mw.registerParameter(index,param.getName().qualified,param.getType(),0);
  }
  mw.begin();
  this.value.writeExpression(mw);
  mw.end(this.returnType);
}

Fixed version (ground truth):
@Override public void write(ClassWriter writer) throws BytecodeException {
  boolean instance=this.thisClass != null;
  int modifiers=instance ? Modifiers.PRIVATE | Modifiers.SYNTHETIC : Modifiers.PRIVATE | Modifiers.STATIC | Modifiers.SYNTHETIC;
  MethodWriter mw=new MethodWriterImpl(writer,writer.visitMethod(modifiers,this.name,this.getLambdaDescriptor(),null,null));
  int index=0;
  if (instance) {
    mw.setThisType(this.thisClass.getInternalName());
    index=1;
  }
  for (int i=0; i < this.capturedFieldCount; i++) {
    CaptureVariable capture=this.capturedFields[i];
    capture.index=index;
    index=mw.registerParameter(index,capture.variable.getName().qualified,capture.getReferenceType(),0);
  }
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.setIndex(index);
    index=mw.registerParameter(index,param.getName().qualified,param.getType(),0);
  }
  mw.begin();
  this.value.writeExpression(mw);
  mw.end(this.returnType);
}
Program: 84601
Project: 84601
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.resolveTypes(markers,context);
  }
  this.context=context;
  this.value.resolveTypes(markers,this);
  this.context=null;
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.resolveTypes(markers,context);
    IType type=param.getType();
    if (type != null && type.isPrimitive()) {
      param.setType(type.getReferenceType());
    }
  }
  this.context=context;
  this.value.resolveTypes(markers,this);
  this.context=null;
}
Program: 84602
Project: 84602
Buggy source:
public default IType getReferenceType(){
  return null;
}

Fixed version (ground truth):
public default IType getReferenceType(){
  return this.getType();
}
Program: 84603
Project: 84603
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (this.method.getTypeVariable(index) == typeVar) {
    if (index > this.genericCount) {
      return new TypeVarType(typeVar);
    }
    return this.generics[index];
  }
  return this.instanceType.resolveType(typeVar);
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (this.isMethodTypeVariable(typeVar)) {
    if (index > this.genericCount) {
      return new TypeVarType(typeVar);
    }
    return this.generics[index];
  }
  return this.instanceType.resolveType(typeVar);
}
Program: 84604
Project: 84604
Buggy source:
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (this.method.getTypeVariable(index) != typeVar) {
    return;
  }
  if (index < this.genericCount) {
    this.generics[index]=this.generics[index].combine(type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}

Fixed version (ground truth):
@Override public void addMapping(ITypeVariable typeVar,IType type){
  if (type == Types.UNKNOWN) {
    return;
  }
  int index=typeVar.getIndex();
  if (!this.isMethodTypeVariable(typeVar)) {
    return;
  }
  if (index < this.genericCount) {
    this.generics[index]=this.generics[index].combine(type);
    return;
  }
  this.genericCount=index + 1;
  if (index >= this.generics.length) {
    IType[] temp=new IType[index + 1];
    System.arraycopy(this.generics,0,temp,0,this.generics.length);
    this.generics=temp;
  }
  this.generics[typeVar.getIndex()]=type;
}
Program: 84605
Project: 84605
Buggy source:
public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.typeCount(); i++) {
    this.generics[i]=this.generics[i].resolve(markers,context,TypePosition.TYPE);
  }
}

Fixed version (ground truth):
public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.genericCount; i++) {
    this.generics[i]=this.generics[i].resolve(markers,context,TypePosition.TYPE);
  }
}
Program: 84606
Project: 84606
Buggy source:
@Override public IType getConcreteType(ITypeContext context){
  if (context == null) {
    return this;
  }
  IType t=context.resolveType(this.typeVar);
  if (t != null) {
    if (t.isPrimitive()) {
      return t.getReferenceType();
    }
    return t;
  }
  return this;
}

Fixed version (ground truth):
@Override public IType getConcreteType(ITypeContext context){
  if (context == null) {
    return this;
  }
  IType t=context.resolveType(this.typeVar);
  if (t != Types.ANY) {
    if (t.isPrimitive()) {
      return t.getReferenceType();
    }
    return t;
  }
  return this;
}
Program: 84607
Project: 84607
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].resolve(markers,context);
  }
  if (this.value != null) {
    this.value=this.value.resolve(markers,this);
    boolean inferType=false;
    if (this.type == Types.UNKNOWN) {
      inferType=true;
      this.type=this.value.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
        this.type=Types.ANY;
      }
    }
    IValue value1=this.value.withType(this.type,null,markers,context);
    if (value1 == null) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
      if (inferType) {
        this.type=value1.getType();
      }
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
    this.type=Types.ANY;
  }
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  super.resolve(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].resolve(markers,context);
  }
  if (this.value != null) {
    this.value=this.value.resolve(markers,this);
    boolean inferType=false;
    if (this.type == Types.UNKNOWN) {
      inferType=true;
      this.type=this.value.getType();
      if (this.type == Types.UNKNOWN) {
        markers.add(this.position,"String_Node_Str",this.name.unqualified);
        this.type=Types.ANY;
      }
    }
    IValue value1=this.value.withType(this.type,this.type,markers,this);
    if (value1 == null) {
      Marker marker=markers.create(this.position,"String_Node_Str",this.name.unqualified);
      marker.addInfo("String_Node_Str" + this.type);
      marker.addInfo("String_Node_Str" + this.value.getType());
    }
 else {
      this.value=value1;
      if (inferType) {
        this.type=value1.getType();
      }
    }
    return;
  }
  if (this.type == Types.UNKNOWN) {
    markers.add(this.position,"String_Node_Str",this.name.unqualified);
    this.type=Types.ANY;
  }
}
Program: 84608
Project: 84608
Buggy source:
@Override public GenericData getGenericData(GenericData genericData,IValue instance,IArguments arguments){
  if (!this.hasTypeVariables()) {
    return genericData;
  }
  if (genericData == null) {
    genericData=new GenericData(this,this.genericCount);
    if (instance != null) {
      genericData.instanceType=instance.getType();
    }
    this.inferTypes(genericData,instance,arguments);
    return genericData;
  }
  genericData.method=this;
  if (instance != null) {
    genericData.instanceType=instance.getType();
  }
  genericData.setTypeCount(this.genericCount);
  this.inferTypes(genericData,instance,arguments);
  return genericData;
}

Fixed version (ground truth):
@Override public GenericData getGenericData(GenericData genericData,IValue instance,IArguments arguments){
  if (!this.hasTypeVariables()) {
    return genericData;
  }
  if (genericData == null) {
    genericData=new GenericData(this,this.genericCount);
    this.inferTypes(genericData,instance,arguments);
    return genericData;
  }
  genericData.method=this;
  genericData.setTypeCount(this.genericCount);
  this.inferTypes(genericData,instance,arguments);
  return genericData;
}
Program: 84609
Project: 84609
Buggy source:
@Override public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.genericCount; i++) {
    this.generics[i].resolveTypes(markers,context);
  }
  super.resolveTypes(markers,this);
  for (int i=0; i < this.annotationCount; i++) {
    Annotation annotation=this.annotations[i];
    if (annotation.type.getTheClass() != Types.INTRINSIC_CLASS) {
      continue;
    }
    try {
      Array array=(Array)annotation.arguments.getValue(0,Annotation.VALUE);
      int len=array.valueCount();
      int[] opcodes=new int[len];
      for (int j=0; j < len; j++) {
        IntValue v=(IntValue)array.getValue(j);
        opcodes[j]=v.value;
      }
      this.intrinsicOpcodes=opcodes;
    }
 catch (    NullPointerException|ClassCastException ex) {
    }
    break;
  }
  for (int i=0; i < this.exceptionCount; i++) {
    this.exceptions[i]=this.exceptions[i].resolve(markers,this,TypePosition.TYPE);
  }
  int index=(this.modifiers & Modifiers.STATIC) == 0 ? 1 : 0;
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.resolveTypes(markers,this);
    param.setIndex(index);
    IType type=param.getType();
    if (type == Types.LONG || type == Types.DOUBLE) {
      index+=2;
    }
 else {
      index++;
    }
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,this);
  }
}

Fixed version (ground truth):
@Override public void resolveTypes(MarkerList markers,IContext context){
  for (int i=0; i < this.genericCount; i++) {
    this.generics[i].resolveTypes(markers,context);
  }
  super.resolveTypes(markers,this);
  for (int i=0; i < this.annotationCount; i++) {
    Annotation annotation=this.annotations[i];
    if (annotation.type.getTheClass() != Types.INTRINSIC_CLASS) {
      continue;
    }
    try {
      Array array=(Array)annotation.arguments.getValue(0,Annotation.VALUE);
      int len=array.valueCount();
      int[] opcodes=new int[len];
      for (int j=0; j < len; j++) {
        IntValue v=(IntValue)array.getValue(j);
        opcodes[j]=v.value;
      }
      this.intrinsicOpcodes=opcodes;
    }
 catch (    NullPointerException|ClassCastException ex) {
    }
    break;
  }
  for (int i=0; i < this.exceptionCount; i++) {
    this.exceptions[i]=this.exceptions[i].resolve(markers,this,TypePosition.TYPE);
  }
  int index=(this.modifiers & Modifiers.STATIC) == 0 ? 1 : 0;
  for (int i=0; i < this.parameterCount; i++) {
    IParameter param=this.parameters[i];
    param.resolveTypes(markers,this);
    param.setIndex(index);
    IType type=param.getType();
    if (type == Types.LONG || type == Types.DOUBLE) {
      index+=2;
    }
 else {
      index++;
    }
  }
  if (this.value != null) {
    this.value.resolveTypes(markers,this);
  }
 else   if (this.theClass.hasModifier(Modifiers.ABSTRACT)) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
}
Program: 84610
Project: 84610
Buggy source:
private void inferTypes(GenericData genericData,IValue instance,IArguments arguments){
  int len=arguments.size();
  IParameter param;
  if (instance != null && (this.modifiers & Modifiers.INFIX) == Modifiers.INFIX) {
    this.parameters[0].getType().inferTypes(instance.getType(),genericData);
    for (int i=0; i < len; i++) {
      param=this.parameters[i + 1];
      param.getType().inferTypes(arguments.getType(i,param),genericData);
    }
  }
 else {
    len=Math.min(this.parameterCount,len);
    for (int i=0; i < len; i++) {
      param=this.parameters[i];
      param.getType().inferTypes(arguments.getType(i,param),genericData);
    }
  }
}

Fixed version (ground truth):
private void inferTypes(GenericData genericData,IValue instance,IArguments arguments){
  if (instance != null) {
    genericData.instanceType=instance.getType();
  }
 else {
    genericData.instanceType=this.theClass.getType();
  }
  int len=arguments.size();
  IParameter param;
  if (instance != null && (this.modifiers & Modifiers.INFIX) == Modifiers.INFIX) {
    this.parameters[0].getType().inferTypes(instance.getType(),genericData);
    for (int i=0; i < len; i++) {
      param=this.parameters[i + 1];
      param.getType().inferTypes(arguments.getType(i,param),genericData);
    }
  }
 else {
    len=Math.min(this.parameterCount,len);
    for (int i=0; i < len; i++) {
      param=this.parameters[i];
      param.getType().inferTypes(arguments.getType(i,param),genericData);
    }
  }
}
Program: 84611
Project: 84611
Buggy source:
@Override public void checkTypes(MarkerList markers,IContext context){
  super.checkTypes(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].checkTypes(markers,context);
  }
  if (this.value != null) {
    this.value.checkTypes(markers,this);
  }
 else   if ((this.modifiers & Modifiers.ABSTRACT) == 0) {
    this.modifiers|=Modifiers.ABSTRACT;
  }
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    this.checkOverride(markers,context);
  }
}

Fixed version (ground truth):
@Override public void checkTypes(MarkerList markers,IContext context){
  super.checkTypes(markers,context);
  for (int i=0; i < this.parameterCount; i++) {
    this.parameters[i].checkTypes(markers,context);
  }
  if (this.value != null) {
    this.value.checkTypes(markers,this);
  }
  if ((this.modifiers & Modifiers.STATIC) == 0) {
    this.checkOverride(markers,context);
  }
}
Program: 84612
Project: 84612
Buggy source:
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (index == this.parameterCount) {
    return this.returnType;
  }
  return this.parameterTypes[index];
}

Fixed version (ground truth):
@Override public IType resolveType(ITypeVariable typeVar){
  int index=typeVar.getIndex();
  if (index == this.parameterCount) {
    return this.returnType;
  }
  if (index > this.parameterCount) {
    return Types.ANY;
  }
  return this.parameterTypes[index];
}
Program: 84613
Project: 84613
Buggy source:
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.parameterCount == 1) {
    this.parameterTypes[0].toString(prefix,buffer);
    buffer.append(' ');
  }
 else   if (this.parameterCount > 0) {
    buffer.append(Formatting.Method.parametersStart);
    Util.astToString(prefix,this.parameterTypes,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(Formatting.Method.parametersEnd);
    buffer.append(' ');
  }
  buffer.append(Formatting.Expression.lambdaSeperator);
  this.returnType.toString("String_Node_Str",buffer);
}

Fixed version (ground truth):
@Override public void toString(String prefix,StringBuilder buffer){
  if (this.parameterCount == 1) {
    if (this.parameterTypes[0].typeTag() == TUPLE) {
      buffer.append(Formatting.Method.parametersStart);
      this.parameterTypes[0].toString(prefix,buffer);
      buffer.append(Formatting.Method.parametersEnd);
    }
 else {
      this.parameterTypes[0].toString(prefix,buffer);
    }
    buffer.append(' ');
  }
 else   if (this.parameterCount > 0) {
    buffer.append(Formatting.Method.parametersStart);
    Util.astToString(prefix,this.parameterTypes,this.parameterCount,Formatting.Method.parameterSeperator,buffer);
    buffer.append(Formatting.Method.parametersEnd);
    buffer.append(' ');
  }
  buffer.append(Formatting.Expression.lambdaSeperator);
  this.returnType.toString("String_Node_Str",buffer);
}
Program: 84614
Project: 84614
Buggy source:
private void checkMethod(IMethod m){
  Name name=m.getName();
  if (name == Name.equals) {
    if (m.parameterCount() == 1 && m.getParameter(0).getType().equals(Types.OBJECT)) {
      this.methods|=EQUALS;
    }
    return;
  }
  if (name == Name.hashCode) {
    if (m.parameterCount() == 0) {
      this.methods|=HASHCODE;
    }
    return;
  }
  if (name == Name.toString) {
    if (m.parameterCount() == 0) {
      this.methods|=TOSTRING;
    }
    return;
  }
  if (name == Name.apply) {
    if (m.parameterCount() == this.theClass.parameterCount()) {
      int len=this.theClass.parameterCount();
      for (int i=0; i < len; i++) {
        IType t1=m.getParameter(i).getType();
        IType t2=m.getParameter(i).getType();
        if (!t1.classEquals(t2) || t1.getArrayDimensions() != t2.getArrayDimensions()) {
          return;
        }
      }
      this.methods|=APPLY;
    }
    return;
  }
}

Fixed version (ground truth):
private void checkMethod(IMethod m){
  Name name=m.getName();
  if (name == Name.equals) {
    if (m.parameterCount() == 1 && m.getParameter(0).getType().equals(Types.OBJECT)) {
      this.methods|=EQUALS;
    }
    return;
  }
  if (name == Name.hashCode) {
    if (m.parameterCount() == 0) {
      this.methods|=HASHCODE;
    }
    return;
  }
  if (name == Name.toString) {
    if (m.parameterCount() == 0) {
      this.methods|=TOSTRING;
    }
    return;
  }
  if (name == Name.apply) {
    if (m.parameterCount() == this.theClass.parameterCount()) {
      int len=this.theClass.parameterCount();
      for (int i=0; i < len; i++) {
        IType t1=m.getParameter(i).getType();
        IType t2=m.getParameter(i).getType();
        if (!t1.equals(t2)) {
          return;
        }
      }
      this.methods|=APPLY;
    }
    return;
  }
}
Program: 84615
Project: 84615
Buggy source:
@Override public void resolve(MarkerList markers,IContext context){
  IClassBody body=this.theClass.getBody();
  if (body != null) {
    IConstructor c=body.getConstructor(this.theClass.getParameters(),this.theClass.parameterCount());
    if (c != null) {
      this.constructor=c;
      this.methods|=CONSTRUCTOR;
      return;
    }
  }
  Constructor constructor=new Constructor(this.theClass);
  constructor.type=this.theClass.getType();
  constructor.modifiers=Modifiers.PUBLIC;
  int parameterCount=this.theClass.parameterCount();
  IParameter[] parameters=this.theClass.getParameters();
  constructor.setParameters(parameters,parameterCount);
  if (parameterCount > 0 && parameters[parameterCount - 1].isVarargs()) {
    constructor.setVarargs();
  }
  this.constructor=constructor;
}

Fixed version (ground truth):
@Override public void resolve(MarkerList markers,IContext context){
  IClassBody body=this.theClass.getBody();
  if (body != null && body.constructorCount() > 0) {
    IConstructor c=body.getConstructor(this.theClass.getParameters(),this.theClass.parameterCount());
    if (c != null) {
      this.constructor=c;
      this.methods|=CONSTRUCTOR;
      return;
    }
    if (this.theClass.parameterCount() == 0) {
      this.methods|=CONSTRUCTOR;
      return;
    }
  }
  Constructor constructor=new Constructor(this.theClass);
  constructor.type=this.theClass.getType();
  constructor.modifiers=Modifiers.PUBLIC;
  int parameterCount=this.theClass.parameterCount();
  IParameter[] parameters=this.theClass.getParameters();
  constructor.setParameters(parameters,parameterCount);
  if (parameterCount > 0 && parameters[parameterCount - 1].isVarargs()) {
    constructor.setVarargs();
  }
  this.constructor=constructor;
}
Program: 84616
Project: 84616
Buggy source:
@Override public void addValue(int index,IValue value){
  int i=this.valueCount++;
  System.arraycopy(this.values,index,this.values,index + 1,i - index + 1);
  this.values[index]=value;
}

Fixed version (ground truth):
@Override public void addValue(int index,IValue value){
  IValue[] temp=new IValue[++this.valueCount];
  System.arraycopy(this.values,0,temp,0,index);
  temp[index]=value;
  System.arraycopy(this.values,index,temp,index + 1,this.valueCount - index - 1);
  this.values=temp;
}
Program: 84617
Project: 84617
Buggy source:
@Override public void addValue(int index,IValue value){
  int i=this.valueCount++;
  System.arraycopy(this.values,index,this.values,index + 1,i - index + 1);
  this.values[index]=value;
}

Fixed version (ground truth):
@Override public void addValue(int index,IValue value){
  IValue[] temp=new IValue[++this.valueCount];
  System.arraycopy(this.values,0,temp,0,index);
  temp[index]=value;
  System.arraycopy(this.values,index,temp,index + 1,this.valueCount - index - 1);
  this.values=temp;
}
Program: 84618
Project: 84618
Buggy source:
@Override public void addValue(int index,IValue value){
  int i=this.valueCount++;
  System.arraycopy(this.values,index,this.values,index + 1,i - index + 1);
  this.values[index]=value;
}

Fixed version (ground truth):
@Override public void addValue(int index,IValue value){
  IValue[] temp=new IValue[++this.valueCount];
  System.arraycopy(this.values,0,temp,0,index);
  temp[index]=value;
  System.arraycopy(this.values,index,temp,index + 1,this.valueCount - index - 1);
  this.values=temp;
}