code: static public Collection<URI> removeRedundantPaths(Collection<URI> uris) {
  		List<URI> result = new ArrayList<URI>();
  		for (URI uri : uris) {
  			String path = uri.getPath();
  			if (!path.endsWith("/")) {  //$NON-NLS-1$
  				path += "/"; //$NON-NLS-1$
  			}
  			boolean addIt = true;
  			for (int i = 0; i < result.size(); i++) {
  				URI testUri = result.get(i);
  				if (!StringUtils.equals(testUri.getScheme(), uri.getScheme()) ||
  						!StringUtils.equals(testUri.getHost(), uri.getHost()) ||
  						testUri.getPort() != uri.getPort()) {
  					continue;
  				}
  				String test = testUri.getPath();
  				if (!test.endsWith("/")) { //$NON-NLS-1$
  					test += "/"; //$NON-NLS-1$
  				}
  				if (path.equals(test) || path.startsWith(test)) {
  					addIt = false;
  					break;
  				} else if (test.startsWith(path)) {
  					result.remove(i);
  				}
  			}
  			if (addIt)
  				result.add(uri);
  		}
  		// Now copy the trimmed list back to the original
  		return result;
  	}
docs: Removes URIs containing duplicate and non-orthogonal paths so that the
  collection contains only unique and non-overlapping paths.
  
  @param uris collection of URIs
  
  @return a new collection with redundant paths removed