Bug 29375 Search for reference gives strange results when references are in static initialisers [search]
[M4] When references to a class or method are in the static initialiser for a class (which is also in a package other than the default one) the results contain spurious nulls. Test case: package foo.bar; public class Test { static { new Test().toString(); } } Highlight "Test" (either place) and search for references in the workspace. The result will be: nullnullbar.Test.{...}
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/viewsupport/JavaElementLabels.java
} else {
			buf.append(pack.getElementName());
		}
		if (getFlag(flags, P_POST_QUALIFIED)) {
			buf.append(CONCAT_STRING);
			getPackageFragmentRootLabel((IPackageFragmentRoot) pack.getParent(), ROOT_QUALIFIED, buf);
		}
	}
	/**
	 * Appends the label for a package fragment root to a StringBuffer. Considers the ROOT_* flags.
	 */	
	public static void getPackageFragmentRootLabel(IPackageFragmentRoot root, int flags, StringBuffer buf) {
		boolean varNamePrepended= false;
		if (root.isArchive() && getFlag(flags, ROOT_VARIABLE)) {
			try {
				IClasspathEntry rawEntry= root.getRawClasspathEntry();
				if (rawEntry != null) {
					if (rawEntry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
						buf.append(rawEntry.getPath().makeRelative());
						buf.append(CONCAT_STRING);
						varNamePrepended= true;
					}
				}
			} catch (JavaModelException e) {
				JavaPlugin.log(e); 
			}
		}
		if (root.isExternal()) {
			IPath path= root.getPath();
			int segements= path.segmentCount();