InternalGradleProject (String path) { if (path.equals(this.getPath())) { return this; } else { Iterator<InternalGradleProject> iterator = this.children.iterator(); InternalGradleProject found; if (!iterator.hasNext()) { return null; } InternalGradleProject child = iterator.next(); found = child.findByPath(path); while (found == null) { if (!iterator.hasNext()) { return null; } child = iterator.next(); found = child.findByPath(path); } return found; } }