boolean (Container child, Container parent) { if (child == null) { return false; } if (parent == null) { return true; } if (child.getParent() == parent) { return true; } return <warning descr="Tail recursive call 'hasParent()'">hasParent</warning>(child.getParent(), parent); }