nus-yam/ex-repair huggingface dataset:
Program: 9643
Project: 9643
Buggy source:
public static Instruction createConstant(InstructionFactory fact,int i){
  Instruction inst;
switch (i) {
case -1:
    inst=fact.ICONST_M1;
  break;
case 0:
inst=fact.ICONST_0;
break;
case 1:
inst=fact.ICONST_1;
break;
case 2:
inst=fact.ICONST_2;
break;
case 3:
inst=fact.ICONST_3;
break;
case 4:
inst=fact.ICONST_4;
break;
case 5:
inst=fact.ICONST_5;
break;
}
if (i <= Byte.MAX_VALUE && i >= Byte.MIN_VALUE) {
inst=new BIPUSH((byte)i);
}
 else if (i <= Short.MAX_VALUE && i >= Short.MIN_VALUE) {
inst=new SIPUSH((short)i);
}
 else {
inst=new LDC(fact.getClassGen().getConstantPool().addInteger(i));
}
return inst;
}

Fixed version (ground truth):
public static Instruction createConstant(InstructionFactory fact,int i){
  Instruction inst;
switch (i) {
case -1:
    inst=InstructionConstants.ICONST_M1;
  break;
case 0:
inst=InstructionConstants.ICONST_0;
break;
case 1:
inst=InstructionConstants.ICONST_1;
break;
case 2:
inst=InstructionConstants.ICONST_2;
break;
case 3:
inst=InstructionConstants.ICONST_3;
break;
case 4:
inst=InstructionConstants.ICONST_4;
break;
case 5:
inst=InstructionConstants.ICONST_5;
break;
}
if (i <= Byte.MAX_VALUE && i >= Byte.MIN_VALUE) {
inst=new BIPUSH((byte)i);
}
 else if (i <= Short.MAX_VALUE && i >= Short.MIN_VALUE) {
inst=new SIPUSH((short)i);
}
 else {
inst=new LDC(fact.getClassGen().getConstantPool().addInteger(i));
}
return inst;
}
Program: 9645
Project: 9645
Buggy source:
/** 
 * This checks the spec for a class name and checks the sandbox for a readable test source directory, a writable run dir, and (non-null, possibly-empty) lists of readable classpath dirs and jars.
 * @return true if all checks pass
 * @see org.aspectj.testing.harness.bridge.AjcTest.IAjcRun#setup(File,File)
 */
public boolean setupAjcRun(Sandbox sandbox,Validator validator){
  this.sandbox=sandbox;
  return (validator.nullcheck(spec.className,"String_Node_Str") && validator.nullcheck(sandbox,"String_Node_Str") && validator.canReadDir(sandbox.getTestBaseSrcDir(this),"String_Node_Str")&& validator.canWriteDir(sandbox.runDir,"String_Node_Str")&& validator.canReadFiles(sandbox.getClasspathJars(true,this),"String_Node_Str")&& validator.canReadDirs(sandbox.getClasspathDirectories(true,this),"String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * This checks the spec for a class name and checks the sandbox for a readable test source directory, a writable run dir, and (non-null, possibly-empty) lists of readable classpath dirs and jars.
 * @return true if all checks pass
 * @see org.aspectj.testing.harness.bridge.AjcTest.IAjcRun#setup(File,File)
 */
public boolean setupAjcRun(Sandbox sandbox,Validator validator){
  this.sandbox=sandbox;
  return (validator.nullcheck(spec.className,"String_Node_Str") && validator.nullcheck(sandbox,"String_Node_Str") && validator.canReadDir(sandbox.getTestBaseSrcDir(this),"String_Node_Str")&& validator.canWriteDir(sandbox.runDir,"String_Node_Str")&& validator.canReadFiles(sandbox.getClasspathJars(true,this),"String_Node_Str")&& validator.canReadDirs(sandbox.getClasspathDirectories(true,this,true),"String_Node_Str"));
}
Program: 9646
Project: 9646
Buggy source:
/** 
 * caller must record any exceptions 
 */
public boolean run(IRunStatus status) throws IllegalAccessException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException {
  boolean completedNormally=false;
  if (!LangUtil.isEmpty(spec.dirChanges)) {
    MessageUtil.info(status,"String_Node_Str");
  }
  try {
    final boolean readable=true;
    File[] libs=sandbox.getClasspathJars(readable,this);
    File[] dirs=sandbox.getClasspathDirectories(readable,this);
    completedNormally=FORK ? runInOtherVM(status,libs,dirs) : runInSameVM(status,libs,dirs);
  }
  finally {
    if (!completedNormally) {
      MessageUtil.info(status,spec.toLongString());
      MessageUtil.info(status,"String_Node_Str" + sandbox);
    }
  }
  return completedNormally;
}

Fixed version (ground truth):
/** 
 * caller must record any exceptions 
 */
public boolean run(IRunStatus status) throws IllegalAccessException, InvocationTargetException, ClassNotFoundException, NoSuchMethodException {
  boolean completedNormally=false;
  if (!LangUtil.isEmpty(spec.dirChanges)) {
    MessageUtil.info(status,"String_Node_Str");
  }
  try {
    final boolean readable=true;
    File[] libs=sandbox.getClasspathJars(readable,this);
    boolean includeClassesDir=true;
    File[] dirs=sandbox.getClasspathDirectories(readable,this,includeClassesDir);
    completedNormally=FORK ? runInOtherVM(status,libs,dirs) : runInSameVM(status,libs,dirs);
  }
  finally {
    if (!completedNormally) {
      MessageUtil.info(status,spec.toLongString());
      MessageUtil.info(status,"String_Node_Str" + sandbox);
    }
  }
  return completedNormally;
}
Program: 9647
Project: 9647
Buggy source:
/** 
 * Get directories for the run classpath by selecting them from the compile classpath. This ignores aspectpath since it may contain only jar files.
 * @param readable if true, omit non-readable directories 
 */
File[] getClasspathDirectories(boolean readable,JavaRun caller){
  LangUtil.throwIaxIfNull(caller,"String_Node_Str");
  assertState(null != compileClasspath,"String_Node_Str");
  ArrayList result=new ArrayList();
  File[] src=compileClasspath;
  for (int i=0; i < src.length; i++) {
    File f=src[i];
    if ((null != f) && (f.isDirectory()) && (!readable || f.canRead())) {
      result.add(f);
    }
  }
  return (File[])result.toArray(new File[0]);
}

Fixed version (ground truth):
/** 
 * Get directories for the run classpath by selecting them from the compile classpath. This ignores aspectpath since it may contain only jar files.
 * @param readable if true, omit non-readable directories 
 */
File[] getClasspathDirectories(boolean readable,JavaRun caller,boolean includeOutput){
  LangUtil.throwIaxIfNull(caller,"String_Node_Str");
  assertState(null != compileClasspath,"String_Node_Str");
  ArrayList result=new ArrayList();
  File[] src=compileClasspath;
  for (int i=0; i < src.length; i++) {
    File f=src[i];
    if ((null != f) && (f.isDirectory()) && (!readable || f.canRead())) {
      result.add(f);
    }
  }
  if (includeOutput && (null != classesDir) && (!readable || classesDir.canRead())) {
    result.add(classesDir);
  }
  return (File[])result.toArray(new File[0]);
}
Program: 9648
Project: 9648
Buggy source:
public List getClasspath(AjcConfigParser parser){
  List ret=new ArrayList();
  if (parser.bootclasspath == null) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
  }
 else {
    addClasspath(parser.bootclasspath,ret);
  }
  String extdirs=parser.extdirs;
  if (extdirs == null) {
    extdirs=System.getProperty("String_Node_Str","String_Node_Str");
  }
  addExtDirs(extdirs,ret);
  if ((classpaths == null || classpaths.length == 0) || (classpaths != null && classpaths[0] == "String_Node_Str")) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
  }
 else {
    ret.addAll(Arrays.asList(classpaths));
  }
  return ret;
}

Fixed version (ground truth):
public List getClasspath(AjcConfigParser parser){
  List ret=new ArrayList();
  if (parser.bootclasspath == null) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
  }
 else {
    addClasspath(parser.bootclasspath,ret);
  }
  String extdirs=parser.extdirs;
  if (extdirs == null) {
    extdirs=System.getProperty("String_Node_Str","String_Node_Str");
  }
  addExtDirs(extdirs,ret);
  if (parser.classpath == null) {
    addClasspath(System.getProperty("String_Node_Str","String_Node_Str"),ret);
  }
 else {
    addClasspath(parser.classpath,ret);
  }
  return ret;
}
Program: 9652
Project: 9652
Buggy source:
/** 
 * @return IMessage.WARNING unless message contains error or info 
 */
protected static IMessage.Kind inferKind(String message){
  if (-1 == message.indexOf("String_Node_Str")) {
    return IMessage.ERROR;
  }
 else   if (-1 == message.indexOf("String_Node_Str")) {
    return IMessage.INFO;
  }
 else {
    return IMessage.WARNING;
  }
}

Fixed version (ground truth):
/** 
 * @return IMessage.WARNING unless message contains error or info 
 */
protected static IMessage.Kind inferKind(String message){
  if (-1 != message.indexOf("String_Node_Str")) {
    return IMessage.ERROR;
  }
 else   if (-1 != message.indexOf("String_Node_Str")) {
    return IMessage.INFO;
  }
 else {
    return IMessage.WARNING;
  }
}
Program: 9653
Project: 9653
Buggy source:
public void endVisit(SingleTypeReference ref,BlockScope scope){
  makePublic(ref.getTypeBinding(scope));
}

Fixed version (ground truth):
public void endVisit(ClassLiteralAccess classLiteral,BlockScope scope){
  isInlinable=false;
}
Program: 9655
Project: 9655
Buggy source:
public static void main(String[] args){
  new C().foo();
}

Fixed version (ground truth):
public static void main(String[] args){
  new C().foo();
  new C().bar();
}
Program: 9656
Project: 9656
Buggy source:
public static void main(String[] args){
  new C().foo();
}

Fixed version (ground truth):
public static void main(String[] args){
  new C().foo();
  new C().bar();
}
Program: 9657
Project: 9657
Buggy source:
boolean canTreatAsStatic(String id){
  return id.equals("String_Node_Str") || id.equals("String_Node_Str") || id.equals("String_Node_Str")|| id.equals("String_Node_Str")|| id.equals("String_Node_Str")|| id.equals("String_Node_Str")|| id.equals("String_Node_Str");
}

Fixed version (ground truth):
boolean canTreatAsStatic(String id){
  return id.equals("String_Node_Str") || id.equals("String_Node_Str") || id.equals("String_Node_Str")|| id.equals("String_Node_Str")|| id.equals("String_Node_Str")|| id.equals("String_Node_Str");
}
Program: 9658
Project: 9658
Buggy source:
public SyntheticAccessMethodBinding getAccessMethod(boolean isReadAccess){
  if (isReadAccess)   return reader;
 else   return writer;
}

Fixed version (ground truth):
public SyntheticAccessMethodBinding getAccessMethod(boolean isReadAccess){
  if (baseField.alwaysNeedsAccessMethod(isReadAccess)) {
    return baseField.getAccessMethod(isReadAccess);
  }
  if (isReadAccess)   return reader;
 else   return writer;
}
Program: 9659
Project: 9659
Buggy source:
public FieldBinding getPrivilegedAccessField(FieldBinding baseField,AstNode location){
  ResolvedMember key=inAspect.factory.makeResolvedMember(baseField);
  if (accessors.containsKey(key))   return (FieldBinding)accessors.get(key);
  FieldBinding ret=new PrivilegedFieldBinding(inAspect,baseField);
  checkWeaveAccess(key.getDeclaringType(),location);
  accessors.put(key,ret);
  return ret;
}

Fixed version (ground truth):
public FieldBinding getPrivilegedAccessField(FieldBinding baseField,AstNode location){
  ResolvedMember key=inAspect.factory.makeResolvedMember(baseField);
  if (accessors.containsKey(key))   return (FieldBinding)accessors.get(key);
  FieldBinding ret=new PrivilegedFieldBinding(inAspect,baseField);
  checkWeaveAccess(key.getDeclaringType(),location);
  if (!baseField.alwaysNeedsAccessMethod(true))   accessors.put(key,ret);
  return ret;
}
Program: 9660
Project: 9660
Buggy source:
public MethodBinding getPrivilegedAccessMethod(MethodBinding baseMethod,AstNode location){
  ResolvedMember key=inAspect.factory.makeResolvedMember(baseMethod);
  if (accessors.containsKey(key))   return (MethodBinding)accessors.get(key);
  MethodBinding ret;
  if (baseMethod.isConstructor()) {
    ret=baseMethod;
  }
 else {
    ret=inAspect.factory.makeMethodBinding(AjcMemberMaker.privilegedAccessMethodForMethod(inAspect.typeX,key));
  }
  checkWeaveAccess(key.getDeclaringType(),location);
  accessors.put(key,ret);
  return ret;
}

Fixed version (ground truth):
public MethodBinding getPrivilegedAccessMethod(MethodBinding baseMethod,AstNode location){
  if (baseMethod.alwaysNeedsAccessMethod())   return baseMethod;
  ResolvedMember key=inAspect.factory.makeResolvedMember(baseMethod);
  if (accessors.containsKey(key))   return (MethodBinding)accessors.get(key);
  MethodBinding ret;
  if (baseMethod.isConstructor()) {
    ret=baseMethod;
  }
 else {
    ret=inAspect.factory.makeMethodBinding(AjcMemberMaker.privilegedAccessMethodForMethod(inAspect.typeX,key));
  }
  checkWeaveAccess(key.getDeclaringType(),location);
  accessors.put(key,ret);
  return ret;
}
Program: 9661
Project: 9661
Buggy source:
public void resolveStatements(){
  if (isAbstract())   this.modifiers|=AccSemicolonBody;
  if (binding == null || ignoreFurtherInvestigation)   return;
  if (pointcutDesignator != null) {
    pointcutDesignator.finishResolveTypes(this,this.binding,arguments.length,scope.enclosingSourceType());
  }
  super.resolveStatements();
}

Fixed version (ground truth):
public void resolveStatements(){
  if (isAbstract()) {
    this.modifiers|=AccSemicolonBody;
    if (pointcutDesignator != null) {
      scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    }
  }
  if (binding == null || ignoreFurtherInvestigation)   return;
  if (pointcutDesignator != null) {
    pointcutDesignator.finishResolveTypes(this,this.binding,arguments.length,scope.enclosingSourceType());
  }
  super.resolveStatements();
}
Program: 9662
Project: 9662
Buggy source:
public void resolveStatements(){
  if (isAbstract()) {
    this.modifiers|=AccSemicolonBody;
    if (pointcutDesignator != null) {
      scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
    }
  }
  if (binding == null || ignoreFurtherInvestigation)   return;
  if (pointcutDesignator != null) {
    pointcutDesignator.finishResolveTypes(this,this.binding,arguments.length,scope.enclosingSourceType());
  }
  super.resolveStatements();
}

Fixed version (ground truth):
public void resolveStatements(){
  if (isAbstract()) {
    this.modifiers|=AccSemicolonBody;
  }
  if (binding == null || ignoreFurtherInvestigation)   return;
  if (Modifier.isAbstract(this.declaredModifiers) && (pointcutDesignator != null)) {
    scope.problemReporter().signalError(sourceStart,sourceEnd,"String_Node_Str");
  }
  if (pointcutDesignator != null) {
    pointcutDesignator.finishResolveTypes(this,this.binding,arguments.length,scope.enclosingSourceType());
  }
  super.resolveStatements();
}
Program: 9663
Project: 9663
Buggy source:
private static String getName(TypeBinding binding){
  String packageName=new String(binding.qualifiedPackageName());
  String className=new String(binding.qualifiedSourceName()).replace('.','$');
  if (packageName.length() > 0) {
    className=packageName + "String_Node_Str" + className;
  }
  return new String(className);
}

Fixed version (ground truth):
private static String getName(TypeBinding binding){
  if (binding instanceof ReferenceBinding) {
    return new String(CharOperation.concatWith(((ReferenceBinding)binding).compoundName,'.'));
  }
  String packageName=new String(binding.qualifiedPackageName());
  String className=new String(binding.qualifiedSourceName()).replace('.','$');
  if (packageName.length() > 0) {
    className=packageName + "String_Node_Str" + className;
  }
  return new String(className);
}
Program: 9664
Project: 9664
Buggy source:
private void doDeclareParents(DeclareParents declareParents,SourceTypeBinding sourceType){
  if (declareParents.match(factory.fromEclipse(sourceType))) {
    TypePatternList l=declareParents.getParents();
    for (int i=0, len=l.size(); i < len; i++) {
      addParent(declareParents,sourceType,l.get(i));
    }
  }
}

Fixed version (ground truth):
private void doDeclareParents(DeclareParents declareParents,SourceTypeBinding sourceType){
  List newParents=declareParents.findMatchingNewParents(factory.fromEclipse(sourceType));
  if (!newParents.isEmpty()) {
    for (Iterator i=newParents.iterator(); i.hasNext(); ) {
      ResolvedTypeX parent=(ResolvedTypeX)i.next();
      addParent(sourceType,parent);
    }
  }
}
Program: 9665
Project: 9665
Buggy source:
private void addParent(DeclareParents declareParents,SourceTypeBinding sourceType,TypePattern typePattern){
  if (typePattern == TypePattern.NO)   return;
  TypeX iType=typePattern.getExactType();
  ReferenceBinding b=(ReferenceBinding)factory.makeTypeBinding(iType);
  if (b.isClass()) {
    if (sourceType.isInterface()) {
      factory.showMessage(IMessage.ERROR,"String_Node_Str",declareParents.getSourceLocation(),null);
    }
    if (sourceType == b || sourceType.isSuperclassOf(b)) {
      factory.showMessage(IMessage.ERROR,"String_Node_Str",declareParents.getSourceLocation(),null);
      return;
    }
    sourceType.superclass=b;
  }
 else {
    if (sourceType.equals(b)) {
      return;
    }
    if (sourceType.isInterface() && b.implementsInterface(sourceType,true)) {
      factory.showMessage(IMessage.ERROR,"String_Node_Str",declareParents.getSourceLocation(),null);
      return;
    }
    if (sourceType == b || b.isSuperclassOf(sourceType))     return;
    ReferenceBinding[] oldI=sourceType.superInterfaces;
    ReferenceBinding[] newI;
    if (oldI == null) {
      newI=new ReferenceBinding[1];
      newI[0]=b;
    }
 else {
      int n=oldI.length;
      newI=new ReferenceBinding[n + 1];
      System.arraycopy(oldI,0,newI,0,n);
      newI[n]=b;
    }
    sourceType.superInterfaces=newI;
  }
}

Fixed version (ground truth):
private void addParent(SourceTypeBinding sourceType,ResolvedTypeX parent){
  ReferenceBinding parentBinding=(ReferenceBinding)factory.makeTypeBinding(parent);
  if (parentBinding.isClass()) {
    sourceType.superclass=parentBinding;
  }
 else {
    ReferenceBinding[] oldI=sourceType.superInterfaces;
    ReferenceBinding[] newI;
    if (oldI == null) {
      newI=new ReferenceBinding[1];
      newI[0]=parentBinding;
    }
 else {
      int n=oldI.length;
      newI=new ReferenceBinding[n + 1];
      System.arraycopy(oldI,0,newI,0,n);
      newI[n]=parentBinding;
    }
    sourceType.superInterfaces=newI;
  }
}
Program: 9666
Project: 9666
Buggy source:
public void testDeclareParentsFail() throws IOException {
  CommandTestCase.checkCompile("String_Node_Str",new int[]{3,11,19,21});
}

Fixed version (ground truth):
public void testDeclareParentsFail() throws IOException {
  CommandTestCase.checkCompile("String_Node_Str",new int[]{3,11,19});
}
Program: 9667
Project: 9667
Buggy source:
public void buildInterTypeAndPerClause(ClassScope classScope){
  checkSpec(classScope);
  if (ignoreFurtherInvestigation)   return;
  factory=EclipseFactory.fromScopeLookupEnvironment(scope);
  if (isPrivileged) {
    binding.privilegedHandler=new PrivilegedHandler(this);
  }
  buildPerClause(scope);
  if (methods != null) {
    for (int i=0; i < methods.length; i++) {
      if (methods[i] instanceof InterTypeDeclaration) {
        EclipseTypeMunger m=((InterTypeDeclaration)methods[i]).build(classScope);
        if (m != null)         concreteName.typeMungers.add(m);
      }
 else       if (methods[i] instanceof DeclareDeclaration) {
        Declare d=((DeclareDeclaration)methods[i]).build(classScope);
        if (d != null)         concreteName.declares.add(d);
      }
    }
  }
  factory.getWorld().getCrosscuttingMembersSet().addOrReplaceAspect(typeX);
  if (typeX.getSuperclass().isAspect() && !typeX.getSuperclass().isExposedToWeaver()) {
    factory.getWorld().getCrosscuttingMembersSet().addOrReplaceAspect(typeX.getSuperclass());
  }
}

Fixed version (ground truth):
public void buildInterTypeAndPerClause(ClassScope classScope){
  factory=EclipseFactory.fromScopeLookupEnvironment(scope);
  if (isPrivileged) {
    binding.privilegedHandler=new PrivilegedHandler(this);
  }
  checkSpec(classScope);
  if (ignoreFurtherInvestigation)   return;
  buildPerClause(scope);
  if (methods != null) {
    for (int i=0; i < methods.length; i++) {
      if (methods[i] instanceof InterTypeDeclaration) {
        EclipseTypeMunger m=((InterTypeDeclaration)methods[i]).build(classScope);
        if (m != null)         concreteName.typeMungers.add(m);
      }
 else       if (methods[i] instanceof DeclareDeclaration) {
        Declare d=((DeclareDeclaration)methods[i]).build(classScope);
        if (d != null)         concreteName.declares.add(d);
      }
    }
  }
  factory.getWorld().getCrosscuttingMembersSet().addOrReplaceAspect(typeX);
  if (typeX.getSuperclass().isAspect() && !typeX.getSuperclass().isExposedToWeaver()) {
    factory.getWorld().getCrosscuttingMembersSet().addOrReplaceAspect(typeX.getSuperclass());
  }
}
Program: 9668
Project: 9668
Buggy source:
private void makePublic(TypeBinding binding){
  if (binding instanceof ReferenceBinding) {
    ReferenceBinding rb=(ReferenceBinding)binding;
    if (!rb.isPublic())     handler.notePrivilegedTypeAccess(rb,null);
  }
 else   if (binding instanceof ArrayBinding) {
    makePublic(((ArrayBinding)binding).leafComponentType);
  }
 else {
    return;
  }
}

Fixed version (ground truth):
private void makePublic(TypeBinding binding){
  if (binding == null || !binding.isValidBinding())   return;
  if (binding instanceof ReferenceBinding) {
    ReferenceBinding rb=(ReferenceBinding)binding;
    if (!rb.isPublic())     handler.notePrivilegedTypeAccess(rb,null);
  }
 else   if (binding instanceof ArrayBinding) {
    makePublic(((ArrayBinding)binding).leafComponentType);
  }
 else {
    return;
  }
}
Program: 9669
Project: 9669
Buggy source:
public EclipseTypeMunger build(ClassScope classScope){
  EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  resolveOnType(classScope);
  if (classScope.referenceContext.binding == null)   return null;
  binding=classScope.referenceContext.binding.resolveTypesFor(binding);
  if (ignoreFurtherInvestigation)   return null;
  if (!Modifier.isStatic(declaredModifiers)) {
    super.binding.parameters=new TypeBinding[]{onTypeBinding};
    this.arguments=new Argument[]{AstUtil.makeFinalArgument("String_Node_Str".toCharArray(),onTypeBinding)};
  }
  ResolvedMember sig=new ResolvedMember(Member.FIELD,EclipseFactory.fromBinding(onTypeBinding),declaredModifiers,EclipseFactory.fromBinding(binding.returnType),new String(declaredSelector),TypeX.NONE);
  NewFieldTypeMunger myMunger=new NewFieldTypeMunger(sig,null);
  setMunger(myMunger);
  ResolvedTypeX aspectType=world.fromEclipse(classScope.referenceContext.binding);
  ResolvedMember me=myMunger.getInitMethod(aspectType);
  this.selector=binding.selector=me.getName().toCharArray();
  this.binding.returnType=TypeBinding.VoidBinding;
  return new EclipseTypeMunger(world,myMunger,aspectType,this);
}

Fixed version (ground truth):
public EclipseTypeMunger build(ClassScope classScope){
  EclipseFactory world=EclipseFactory.fromScopeLookupEnvironment(classScope);
  resolveOnType(classScope);
  if (ignoreFurtherInvestigation)   return null;
  binding=classScope.referenceContext.binding.resolveTypesFor(binding);
  if (ignoreFurtherInvestigation)   return null;
  if (!Modifier.isStatic(declaredModifiers)) {
    super.binding.parameters=new TypeBinding[]{onTypeBinding};
    this.arguments=new Argument[]{AstUtil.makeFinalArgument("String_Node_Str".toCharArray(),onTypeBinding)};
  }
  ResolvedMember sig=new ResolvedMember(Member.FIELD,EclipseFactory.fromBinding(onTypeBinding),declaredModifiers,EclipseFactory.fromBinding(binding.returnType),new String(declaredSelector),TypeX.NONE);
  NewFieldTypeMunger myMunger=new NewFieldTypeMunger(sig,null);
  setMunger(myMunger);
  ResolvedTypeX aspectType=world.fromEclipse(classScope.referenceContext.binding);
  ResolvedMember me=myMunger.getInitMethod(aspectType);
  this.selector=binding.selector=me.getName().toCharArray();
  this.binding.returnType=TypeBinding.VoidBinding;
  return new EclipseTypeMunger(world,myMunger,aspectType,this);
}
Program: 9670
Project: 9670
Buggy source:
public EclipseTypeMunger makeEclipseTypeMunger(ConcreteTypeMunger concrete){
  if (concrete instanceof EclipseTypeMunger)   return (EclipseTypeMunger)concrete;
  if (EclipseTypeMunger.supportsKind(concrete.getMunger().getKind())) {
    return new EclipseTypeMunger(this,concrete.getMunger(),concrete.getAspectType(),null);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public EclipseTypeMunger makeEclipseTypeMunger(ConcreteTypeMunger concrete){
  if (concrete instanceof EclipseTypeMunger)   return (EclipseTypeMunger)concrete;
  if (concrete.getMunger() != null && EclipseTypeMunger.supportsKind(concrete.getMunger().getKind())) {
    return new EclipseTypeMunger(this,concrete.getMunger(),concrete.getAspectType(),null);
  }
 else {
    return null;
  }
}
Program: 9672
Project: 9672
Buggy source:
public EclipseShadow(EclipseFactory world,Kind kind,Member signature,AstNode astNode,ReferenceContext context){
  super(kind,signature,null);
  this.world=world;
  this.astNode=astNode;
  this.enclosingMethod=(AbstractMethodDeclaration)context;
}

Fixed version (ground truth):
public EclipseShadow(EclipseFactory world,Kind kind,Member signature,AstNode astNode,ReferenceContext context){
  super(kind,signature,null);
  this.world=world;
  this.astNode=astNode;
  this.context=context;
}
Program: 9673
Project: 9673
Buggy source:
public Member getEnclosingCodeSignature(){
  return world.makeResolvedMember(enclosingMethod.binding);
}

Fixed version (ground truth):
public Member getEnclosingCodeSignature(){
  if (context instanceof TypeDeclaration) {
    return new Member(Member.STATIC_INITIALIZATION,getEnclosingType(),0,ResolvedTypeX.VOID,"String_Node_Str",TypeX.NONE);
  }
 else   if (context instanceof AbstractMethodDeclaration) {
    return world.makeResolvedMember(((AbstractMethodDeclaration)context).binding);
  }
 else {
    return null;
  }
}
Program: 9674
Project: 9674
Buggy source:
public TypeX getEnclosingType(){
  return world.fromBinding(enclosingMethod.binding.declaringClass);
}

Fixed version (ground truth):
public TypeX getEnclosingType(){
  if (context instanceof TypeDeclaration) {
    return world.fromBinding(((TypeDeclaration)context).binding);
  }
 else   if (context instanceof AbstractMethodDeclaration) {
    return world.fromBinding(((AbstractMethodDeclaration)context).binding.declaringClass);
  }
 else {
    return ResolvedTypeX.MISSING;
  }
}
Program: 9675
Project: 9675
Buggy source:
public void unhandledException(TypeBinding exceptionType,AstNode location){
  if (!world.getWorld().getDeclareSoft().isEmpty()) {
    Shadow callSite=world.makeShadow(location,referenceContext);
    if (callSite == null) {
      super.unhandledException(exceptionType,location);
      return;
    }
    Shadow enclosingExec=world.makeShadow(referenceContext);
    for (Iterator i=world.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
      DeclareSoft d=(DeclareSoft)i.next();
      FuzzyBoolean match=d.getPointcut().match(callSite);
      if (match.alwaysTrue()) {
        return;
      }
 else       if (!match.alwaysFalse()) {
        throw new RuntimeException("String_Node_Str");
      }
      match=d.getPointcut().match(enclosingExec);
      if (match.alwaysTrue()) {
        return;
      }
 else       if (!match.alwaysFalse()) {
        throw new RuntimeException("String_Node_Str");
      }
    }
  }
  if (location instanceof Proceed) {
    return;
  }
  super.unhandledException(exceptionType,location);
}

Fixed version (ground truth):
public void unhandledException(TypeBinding exceptionType,AstNode location){
  if (!world.getWorld().getDeclareSoft().isEmpty()) {
    Shadow callSite=world.makeShadow(location,referenceContext);
    Shadow enclosingExec=world.makeShadow(referenceContext);
    for (Iterator i=world.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
      DeclareSoft d=(DeclareSoft)i.next();
      if (callSite != null) {
        FuzzyBoolean match=d.getPointcut().match(callSite);
        if (match.alwaysTrue()) {
          return;
        }
 else         if (!match.alwaysFalse()) {
        }
      }
      if (enclosingExec != null) {
        FuzzyBoolean match=d.getPointcut().match(enclosingExec);
        if (match.alwaysTrue()) {
          return;
        }
 else         if (!match.alwaysFalse()) {
        }
      }
    }
  }
  if (location instanceof Proceed) {
    return;
  }
  super.unhandledException(exceptionType,location);
}
Program: 9676
Project: 9676
Buggy source:
public SourceLocation getSourceLocation(){
  return null;
}

Fixed version (ground truth):
public ISourceLocation getSourceLocation(){
  return null;
}
Program: 9677
Project: 9677
Buggy source:
public EclipseSourceType(ResolvedTypeX.Name resolvedTypeX,EclipseFactory factory,SourceTypeBinding binding,TypeDeclaration declaration){
  super(resolvedTypeX,true);
  this.factory=factory;
  this.binding=binding;
  this.declaration=declaration;
}

Fixed version (ground truth):
public EclipseSourceType(ResolvedTypeX.Name resolvedTypeX,EclipseFactory factory,SourceTypeBinding binding,TypeDeclaration declaration){
  super(resolvedTypeX,true);
  this.factory=factory;
  this.binding=binding;
  this.declaration=declaration;
  resolvedTypeX.setSourceContext(new EclipseSourceContext(declaration.compilationResult));
  resolvedTypeX.setStartPos(declaration.sourceStart);
  resolvedTypeX.setEndPos(declaration.sourceEnd);
}
Program: 9678
Project: 9678
Buggy source:
public ISourceLocation makeSourceLocation(IHasPosition position){
  return new EclipseSourceLocation(result,position.getStart(),position.getEnd());
}

Fixed version (ground truth):
public ISourceLocation makeSourceLocation(int line){
  return new SourceLocation(getSourceFile(),line);
}
Program: 9679
Project: 9679
Buggy source:
/** 
 * @param file File of the source; if null, use ISourceLocation.NO_FILE, not null
 * @param line int starting line of the location - positive number
 * @param endLine int ending line of the location - <= starting line
 * @param column int character position of starting location - positive number
 */
public SourceLocation(File file,int line,int endLine,int column){
  if (column == NO_COLUMN) {
    column=0;
    noColumn=true;
  }
  if (null == file) {
    file=ISourceLocation.NO_FILE;
  }
  validLine(line);
  validLine(endLine);
  LangUtil.throwIaxIfFalse(line <= endLine,line + "String_Node_Str" + endLine);
  LangUtil.throwIaxIfFalse(column >= 0,"String_Node_Str" + column);
  this.sourceFile=file;
  this.startLine=line;
  this.column=column;
  this.endLine=endLine;
}

Fixed version (ground truth):
public SourceLocation(File file,int line,int endLine,int column,String context){
  if (column == NO_COLUMN) {
    column=0;
    noColumn=true;
  }
  if (null == file) {
    file=ISourceLocation.NO_FILE;
  }
  validLine(line);
  validLine(endLine);
  LangUtil.throwIaxIfFalse(line <= endLine,line + "String_Node_Str" + endLine);
  LangUtil.throwIaxIfFalse(column >= 0,"String_Node_Str" + column);
  this.sourceFile=file;
  this.startLine=line;
  this.column=column;
  this.endLine=endLine;
  this.context=context;
}
Program: 9680
Project: 9680
Buggy source:
/** 
 * @return String {file:}line{:column} 
 */
public String toString(){
  StringBuffer sb=new StringBuffer();
  if (sourceFile != ISourceLocation.NO_FILE) {
    sb.append(sourceFile.getPath());
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str" + startLine + "String_Node_Str"+ endLine);
  if (!noColumn) {
    sb.append("String_Node_Str" + column);
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * @return String {context\n}{file:}line{:column} 
 */
public String toString(){
  StringBuffer sb=new StringBuffer();
  if (null != context) {
    sb.append(context);
    sb.append(LangUtil.EOL);
  }
  if (sourceFile != ISourceLocation.NO_FILE) {
    sb.append(sourceFile.getPath());
    sb.append("String_Node_Str");
  }
  sb.append("String_Node_Str" + startLine + "String_Node_Str"+ endLine);
  if (!noColumn) {
    sb.append("String_Node_Str" + column);
  }
  return sb.toString();
}
Program: 9681
Project: 9681
Buggy source:
public int getEndLine(){
  return getLine();
}

Fixed version (ground truth):
public int getEndLine(){
  if (-1 == endLine) {
    endLine=ProblemHandler.searchLineNumber(result.lineSeparatorPositions,endPos);
  }
  return endLine;
}
Program: 9682
Project: 9682
Buggy source:
public File getSourceFile(){
  return new File(new String(result.fileName));
}

Fixed version (ground truth):
public File getSourceFile(){
  if (null == file) {
    file=new File(new String(result.fileName));
  }
  return file;
}
Program: 9683
Project: 9683
Buggy source:
public int getLine(){
  return ProblemHandler.searchLineNumber(result.lineSeparatorPositions,startPos);
}

Fixed version (ground truth):
public int getLine(){
  if (-1 == startLine) {
    startLine=ProblemHandler.searchLineNumber(result.lineSeparatorPositions,startPos);
  }
  return startLine;
}
Program: 9684
Project: 9684
Buggy source:
public int getColumn(){
  return 0;
}

Fixed version (ground truth):
public int getColumn(){
  if (-1 == column) {
    int lineNumber=getLine();
    if (0 < lineNumber) {
      int lineStart=result.lineSeparatorPositions[getLine()];
      int col=startPos - lineStart;
      if (0 <= col) {
        column=col;
      }
 else {
        column=0;
      }
    }
  }
  return column;
}
Program: 9685
Project: 9685
Buggy source:
/** 
 * This renders entire message text, but also sets up source location 
 */
public static IMessage makeMessage(ICompilationUnit unit,IProblem problem){
  ISourceLocation sourceLocation=makeSourceLocation(unit,problem);
  String locationContext=makeLocationContext(unit,problem);
  StringBuffer mssg=new StringBuffer();
  mssg.append(problem.getOriginatingFileName());
  mssg.append("String_Node_Str" + problem.getSourceLineNumber());
  mssg.append("String_Node_Str");
  mssg.append(problem.getMessage());
  mssg.append(LangUtil.EOL);
  mssg.append(locationContext);
  return new Message(mssg.toString(),sourceLocation,problem.isError());
}

Fixed version (ground truth):
/** 
 * Extract message text and source location, including context. 
 */
public static IMessage makeMessage(ICompilationUnit unit,IProblem problem){
  ISourceLocation sourceLocation=makeSourceLocation(unit,problem);
  return new Message(problem.getMessage(),sourceLocation,problem.isError());
}
Program: 9686
Project: 9686
Buggy source:
public static ISourceLocation makeSourceLocation(ICompilationUnit unit,IProblem problem){
  int line=problem.getSourceLineNumber();
  File file=new File(new String(problem.getOriginatingFileName()));
  return new SourceLocation(file,line,line,0);
}

Fixed version (ground truth):
/** 
 * Extract source location file, start and end lines, and context. Column is not extracted correctly.
 * @return ISourceLocation with correct file and lines but not column.
 */
public static ISourceLocation makeSourceLocation(ICompilationUnit unit,IProblem problem){
  int line=problem.getSourceLineNumber();
  File file=new File(new String(problem.getOriginatingFileName()));
  String context=makeLocationContext(unit,problem);
  return new SourceLocation(file,line,line,0,context);
}
Program: 9687
Project: 9687
Buggy source:
protected String render(IMessage message){
  IMessage.Kind kind=message.getKind();
  if (kind.equals(IMessage.ABORT)) {
    Throwable t=message.getThrown();
    if (null == t) {
      return "String_Node_Str";
    }
 else {
      return Main.renderExceptionForUser(t);
    }
  }
  String m=message.getMessage();
  if (LangUtil.isEmpty(m)) {
    m=message.toString();
  }
  return m;
}

Fixed version (ground truth):
/** 
 * Render message differently. If abort, then prefix stack trace with feedback request. If the actual message is empty, then use toString on the whole. Prefix message part with file:line; If it has context, suffix message with context.
 * @param message the IMessage to render
 * @return String rendering IMessage (never null)
 */
protected String render(IMessage message){
  IMessage.Kind kind=message.getKind();
  if (kind.equals(IMessage.ABORT)) {
    Throwable t=message.getThrown();
    if (null == t) {
      return "String_Node_Str";
    }
 else {
      return Main.renderExceptionForUser(t);
    }
  }
  StringBuffer sb=new StringBuffer();
  String text=message.getMessage();
  boolean toString=(LangUtil.isEmpty(text));
  if (toString) {
    text=message.toString();
  }
  ISourceLocation loc=message.getISourceLocation();
  String context=null;
  if (null != loc) {
    File file=loc.getSourceFile();
    if (null != file) {
      String name=file.getName();
      if (!toString || (-1 == text.indexOf(name))) {
        sb.append(FileUtil.getBestPath(file));
        sb.append("String_Node_Str" + loc.getLine());
        int col=loc.getColumn();
        if (0 < col) {
          sb.append("String_Node_Str" + col);
        }
        sb.append("String_Node_Str");
      }
    }
    context=loc.getContext();
  }
  sb.append(text);
  if (null != context) {
    sb.append(LangUtil.EOL);
    sb.append(context);
  }
  return sb.toString();
}
Program: 9688
Project: 9688
Buggy source:
public BinaryMethodSkeleton(char[] selector,char[] methodDescriptor,char[][] exceptionTypeNames,boolean isConstructor){
  this.selector=selector;
  this.methodDescriptor=methodDescriptor;
  this.exceptionTypeNames=exceptionTypeNames;
  this.isConstructor=isConstructor;
}

Fixed version (ground truth):
public BinaryMethodSkeleton(char[] selector,char[] methodDescriptor,char[][] exceptionTypeNames,boolean isConstructor){
  this.selector=selector;
  this.methodDescriptor=methodDescriptor;
  this.exceptionTypeNames=exceptionTypeNames;
  this.isConstructor=this.isConstructor;
}
Program: 9689
Project: 9689
Buggy source:
/** 
 * @param sourceFilePath	modified to '/' delimited path for consistency
 * @return		a new structure node for the file if it was not found in the model
 */
public StructureNode findRootNodeForSourceFile(String sourceFilePath){
  if (!isValid() || sourceFilePath == null) {
    return StructureModel.NO_STRUCTURE;
  }
 else {
    String correctedPath=sourceFilePath;
    StructureNode node=(StructureNode)getFileMap().get(correctedPath);
    if (node != null) {
      return node;
    }
 else {
      return createFileStructureNode(sourceFilePath);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param sourceFilePath	modified to '/' delimited path for consistency
 * @return		a new structure node for the file if it was not found in the model
 */
public StructureNode findRootNodeForSourceFile(String sourceFile){
  try {
    if (!isValid() || sourceFile == null) {
      return StructureModel.NO_STRUCTURE;
    }
 else {
      String correctedPath=new File(sourceFile).getCanonicalPath();
      StructureNode node=(StructureNode)getFileMap().get(correctedPath);
      if (node != null) {
        return node;
      }
 else {
        return createFileStructureNode(correctedPath);
      }
    }
  }
 catch (  Exception e) {
    return StructureModel.NO_STRUCTURE;
  }
}
Program: 9692
Project: 9692
Buggy source:
private AjAttribute makeAttribute(EclipseWorld world){
  if (explicitConstructorCall != null && !(explicitConstructorCall.binding instanceof ProblemMethodBinding)) {
    MethodBinding explicitConstructor=explicitConstructorCall.binding;
    if (explicitConstructor.alwaysNeedsAccessMethod()) {
      explicitConstructor=explicitConstructor.getAccessMethod();
    }
    ((NewConstructorTypeMunger)munger).setExplicitConstructor(world.makeResolvedMember(explicitConstructor));
  }
 else {
    ((NewConstructorTypeMunger)munger).setExplicitConstructor(new ResolvedMember(Member.CONSTRUCTOR,EclipseWorld.fromBinding(onTypeBinding.superclass()),0,ResolvedTypeX.VOID,"String_Node_Str",TypeX.NONE));
  }
  return new AjAttribute.TypeMunger(munger);
}

Fixed version (ground truth):
private AjAttribute makeAttribute(EclipseWorld world){
  if (explicitConstructorCall != null && !(explicitConstructorCall.binding instanceof ProblemMethodBinding)) {
    MethodBinding explicitConstructor=explicitConstructorCall.binding;
    if (explicitConstructor.alwaysNeedsAccessMethod()) {
      explicitConstructor=explicitConstructor.getAccessMethod(true);
    }
    ((NewConstructorTypeMunger)munger).setExplicitConstructor(world.makeResolvedMember(explicitConstructor));
  }
 else {
    ((NewConstructorTypeMunger)munger).setExplicitConstructor(new ResolvedMember(Member.CONSTRUCTOR,EclipseWorld.fromBinding(onTypeBinding.superclass()),0,ResolvedTypeX.VOID,"String_Node_Str",TypeX.NONE));
  }
  return new AjAttribute.TypeMunger(munger);
}
Program: 9693
Project: 9693
Buggy source:
public void endVisit(MessageSend call,BlockScope scope){
  if (call.codegenBinding == null)   return;
  MethodBinding superBinding=call.codegenBinding;
  if (superBinding instanceof ProblemMethodBinding) {
    return;
  }
  char[] accessName;
  if (call.isSuperAccess() && !call.binding.isStatic()) {
    call.receiver=new ThisReference();
    accessName=NameMangler.superDispatchMethod(EclipseWorld.fromBinding(targetClass),new String(superBinding.selector)).toCharArray();
  }
 else   if (call.receiver.isThis() && call.binding.isProtected() && !call.binding.isStatic()) {
    if (superBinding.declaringClass.equals(targetClass)) {
      accessName=NameMangler.protectedDispatchMethod(EclipseWorld.fromBinding(targetClass),new String(superBinding.selector)).toCharArray();
    }
 else {
      accessName=NameMangler.superDispatchMethod(EclipseWorld.fromBinding(targetClass),new String(superBinding.selector)).toCharArray();
    }
  }
 else {
    return;
  }
  MethodBinding superAccessBinding=new MethodBinding(AstNode.AccPublic,accessName,superBinding.returnType,superBinding.parameters,superBinding.thrownExceptions,targetClass);
  call.codegenBinding=superAccessBinding;
  ResolvedMember targetMember=EclipseWorld.makeResolvedMember(superBinding);
  superMethodsCalled.add(targetMember);
}

Fixed version (ground truth):
public void endVisit(MessageSend call,BlockScope scope){
  if (call.codegenBinding == null)   return;
  MethodBinding superBinding=call.codegenBinding;
  if (superBinding instanceof ProblemMethodBinding) {
    return;
  }
  if (superBinding instanceof InterTypeMethodBinding) {
    return;
  }
  char[] accessName;
  if (call.isSuperAccess() && !call.binding.isStatic()) {
    call.receiver=new ThisReference();
    accessName=NameMangler.superDispatchMethod(EclipseWorld.fromBinding(targetClass),new String(superBinding.selector)).toCharArray();
  }
 else   if (call.receiver.isThis() && call.binding.isProtected() && !call.binding.isStatic()) {
    if (superBinding.declaringClass.equals(targetClass)) {
      accessName=NameMangler.protectedDispatchMethod(EclipseWorld.fromBinding(targetClass),new String(superBinding.selector)).toCharArray();
    }
 else {
      accessName=NameMangler.superDispatchMethod(EclipseWorld.fromBinding(targetClass),new String(superBinding.selector)).toCharArray();
    }
  }
 else {
    return;
  }
  MethodBinding superAccessBinding=new MethodBinding(AstNode.AccPublic,accessName,superBinding.returnType,superBinding.parameters,superBinding.thrownExceptions,targetClass);
  call.codegenBinding=superAccessBinding;
  ResolvedMember targetMember=EclipseWorld.makeResolvedMember(superBinding);
  superMethodsCalled.add(targetMember);
}
Program: 9694
Project: 9694
Buggy source:
public MethodBinding getAccessMethod(){
  return syntheticMethod;
}

Fixed version (ground truth):
public MethodBinding getAccessMethod(boolean staticReference){
  if (staticReference)   return postDispatchMethod;
 else   return syntheticMethod;
}
Program: 9695
Project: 9695
Buggy source:
public InterTypeMethodBinding(EclipseWorld world,ResolvedMember signature,TypeX withinType,AbstractMethodDeclaration sourceMethod){
  super(world.makeMethodBinding(signature),null);
  this.sourceMethod=sourceMethod;
  targetType=(ReferenceBinding)world.makeTypeBinding(signature.getDeclaringType());
  this.declaringClass=(ReferenceBinding)world.makeTypeBinding(withinType);
  if (signature.getKind() == Member.METHOD) {
    syntheticMethod=world.makeMethodBinding(AjcMemberMaker.interMethodDispatcher(signature,withinType));
  }
 else {
    syntheticMethod=world.makeMethodBinding(AjcMemberMaker.interConstructor(world.resolve(signature.getDeclaringType()),signature,withinType));
  }
}

Fixed version (ground truth):
public InterTypeMethodBinding(EclipseWorld world,ResolvedMember signature,TypeX withinType,AbstractMethodDeclaration sourceMethod){
  super(world.makeMethodBinding(signature),null);
  this.sourceMethod=sourceMethod;
  targetType=(ReferenceBinding)world.makeTypeBinding(signature.getDeclaringType());
  this.declaringClass=(ReferenceBinding)world.makeTypeBinding(withinType);
  if (signature.getKind() == Member.METHOD) {
    syntheticMethod=world.makeMethodBinding(AjcMemberMaker.interMethodDispatcher(signature,withinType));
    postDispatchMethod=world.makeMethodBinding(AjcMemberMaker.interMethodBody(signature,withinType));
  }
 else {
    syntheticMethod=world.makeMethodBinding(AjcMemberMaker.interConstructor(world.resolve(signature.getDeclaringType()),signature,withinType));
    postDispatchMethod=syntheticMethod;
  }
}
Program: 9696
Project: 9696
Buggy source:
public void manageSyntheticAccessIfNecessary(BlockScope currentScope){
  if (binding.alwaysNeedsAccessMethod()) {
    syntheticAccessor=binding.getAccessMethod();
    return;
  }
  if (binding.isPrivate() && (currentScope.enclosingSourceType() != binding.declaringClass)) {
    if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {
      binding.tagForClearingPrivateModifier();
    }
 else {
      syntheticAccessor=((SourceTypeBinding)binding.declaringClass).addSyntheticMethod(binding);
      currentScope.problemReporter().needToEmulateMethodAccess(binding,this);
    }
  }
}

Fixed version (ground truth):
public void manageSyntheticAccessIfNecessary(BlockScope currentScope){
  if (binding.alwaysNeedsAccessMethod()) {
    syntheticAccessor=binding.getAccessMethod(true);
    return;
  }
  if (binding.isPrivate() && (currentScope.enclosingSourceType() != binding.declaringClass)) {
    if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {
      binding.tagForClearingPrivateModifier();
    }
 else {
      syntheticAccessor=((SourceTypeBinding)binding.declaringClass).addSyntheticMethod(binding);
      currentScope.problemReporter().needToEmulateMethodAccess(binding,this);
    }
  }
}
Program: 9697
Project: 9697
Buggy source:
public void manageSyntheticAccessIfNecessary(BlockScope currentScope){
  if (binding.alwaysNeedsAccessMethod()) {
    syntheticAccessor=binding.getAccessMethod();
    return;
  }
  if (binding.isPrivate() && (accessMode != This)) {
    if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {
      binding.tagForClearingPrivateModifier();
    }
 else {
      syntheticAccessor=((SourceTypeBinding)binding.declaringClass).addSyntheticMethod(binding);
      currentScope.problemReporter().needToEmulateMethodAccess(binding,this);
    }
  }
}

Fixed version (ground truth):
public void manageSyntheticAccessIfNecessary(BlockScope currentScope){
  if (binding.alwaysNeedsAccessMethod()) {
    syntheticAccessor=binding.getAccessMethod(true);
    return;
  }
  if (binding.isPrivate() && (accessMode != This)) {
    if (currentScope.environment().options.isPrivateConstructorAccessChangingVisibility) {
      binding.tagForClearingPrivateModifier();
    }
 else {
      syntheticAccessor=((SourceTypeBinding)binding.declaringClass).addSyntheticMethod(binding);
      currentScope.problemReporter().needToEmulateMethodAccess(binding,this);
    }
  }
}
Program: 9699
Project: 9699
Buggy source:
/** 
 * This will only be called if alwaysNeedsAccessMethod() returns true. In that case it should return the access method to be used.
 */
public MethodBinding getAccessMethod(){
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * This will only be called if alwaysNeedsAccessMethod() returns true. In that case it should return the access method to be used.
 */
public MethodBinding getAccessMethod(boolean staticReference){
  throw new RuntimeException("String_Node_Str");
}
Program: 9700
Project: 9700
Buggy source:
public void endVisit(SingleNameReference ref,BlockScope scope){
  if (isRef(ref,thisJoinPointDec))   needsDynamic=true;
 else   if (isRef(ref,thisJoinPointStaticPartDec))   needsStatic=true;
 else   if (isRef(ref,thisEnclosingJoinPointStaticPartDec))   needsStaticEnclosing=true;
}

Fixed version (ground truth):
public void endVisit(SingleNameReference ref,BlockScope scope){
  if (isRef(ref,thisJoinPointDec)) {
    needsDynamic=true;
  }
 else   if (isRef(ref,thisJoinPointStaticPartDec)) {
    needsStatic=true;
  }
 else   if (isRef(ref,thisEnclosingJoinPointStaticPartDec)) {
    needsStaticEnclosing=true;
  }
}