Actually sorts the paths, which is not appreciated and not even used anywhere
@return
185575
private Set<String> findExclusionPaths() throws InitException {
       Set<String> exclusions = new TreeSet<String>();
       
       // Let other handlers deal with folders that do not reside in the WEB-INF or META-INF
       List<String> collect = null;
       File webapp = new File(deploymentInfo.getRealPath(""));
       String[] paths = webapp.list();
       if (webapp.exists() && paths != null)
           collect = Arrays.asList(paths);
       
       if (webapp.exists() && !webapp.canRead()) {
           // It means that the server cannot read files at all
           throw new InitException( HttpHandlerImpl.class.getName() + " cannot read files. Reason is unknown");
       } else if (!webapp.exists() || collect == null || collect.isEmpty()) {
           // Whenever this is empty it might just be because someone forgot to add the 'webapp' folder to the distribution
           // OR the framework is used without the need for serving files (such as views).
           logger.error("HttpHandlerImpl did not find any files in webapp - not serving any files then");
           return exclusions;
       }
       
       Set<String> resourcePaths = new TreeSet<>(collect);//servletContext.getResourcePaths("/");
       resourcePaths.removeIf( path -> path.contains("-INF") || path.contains("-inf"));
   
       // We still need to also remove the views folder from being processed by other handlers
       resourcePaths.removeIf( path -> path.contains(TemplateEngine.TEMPLATES_FOLDER));
       
       // Add the remaining paths to exclusions
       for (String path : resourcePaths) {
           // add leading slash
           if (path.charAt(0) != '/')
               path = '/' + path;
           
           // remove the last slash
           if (path.charAt(path.length()-1) == '/')
               path = path.substring(0, path.length()-1);
           exclusions.add(path);
       }
       
       return exclusions;
   }
1227928
public static Path withoutLeadingSeparator(Path path) {
    return new Path(StringUtils.removeStart(path.toString(), Path.SEPARATOR));
  }
569512
def get_paths(folder, ignore_endswith=ignore_endswith):
    '''
    '''
    folder = pathlib.Path(folder).resolve()
    files = folder.rglob("*")
    for ie in ignore_endswith:
        files = [ff for ff in files if not ff.name.endswith(ie)]
    return sorted(files)
228007
private Path[] listPaths(final Path path)
      throws IOException {
    Path[] children = null;
    ArrayList<Path> tmpChildrenPath = new ArrayList<>();
    if (fs.isDirectory(path)) {
      // Get children's path list.
      FileStatus[] chiledrenFileStatus = pathFilter == null ? fs.listStatus(path) : fs.listStatus(path, pathFilter);
      for (FileStatus childFileStatus : chiledrenFileStatus) {
        tmpChildrenPath.add(childFileStatus.getPath());
      }
      children = tmpChildrenPath.toArray(new Path[tmpChildrenPath.size()]);
    }
    if (children == null) {
      children = EMPTY_PATH_ARRAY;
    }
    if (comparator != null && children.length > 1) {
      Arrays.sort(children, comparator);
    }
    return children;
  }
14048
public List<Path> getDefaultUserIgnoreDirectories()
    {
        List<Path> paths = getOptionValue(DEFAULT_USER_IGNORE_DIRECTORIES_OPTION);
        if (paths == null)
        {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(paths);
    }
105893
synchronized List<AllocatedSlice> removeAllAllocatedSlices() {

		final List<AllocatedSlice> slices = new ArrayList<AllocatedSlice>(this.allocatedSlices.values());
		final Iterator<AllocatedSlice> it = slices.iterator();
		while (it.hasNext()) {
			removeAllocatedSlice(it.next().getAllocationID());
		}

		return slices;
	}
1166883
public static String sortAndGetState()
  {
    if (_state.length() == 0) {
      return _state;
    }

    String[] states = _state.split("\\n");
    List<String> list = new ArrayList();
    for (int counter = 0; counter < states.length; ++counter) {
      list.add(states[counter]);
    }

    Collections.sort(list);

    Iterator<String> iterator = list.iterator();
    String value = "";
    while (iterator.hasNext()) {
      value += iterator.next() + "\n";
    }

    _state = "";

    return value;
  }
442382
public Iterator<ISO9660Directory> unsortedIterator() {
        if (unsortedIterator == null) {
            unsortedIterator = new ISO9660DirectoryIterator(this, false);
        }
        unsortedIterator.reset();
        return unsortedIterator;
	}
432063
public Iterable<Path> getAllIgnoreDirectories()
    {
        Set<Path> results = new HashSet<>();
        results.addAll(getDefaultUserIgnoreDirectories());
        File userSpecifiedFile = getOptionValue(UserIgnorePathOption.NAME);
        if (userSpecifiedFile != null)
        {
            results.add(userSpecifiedFile.toPath());
        }
        return results;
    }
671423
public List<T> keySetSorted() {
        List<T> result = new ArrayList<>();

        PriorityQueue<Pair<T, Double>> pq = asPriorityQueue();
        while (!pq.isEmpty()) {
            result.add(pq.poll().getFirst());
        }

        return result;
    }
537273
function removeTrailingDirectorySeparator(path) {
        if (path.charAt(path.length - 1) === ts.directorySeparator) {
            return path.substr(0, path.length - 1);
        }
        return path;
    }
242469
private boolean sort() {
		// We cache all variables for faster access
		final int[] d = this.d;
		//System.err.println("Visiting...");
		if (LOGGER.isDebugEnabled()) LOGGER.debug("Peeling hypergraph...");

		top = 0;
		for(int i = 0; i < numVertices; i++) if (d[i] == 1) peel(i);

		if (LOGGER.isDebugEnabled()) LOGGER.debug(top == numEdges ? "Peeling completed." : "Visit failed: peeled " + top + " edges out of " + numEdges + ".");

		return top == numEdges;
	}
379484
public boolean removeAll() throws IOException
  {
    if (isDirectory() && ! isLink()) {
      String []list = list();

      for (int i = 0; i < list.length; i++) {
        PathImpl subpath = lookup(list[i]);
        subpath.removeAll();
      }
    }

    return remove();
  }
481701
function sortPaths(items/* , [iteratee, ] dirSeparator */) {
    assert(arguments.length >= 2, 'too few arguments');
    assert(arguments.length <= 3, 'too many arguments');

    var iteratee, dirSeparator;

    if (arguments.length === 2) {
        iteratee = identity;
        dirSeparator = arguments[1];
    }
    else {
        iteratee = arguments[1];
        dirSeparator = arguments[2];
    }

    assert(isArray(items), 'items is not an array');
    assert(isFunction(iteratee), 'iteratee is not a function');
    assert(typeof dirSeparator === 'string', 'dirSeparator is not a String');
    assert(dirSeparator.length === 1, 'dirSeparator must be a single character');

    //encapsulate into DTOs
    var itemDTOs = items.map(function (item) {
        var path = iteratee(item);

        assert(typeof path === 'string', 'item or iteratee(item) must be a String');

        return {
            item: item,
            pathTokens: splitRetain(path, dirSeparator)
        };
    });

    //sort DTOs
    itemDTOs.sort(createItemDTOComparator(dirSeparator));

    //decapsulate sorted DTOs and return
    return itemDTOs.map(function (itemDTO) {
        return itemDTO.item;
    });
}
944345
Path[] getLocalDirs() throws IOException{
    String[] localDirs = getLocalDirsFromConf(fConf);
    Path[] paths = new Path[localDirs.length];
    FileSystem localFs = FileSystem.getLocal(fConf);
    for (int i = 0; i < localDirs.length; i++) {
      paths[i] = new Path(localDirs[i]);
      paths[i] = paths[i].makeQualified(localFs);
    }
    return paths;
  }
982744
public int[][] paths() {
        final int[][] paths = new int[size()][0];
        int i = 0;
        for (final Cycle c : basis.members())
            paths[i++] = c.path();
        return paths;
    }
128989
@Pure
	public List<File> getSourcePaths() {
		if (this.sourcePath == null) {
			return Collections.emptyList();
		}
		return Collections.unmodifiableList(this.sourcePath);
	}