GeneralGroupNode (PackageDependenciesNode node) { if (node instanceof GeneralGroupNode) return (GeneralGroupNode)node; if (node == null || node instanceof RootNode) return null; return getGroupParent((PackageDependenciesNode)node.getParent()); }