Bug 13034 Cannot create a Source Folder in a new Java Project
build 20020404 If you try and create a Source Folder in a Java Project you have just created you get an error preventing you from hitting finish. STEPS 1) Create Java Project Foo 2) Open New->Source Folder 3) Enter Bar as the name - you will get "Cannot nest entry Bar inside entry Foo/Bar" 4) Create a folder Bar. 5) Add it as a source folder in the Properties Dialog for Foo. No problem.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/StatusUtil.java
/**
	 * Compares two instances of <code>IStatus</code>. The more severe is returned:
	 * An error is more severe than a warning, and a warning is more severe
	 * than ok. If the two stati have the same severity, the second is returned.
	 */
	public static IStatus getMoreSevere(IStatus s1, IStatus s2) {
		if (s1.getSeverity() > s2.getSeverity()) {
			return s1;
		} else {
			return s2;
		}
	}
	/**
	 * Finds the most severe status from a array of stati.
	 * An error is more severe than a warning, and a warning is more severe
	 * than ok.
	 */
	public static IStatus getMostSevere(IStatus[] status) {
		IStatus max= null;
		for (int i= 0; i < status.length; i++) {
			IStatus curr= status[i];
			if (curr.matches(IStatus.ERROR)) {
				return curr;
			}
			if (max == null || curr.getSeverity() > max.getSeverity()) {
				max= curr;
			}
		}
		return max;
	}