Bug 60257 SearchPattern API: R_CASE_SENSITIVE vs. boolean isCaseSensitive
The SearchPattern API for stringPattern searches to java elements is somewhat odd: There's a public constant R_CASE_SENSITIVE, which is not mentioned in the javadoc of createPattern(String stringPattern, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive) , and there's also an extra boolean parameter isCaseSensitive. I don't see why R_CASE_SENSITIVE is made public if it should not be used by clients. On the other hand, it could also be turned into an official bit-flag and the boolean isCaseSensitive removed. To have both options seems strange to me.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/PackageSelectionDialog.java
private Point fLocation;
	
	private Point fSize;
	
	private IRunnableContext fContext;
	private IJavaSearchScope fScope;
	private int fFlags;
	/**
	 * Creates a package selection dialog.
	 * @param parent the parent shell
	 * @param context the runnable context to run the search in
	 * @param flags a combination of <code>F_REMOVE_DUPLICATES</code>, <code>F_SHOW_PARENTS</code>
	 * and  <code>F_HIDE_DEFAULT_PACKAGE</code>
	 * @param scope the scope defining the available packages.
	 */
	public PackageSelectionDialog(Shell parent, IRunnableContext context, int flags, IJavaSearchScope scope) {
		super(parent, createLabelProvider(flags));
		fFlags= flags;
		fScope= scope;
		fContext= context;
	}
	
	private static ILabelProvider createLabelProvider(int dialogFlags) {
		int flags= JavaElementLabelProvider.SHOW_DEFAULT;
		if ((dialogFlags & F_REMOVE_DUPLICATES) == 0) {
			flags= flags | JavaElementLabelProvider.SHOW_ROOT;
		}
		return new JavaElementLabelProvider(flags);