Bug 126800 Java Team Content provider sometimes returns null element
The JavaSynchronizationContentProvider sometimes returns a null element. As a result of this, I sometimes get NPEs from StructuredViewer wheb expanding Java packages. I believe the problem is that JavaCore.create(members[index]) is used in a few places to get members but that can return null. The returned value should be checked for null before it is added to the result.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/model/JavaSynchronizationContentProvider.java
final IResourceDiffTree tree= context.getDiffTree();
			final IResource[] members= tree.members(resource);
			for (int index= 0; index < members.length; index++) {
				final IDiff diff= tree.getDiff(members[index]);
				if (diff != null) {
					final int type= members[index].getType();
					if (type == IResource.FILE && isInScope(context.getScope(), parent, members[index]))
						set.add(members[index]);
				}
			}
		}
		return set.toArray(new Object[set.size()]);
	}
	/**
	 * {@inheritDoc}
	 */
	protected ResourceTraversal[] getTraversals(final ISynchronizationContext context, final Object object) {
		return getResourceTraversals(object);
	}
	/**
	 * Returns whether the element has some children in the current scope.
	 * 
	 * @param scope
	 *            the synchronization scope
	 * @param element
	 *            the element
	 * @param resource
	 *            the resource
	 * @return <code>true</code> if it has some children, <code>false</code>
	 *         otherwise