Bug 53201 NPE when re-running newly generated javadoc.xml
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javadocexport/JavadocWriter.java
sortSourceElement(store.getSourceElements(), sourcefiles, packages);
		if (!packages.isEmpty())
			xmlJavadocDesc.setAttribute(store.PACKAGENAMES, toSeparatedList(packages));
		if (!sourcefiles.isEmpty())
			xmlJavadocDesc.setAttribute(store.SOURCEFILES, toSeparatedList(sourcefiles));
		xmlJavadocDesc.setAttribute(store.SOURCEPATH, getPathString(store.getSourcepath()));
		xmlJavadocDesc.setAttribute(store.CLASSPATH, getPathString(store.getClasspath()));
		String str= store.getOverview();
		if (str.length() > 0) 
			xmlJavadocDesc.setAttribute(store.OVERVIEW, str);
		str= store.getStyleSheet();
		if (str.length() > 0) 
			xmlJavadocDesc.setAttribute(store.STYLESHEETFILE, str);
		str= store.getTitle();
		if (str.length() > 0) 
			xmlJavadocDesc.setAttribute(store.TITLE, str);
		str= store.getAdditionalParams();
		if (str.length() > 0) 
			xmlJavadocDesc.setAttribute(store.EXTRAOPTIONS, str);
		String[] hrefs= store.getHRefs();
		for (int i= 0; i < hrefs.length; i++) {
			Element links= document.createElement("link"); 
			xmlJavadocDesc.appendChild(links);
			links.setAttribute(store.HREF, hrefs[i]);
		}
	}
	private void sortSourceElement(IJavaElement[] iJavaElements, List sourcefiles, List packages) {
		for (int i= 0; i < iJavaElements.length; i++) {
			IJavaElement element= iJavaElements[i];
			IPath p= element.getResource().getLocation();