Buggy code:
public class SelectionRequestor implements ISelectionRequestor { protected NameLookup fNameLookup = null ; protected IJavaElement fCodeResolve ; protected IJavaElement [ ] fElements = SelectionRequestor . fgEmptyElements ; protected static IJavaElement [ ] fgEmptyElements = new IJavaElement [ ] { } ; public SelectionRequestor ( NameLookup nameLookup , IJavaElement codeResolve ) { } protected void acceptBinaryMethod ( IType type , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames ) { } public void acceptClass ( char [ ] packageName , char [ ] className , boolean needQualification ) { } public void acceptError ( IProblem error ) { } public void acceptField ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] name ) { } public void acceptInterface ( char [ ] packageName , char [ ] interfaceName , boolean needQualification ) { } public void acceptMethod ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , boolean isConstructor ) { } public void acceptPackage ( char [ ] packageName ) { } protected void acceptSourceMethod ( IType type , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames ) { } protected void acceptType ( char [ ] packageName , char [ ] typeName , int acceptFlags , boolean needQualification ) { } public IJavaElement [ ] getElements ( ) { } protected IJavaElement [ ] growAndAddToArray ( IJavaElement [ ] array , IJavaElement addition ) { } protected IType resolveType ( char [ ] packageName , char [ ] typeName , int acceptFlags ) { IType type = null ; if ( ( fCodeResolve ) instanceof WorkingCopy ) { WorkingCopy wc = ( ( WorkingCopy ) ( fCodeResolve ) ) ; try { if ( ( ( ( packageName == null ) || ( ( packageName . length ) == 0 ) ) && ( ( wc . getPackageDeclarations ( ) . length ) == 0 ) ) || ( ( ! ( ( packageName == null ) || ( ( packageName . length ) == 0 ) ) ) && ( wc . getPackageDeclaration ( new String ( packageName ) ) . exists ( ) ) ) ) { char [ ] [ ] compoundName = CharOperation . splitOn ( '.' , typeName ) ; if ( ( compoundName . length ) > 0 ) { type = wc . getType ( new String ( compoundName [ 0 ] ) ) ; for ( int i = 1 , length = compoundName . length ; i < length ; i ++ ) { type = type . getType ( new String ( compoundName [ i ] ) ) ; } } <START_BUG> if ( ! ( type . exists ( ) ) ) { <END_BUG> type = null ; } } } catch ( JavaModelException e ) { type = null ; } } if ( type == null ) { IPackageFragment [ ] pkgs = fNameLookup . findPackageFragments ( ( ( packageName == null ) || ( ( packageName . length ) == 0 ) ? IPackageFragment . DEFAULT_PACKAGE_NAME : new String ( packageName ) ) , false ) ; for ( int i = 0 , length = ( pkgs == null ) ? 0 : pkgs . length ; i < length ; i ++ ) { type = fNameLookup . findType ( new String ( typeName ) , pkgs [ i ] , false , acceptFlags ) ; if ( type != null ) break ; } if ( type == null ) { String pName = IPackageFragment . DEFAULT_PACKAGE_NAME ; if ( packageName != null ) { pName = new String ( packageName ) ; } if ( ( ( fCodeResolve ) != null ) && ( fCodeResolve . getParent ( ) . getElementName ( ) . equals ( pName ) ) ) { String tName = new String ( typeName ) ; tName = tName . replace ( '.' , '$' ) ; IType [ ] allTypes = null ; try { ArrayList list = ( ( JavaElement ) ( fCodeResolve ) ) . getChildrenOfType ( IJavaElement . TYPE ) ; allTypes = new IType [ list . size ( ) ] ; list . toArray ( allTypes ) ; } catch ( JavaModelException e ) { return null ; } for ( int i = 0 ; i < ( allTypes . length ) ; i ++ ) { if ( allTypes [ i ] . getTypeQualifiedName ( ) . equals ( tName ) ) { return allTypes [ i ] ; } } } } } return type ; } }

Fix:
if ( ( type != null ) && ( ! ( type . exists ( ) ) ) ) {