Buggy code:
public class HandleFactory { private String lastPkgFragmentRootPath ; private PackageFragmentRoot lastPkgFragmentRoot ; private HashtableOfArrayToObject packageHandles ; private JavaModel javaModel ; public HandleFactory ( ) { } public Openable createOpenable ( String resourcePath , IJavaSearchScope scope ) { } public IJavaElement createElement ( ClassScope scope , ICompilationUnit unit , HashSet existingElements , HashMap knownScopes ) { } private IJavaElement createElement ( Scope scope , int elementPosition , ICompilationUnit unit , HashSet existingElements , HashMap knownScopes ) { IJavaElement newElement = ( ( IJavaElement ) ( knownScopes . get ( scope ) ) ) ; if ( newElement != null ) return newElement ; switch ( scope . kind ) { case Scope . COMPILATION_UNIT_SCOPE : newElement = unit ; break ; case Scope . CLASS_SCOPE : IJavaElement parentElement = createElement ( scope . parent , elementPosition , unit , existingElements , knownScopes ) ; switch ( parentElement . getElementType ( ) ) { case IJavaElement . COMPILATION_UNIT : newElement = ( ( ICompilationUnit ) ( parentElement ) ) . getType ( new String ( scope . enclosingSourceType ( ) . sourceName ) ) ; break ; case IJavaElement . TYPE : newElement = ( ( IType ) ( parentElement ) ) . getType ( new String ( scope . enclosingSourceType ( ) . sourceName ) ) ; break ; case IJavaElement . FIELD : case IJavaElement . INITIALIZER : case IJavaElement . METHOD : IMember member = ( ( IMember ) ( parentElement ) ) ; if ( member . isBinary ( ) ) { return null ; } else { newElement = member . getType ( new String ( scope . enclosingSourceType ( ) . sourceName ) , 1 ) ; if ( newElement != null ) { while ( ! ( existingElements . add ( newElement ) ) ) ( ( ( SourceRefElement ) ( newElement ) ) . occurrenceCount ) ++ ; } } break ; } if ( newElement != null ) { knownScopes . put ( scope , newElement ) ; } break ; case Scope . METHOD_SCOPE : IType parentType = ( ( IType ) ( createElement ( scope . parent , elementPosition , unit , existingElements , knownScopes ) ) ) ; MethodScope methodScope = ( ( MethodScope ) ( scope ) ) ; if ( methodScope . isInsideInitializer ( ) ) { TypeDeclaration type = methodScope . referenceType ( ) ; int occurenceCount = 1 ; for ( int i = 0 , length = type . fields . length ; i < length ; i ++ ) { FieldDeclaration field = type . fields [ i ] ; <START_BUG> if ( ( ( field . declarationSourceStart ) < elementPosition ) && ( ( field . declarationSourceEnd ) > elementPosition ) ) { <END_BUG> switch ( field . getKind ( ) ) { case AbstractVariableDeclaration . FIELD : case AbstractVariableDeclaration . ENUM_CONSTANT : newElement = parentType . getField ( new String ( field . name ) ) ; break ; case AbstractVariableDeclaration . INITIALIZER : newElement = parentType . getInitializer ( occurenceCount ) ; break ; } break ; } else if ( ( field . getKind ( ) ) == ( AbstractVariableDeclaration . INITIALIZER ) ) { occurenceCount ++ ; } } } else { AbstractMethodDeclaration method = methodScope . referenceMethod ( ) ; newElement = parentType . getMethod ( new String ( method . selector ) , Util . typeParameterSignatures ( method ) ) ; if ( newElement != null ) { knownScopes . put ( scope , newElement ) ; } } break ; case Scope . BLOCK_SCOPE : newElement = createElement ( scope . parent , elementPosition , unit , existingElements , knownScopes ) ; break ; } return newElement ; } private PackageFragmentRoot getJarPkgFragmentRoot ( String jarPathString , IJavaSearchScope scope ) { } private PackageFragmentRoot getJarPkgFragmentRoot ( IPath jarPath , Object target , IJavaProject [ ] projects ) { } private PackageFragmentRoot getPkgFragmentRoot ( String pathString ) { } }

Fix:
if ( ( ( field . declarationSourceStart ) <= elementPosition ) && ( elementPosition <= ( field . declarationSourceEnd ) ) ) {