Program: 185475
Project: 185475
Buggy source:
protected void process(PossibleMatch possibleMatch,boolean bindingsWereCreated) throws CoreException {
  if (possibleMatch.isInterestingSourceFile()) {
    try {
      this.lookupEnvironment.buildTypeBindings(possibleMatch.parsedUnit,null);
    }
 catch (    Throwable t) {
      t.printStackTrace();
    }
    possibleMatch.parsedUnit.resolve();
    return;
  }
  this.currentPossibleMatch=possibleMatch;
  CompilationUnitDeclaration unit=possibleMatch.parsedUnit;
  try {
    if (unit.isEmpty()) {
      if (this.currentPossibleMatch.openable instanceof ClassFile) {
        ClassFile classFile=(ClassFile)this.currentPossibleMatch.openable;
        IBinaryType info=null;
        try {
          info=getBinaryInfo(classFile,classFile.resource());
        }
 catch (        CoreException ce) {
        }
        if (info != null) {
          boolean mayBeGeneric=this.patternLocator.mayBeGeneric;
          this.patternLocator.mayBeGeneric=false;
          try {
            new ClassFileMatchLocator().locateMatches(this,classFile,info);
          }
  finally {
            this.patternLocator.mayBeGeneric=mayBeGeneric;
          }
        }
      }
 else       if (this.currentPossibleMatch.openable instanceof ModularClassFile && unit.moduleDeclaration == null) {
        boolean mayBeGeneric=this.patternLocator.mayBeGeneric;
        this.patternLocator.mayBeGeneric=false;
        try {
          new ModularClassFileMatchLocator().locateMatches(this,(ModularClassFile)this.currentPossibleMatch.openable);
        }
  finally {
          this.patternLocator.mayBeGeneric=mayBeGeneric;
        }
        return;
      }
      if (!unit.isModuleInfo())       return;
    }
    if (hasAlreadyDefinedType(unit))     return;
    boolean mustResolve=(this.pattern.mustResolve || possibleMatch.nodeSet.mustResolve);
    if (bindingsWereCreated && mustResolve) {
      if (unit.types != null) {
        if (BasicSearchEngine.VERBOSE)         System.out.println("String_Node_Str" + this.currentPossibleMatch.openable.toStringWithAncestors());
        this.lookupEnvironment.unitBeingCompleted=unit;
        reduceParseTree(unit);
        if (unit.scope != null) {
          unit.scope.faultInTypes();
        }
        unit.resolve();
      }
 else       if (unit.isPackageInfo()) {
        if (BasicSearchEngine.VERBOSE)         System.out.println("String_Node_Str" + this.currentPossibleMatch.openable.toStringWithAncestors());
        unit.resolve();
      }
 else       if (unit.isModuleInfo()) {
        if (BasicSearchEngine.VERBOSE)         System.out.println("String_Node_Str" + this.currentPossibleMatch.openable.toStringWithAncestors());
        this.lookupEnvironment.unitBeingCompleted=unit;
        if (unit.scope != null && unit.moduleDeclaration != null) {
          unit.moduleDeclaration.resolveTypeDirectives(unit.scope);
        }
      }
    }
    reportMatching(unit,mustResolve);
  }
 catch (  AbortCompilation e) {
    if (BasicSearchEngine.VERBOSE) {
      System.out.println("String_Node_Str" + String.valueOf(unit.getFileName()));
      e.printStackTrace();
    }
    reportMatching(unit,false);
    if (!(e instanceof AbortCompilationUnit)) {
      throw e;
    }
  }
 finally {
    this.lookupEnvironment.unitBeingCompleted=null;
    this.currentPossibleMatch=null;
  }
}

Fixed version (ground truth):
protected void process(PossibleMatch possibleMatch,boolean bindingsWereCreated) throws CoreException {
  if (possibleMatch.isInterestingSourceFile()) {
    return;
  }
  this.currentPossibleMatch=possibleMatch;
  CompilationUnitDeclaration unit=possibleMatch.parsedUnit;
  try {
    if (unit.isEmpty()) {
      if (this.currentPossibleMatch.openable instanceof ClassFile) {
        ClassFile classFile=(ClassFile)this.currentPossibleMatch.openable;
        IBinaryType info=null;
        try {
          info=getBinaryInfo(classFile,classFile.resource());
        }
 catch (        CoreException ce) {
        }
        if (info != null) {
          boolean mayBeGeneric=this.patternLocator.mayBeGeneric;
          this.patternLocator.mayBeGeneric=false;
          try {
            new ClassFileMatchLocator().locateMatches(this,classFile,info);
          }
  finally {
            this.patternLocator.mayBeGeneric=mayBeGeneric;
          }
        }
      }
 else       if (this.currentPossibleMatch.openable instanceof ModularClassFile && unit.moduleDeclaration == null) {
        boolean mayBeGeneric=this.patternLocator.mayBeGeneric;
        this.patternLocator.mayBeGeneric=false;
        try {
          new ModularClassFileMatchLocator().locateMatches(this,(ModularClassFile)this.currentPossibleMatch.openable);
        }
  finally {
          this.patternLocator.mayBeGeneric=mayBeGeneric;
        }
        return;
      }
      if (!unit.isModuleInfo())       return;
    }
    if (hasAlreadyDefinedType(unit))     return;
    boolean mustResolve=(this.pattern.mustResolve || possibleMatch.nodeSet.mustResolve);
    if (bindingsWereCreated && mustResolve) {
      if (unit.types != null) {
        if (BasicSearchEngine.VERBOSE)         System.out.println("String_Node_Str" + this.currentPossibleMatch.openable.toStringWithAncestors());
        this.lookupEnvironment.unitBeingCompleted=unit;
        reduceParseTree(unit);
        if (unit.scope != null) {
          unit.scope.faultInTypes();
        }
        unit.resolve();
      }
 else       if (unit.isPackageInfo()) {
        if (BasicSearchEngine.VERBOSE)         System.out.println("String_Node_Str" + this.currentPossibleMatch.openable.toStringWithAncestors());
        unit.resolve();
      }
 else       if (unit.isModuleInfo()) {
        if (BasicSearchEngine.VERBOSE)         System.out.println("String_Node_Str" + this.currentPossibleMatch.openable.toStringWithAncestors());
        this.lookupEnvironment.unitBeingCompleted=unit;
        if (unit.scope != null && unit.moduleDeclaration != null) {
          unit.moduleDeclaration.resolveTypeDirectives(unit.scope);
        }
      }
    }
    reportMatching(unit,mustResolve);
  }
 catch (  AbortCompilation e) {
    if (BasicSearchEngine.VERBOSE) {
      System.out.println("String_Node_Str" + String.valueOf(unit.getFileName()));
      e.printStackTrace();
    }
    reportMatching(unit,false);
    if (!(e instanceof AbortCompilationUnit)) {
      throw e;
    }
  }
 finally {
    this.lookupEnvironment.unitBeingCompleted=null;
    this.currentPossibleMatch=null;
  }
}