code: public static String[] normalizePaths(String ref, String[] paths) throws IllegalArgumentException {
  		List<String> result = new ArrayList<String>();
  		List<String> refParts = (ref == null) ? new ArrayList<String>() : Arrays.asList(ref.split("/")); //$NON-NLS-1$
  
  		for (String path : paths) {
  			String plugin = ""; //$NON-NLS-1$
  			int idx = path.indexOf('!');
  			if (idx != -1) {
  				plugin = PathUtil.normalize(refParts, path.substring(0, idx));
  				path = path.substring(idx+1);
  			}
  			try {
  				path = (hasPattern.matcher(plugin).find()) ?
  						new HasNode(path).normalize(ref).toString() :
  							PathUtil.normalize(refParts, path);
  			} catch(IllegalArgumentException e) {
  				throw new IllegalArgumentException(path);
  			}
  			result.add(plugin.length() == 0 ? path : plugin + "!" + path); //$NON-NLS-1$
  		}
  		return result.toArray(new String[result.size()]);
  	}
docs: This method normalizes an array of paths so that they do not start with
  or contain any ".." path segments. When called, relative paths that start
  with "." or ".." are relative to <code>ref</code>. In the returned array,
  the strings in the <code>paths</code> array have been replaced with the
  normalized path. Any paths that do not resolve relative to <code>ref</code>
  (for example, paths that begin with '/' or try to navigate out of the
  top level path component specified by <code>ref</code> using '../' path
  components) will result in an {@link IllegalArgumentException}.
  
  @param ref
  The reference location for relative paths. May be a file or
  directory.
  @param paths
  The array of paths that are to be normalized. The paths are
  normalized in-place (i.e. each array element is replaced by
  the normalized path)
  @return the array of normalized paths
  @throws IllegalArgumentException