Buggy code:
public class InternalExtendedCompletionContext { private static Util . BindingsToNodesMap EmptyNodeMap = new Util . BindingsToNodesMap ( ) { public ASTNode get ( Binding binding ) { } } ; private InternalCompletionContext completionContext ; private ITypeRoot typeRoot ; private CompilationUnitDeclaration compilationUnitDeclaration ; private LookupEnvironment lookupEnvironment ; private Scope assistScope ; private ASTNode assistNode ; private WorkingCopyOwner owner ; private CompletionParser parser ; private boolean hasComputedVisibleElementBindings ; private ObjectVector visibleLocalVariables ; private ObjectVector visibleFields ; private ObjectVector visibleMethods ; private boolean hasComputedEnclosingJavaElements ; private Map bindingsToHandles ; private Map nodesWithProblemsToHandles ; private ICompilationUnit compilationUnit ; public InternalExtendedCompletionContext ( InternalCompletionContext completionContext , ITypeRoot typeRoot , CompilationUnitDeclaration compilationUnitDeclaration , LookupEnvironment lookupEnvironment , Scope assistScope , ASTNode assistNode , WorkingCopyOwner owner , CompletionParser parser ) { } private void computeEnclosingJavaElements ( ) { } private void computeVisibleElementBindings ( ) { } public IJavaElement getEnclosingElement ( ) { } private JavaElement getJavaElement ( LocalVariableBinding binding ) { } private JavaElement getJavaElementOfCompilationUnit ( Binding binding ) { } private JavaElement getJavaElementOfCompilationUnit ( ASTNode node , Binding binding ) { } private TypeBinding getTypeFromSignature ( String typeSignature , Scope scope ) { } private char [ ] replacePackagesDot ( char [ ] signature ) { } public IJavaElement [ ] getVisibleElements ( String typeSignature ) { if ( ( this . assistScope ) == null ) return new IJavaElement [ 0 ] ; if ( ! ( this . hasComputedVisibleElementBindings ) ) { computeVisibleElementBindings ( ) ; } TypeBinding assignableTypeBinding = null ; if ( typeSignature != null ) { assignableTypeBinding = getTypeFromSignature ( typeSignature , this . assistScope ) ; if ( assignableTypeBinding == null ) return new IJavaElement [ 0 ] ; } int length = ( ( this . visibleLocalVariables . size ( ) ) + ( this . visibleFields . size ( ) ) ) + ( this . visibleMethods . size ( ) ) ; if ( length == 0 ) return new IJavaElement [ 0 ] ; IJavaElement [ ] result = new IJavaElement [ length ] ; int elementCount = 0 ; int size = this . visibleLocalVariables . size ( ) ; if ( size > 0 ) { next : for ( int i = 0 ; i < size ; i ++ ) { try { LocalVariableBinding binding = ( ( LocalVariableBinding ) ( this . visibleLocalVariables . elementAt ( i ) ) ) ; <START_BUG> if ( ( assignableTypeBinding != null ) && ( ! ( binding . type . isCompatibleWith ( assignableTypeBinding ) ) ) ) <END_BUG> continue next ; JavaElement localVariable = getJavaElement ( binding ) ; if ( localVariable != null ) result [ ( elementCount ++ ) ] = localVariable ; } catch ( AbortCompilation e ) { Util . logRepeatedMessage ( e . getKey ( ) , e ) ; } } } size = this . visibleFields . size ( ) ; if ( size > 0 ) { next : for ( int i = 0 ; i < size ; i ++ ) { try { FieldBinding binding = ( ( FieldBinding ) ( this . visibleFields . elementAt ( i ) ) ) ; if ( ( assignableTypeBinding != null ) && ( ! ( binding . type . isCompatibleWith ( assignableTypeBinding ) ) ) ) continue next ; if ( this . assistScope . isDefinedInSameUnit ( binding . declaringClass ) ) { JavaElement field = getJavaElementOfCompilationUnit ( binding ) ; if ( field != null ) result [ ( elementCount ++ ) ] = field ; } else { JavaElement field = Util . getUnresolvedJavaElement ( binding , this . owner , InternalExtendedCompletionContext . EmptyNodeMap ) ; if ( field != null ) result [ ( elementCount ++ ) ] = field . resolved ( binding ) ; } } catch ( AbortCompilation e ) { Util . logRepeatedMessage ( e . getKey ( ) , e ) ; } } } size = this . visibleMethods . size ( ) ; if ( size > 0 ) { next : for ( int i = 0 ; i < size ; i ++ ) { try { MethodBinding binding = ( ( MethodBinding ) ( this . visibleMethods . elementAt ( i ) ) ) ; if ( ( assignableTypeBinding != null ) && ( ! ( binding . returnType . isCompatibleWith ( assignableTypeBinding ) ) ) ) continue next ; if ( this . assistScope . isDefinedInSameUnit ( binding . declaringClass ) ) { JavaElement method = getJavaElementOfCompilationUnit ( binding ) ; if ( method != null ) result [ ( elementCount ++ ) ] = method ; } else { JavaElement method = Util . getUnresolvedJavaElement ( binding , this . owner , InternalExtendedCompletionContext . EmptyNodeMap ) ; if ( method != null ) result [ ( elementCount ++ ) ] = method . resolved ( binding ) ; } } catch ( AbortCompilation e ) { Util . logRepeatedMessage ( e . getKey ( ) , e ) ; } } } if ( elementCount != ( result . length ) ) { System . arraycopy ( result , 0 , ( result = new IJavaElement [ elementCount ] ) , 0 , elementCount ) ; } return result ; } private void searchVisibleFields ( FieldBinding [ ] fields , ReferenceBinding receiverType , Scope scope , InvocationSite invocationSite , Scope invocationScope , boolean onlyStaticFields , ObjectVector localsFound , ObjectVector fieldsFound ) { } private void searchVisibleFields ( ReferenceBinding receiverType , Scope scope , InvocationSite invocationSite , Scope invocationScope , boolean onlyStaticFields , boolean notInJavadoc , ObjectVector localsFound , ObjectVector fieldsFound ) { } private void searchVisibleInterfaceMethods ( ReferenceBinding [ ] itsInterfaces , ReferenceBinding receiverType , Scope scope , InvocationSite invocationSite , Scope invocationScope , boolean onlyStaticMethods , ObjectVector methodsFound ) { } private void searchVisibleLocalMethods ( MethodBinding [ ] methods , ReferenceBinding receiverType , Scope scope , InvocationSite invocationSite , Scope invocationScope , boolean onlyStaticMethods , ObjectVector methodsFound ) { }

Fix:
if ( ( ( binding . type ) == null ) || ( ( assignableTypeBinding != null ) && ( ! ( binding . type . isCompatibleWith ( assignableTypeBinding ) ) ) ) )