InspectionConfigTreeNode (String name, InspectionConfigTreeNode root) { for (int i = 0; i < root.getChildCount(); i++) { final InspectionConfigTreeNode child = (InspectionConfigTreeNode)root.getChildAt(i); if (child instanceof InspectionConfigTreeNode.Tool) { if (((InspectionConfigTreeNode.Tool)child).getKey().toString().equals(name)) { return child; } } else { final InspectionConfigTreeNode node = findNodeByKey(name, child); if (node != null) return node; } } return null; }