for (File f : next.listFiles()) {
File[] files = next.listFiles(); if (files != null) for (File f : files) {
	public static Set<File> search(File root) {		Set<File> result = new HashSet<File>();		Set<File> directories = new HashSet<File>();		LinkedList<File> worklist = new LinkedList<File>();		directories.add(root);		worklist.add(root);		while (!worklist.isEmpty()) {			File next = worklist.removeFirst();			for (File f : next.listFiles()) {				if (f.getName().endsWith(".java"))					result.add(f);				else if (f.isDirectory() && directories.add(f)) {					worklist.add(f);				}			}		}		return result;	}