Bug 61699 NPE When searching without text selection
I-2004-05-11 I had a case where the I had a NPE in JavaSearchPage.trySimpleTextSelection. Inspection of the code revealed that ITextSelection.getText() can return null, but we're not checking the condition.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchPage.java
private static class SearchPatternData {
		private int			searchFor;
		private int			limitTo;
		private String			pattern;
		private boolean		isCaseSensitive;
		private IJavaElement	javaElement;
		private int			scope;
		private IWorkingSet[]	 	workingSets;
		
		public SearchPatternData(int searchFor, int limitTo, boolean isCaseSensitive, String pattern, IJavaElement element) {
			this(searchFor, limitTo, pattern, isCaseSensitive, element, ISearchPageContainer.WORKSPACE_SCOPE, null);
		}