Buggy code:
public class SourceType extends Member implements IType { protected static final String [ ] fgEmptyList = new String [ ] { } ; protected SourceType ( IJavaElement parent , String name ) { } public void codeComplete ( char [ ] snippet , int insertion , int position , char [ ] [ ] localVariableTypeNames , char [ ] [ ] localVariableNames , int [ ] localVariableModifiers , boolean isStatic , ICompletionRequestor requestor ) throws JavaModelException { } public IField createField ( String contents , IJavaElement sibling , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public IInitializer createInitializer ( String contents , IJavaElement sibling , IProgressMonitor monitor ) throws JavaModelException { } public IMethod createMethod ( String contents , IJavaElement sibling , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public IType createType ( String contents , IJavaElement sibling , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected boolean equalsDOMNode ( IDOMNode node ) throws JavaModelException { } public IMethod [ ] findMethods ( IMethod method ) { } public IType getDeclaringType ( ) { } public IField getField ( String name ) { } public IField [ ] getFields ( ) throws JavaModelException { } public String getFullyQualifiedName ( ) { } public String getFullyQualifiedName ( char enclosingTypeSeparator ) { } public IInitializer getInitializer ( int occurrenceCount ) { } public IInitializer [ ] getInitializers ( ) throws JavaModelException { } public IMethod getMethod ( String name , String [ ] parameterTypeSignatures ) { } public IMethod [ ] getMethods ( ) throws JavaModelException { } public IPackageFragment getPackageFragment ( ) { } public String getSuperclassName ( ) throws JavaModelException { } public String [ ] getSuperInterfaceNames ( ) throws JavaModelException { } public IType getType ( String name ) { } public String getTypeQualifiedName ( ) { } public String getTypeQualifiedName ( char enclosingTypeSeparator ) { } public IType [ ] getTypes ( ) throws JavaModelException { } public boolean hasChildren ( ) throws JavaModelException { } public boolean isClass ( ) throws JavaModelException { } public boolean isInterface ( ) throws JavaModelException { } public ITypeHierarchy newSupertypeHierarchy ( IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newSupertypeHierarchy ( IWorkingCopy [ ] workingCopies , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IWorkingCopy [ ] workingCopies , IProgressMonitor monitor ) throws JavaModelException { } public ITypeHierarchy newTypeHierarchy ( IJavaProject project , IProgressMonitor monitor ) throws JavaModelException { } public String [ ] [ ] resolveType ( String typeName ) throws JavaModelException { ISourceType info = ( ( ISourceType ) ( this . getElementInfo ( ) ) ) ; ISearchableNameEnvironment environment = ( ( JavaProject ) ( getJavaProject ( ) ) ) . getSearchableNameEnvironment ( ) ; class TypeResolveRequestor implements ISelectionRequestor { String [ ] [ ] answers = null ; void acceptType ( String [ ] answer ) { if ( ( answers ) == null ) { answers = new String [ ] [ ] { answer } ; } else { int length = answers . length ; System . arraycopy ( answers , 0 , ( answers = new String [ length + 1 ] [ ] ) , 0 , length ) ; answers [ length ] = answer ; } } public void acceptClass ( char [ ] packageName , char [ ] className , boolean needQualification ) { acceptType ( new String [ ] { new String ( packageName ) , new String ( className ) } ) ; } public void acceptInterface ( char [ ] packageName , char [ ] interfaceName , boolean needQualification ) { acceptType ( new String [ ] { new String ( packageName ) , new String ( interfaceName ) } ) ; } public void acceptError ( IProblem error ) { } public void acceptField ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] name ) { } public void acceptMethod ( char [ ] declaringTypePackageName , char [ ] declaringTypeName , char [ ] selector , char [ ] [ ] parameterPackageNames , char [ ] [ ] parameterTypeNames , boolean isConstructor ) { } public void acceptPackage ( char [ ] packageName ) { } } TypeResolveRequestor requestor = new TypeResolveRequestor ( ) ; SelectionEngine engine = new SelectionEngine ( environment , requestor , JavaCore . getOptions ( ) ) ; <START_BUG> engine . selectType ( info , typeName . toCharArray ( ) ) ; <END_BUG> return requestor . answers ; } protected void toStringInfo ( int tab , StringBuffer buffer , Object info ) { } }

Fix:
engine . selectType ( info , typeName . toCharArray ( ) , false ) ;