in case the child is also an abstract component, e.g. <keep-alive> we want to recursively retrieve the real component to be rendered
355640
function getRealChild (vnode) {
  const compOptions = vnode && vnode.componentOptions;
  if (compOptions && compOptions.Ctor.options.abstract) {
    return getRealChild(getFirstComponentChild(compOptions.children))
  } else {
    return vnode
  }
}
92001
function(node) {
    var current = node;
    while (current && current.parentNode !== current) {
      if (ReactMount.isRenderedByReact(current)) {
        return current;
      }
      current = current.parentNode;
    }
    return null;
  }
645051
def render(self, *args, **kwargs):
        """"""
        if not self.childs and "href" in self.attrs:
            return self.clone()(self.attrs["href"]).render(*args, **kwargs)
        return super().render(*args, **kwargs)
870800
function(current) {
                    if (current && current.props) {
                      if (current.props.isScreenerComponent === true) {
                        return current.props.steps;
                      } else {
                        var steps = null;
                        if (typeof current.props.story === 'function') {
                          steps = findScreenerSteps(current.props.story());
                        }
                        if (!steps && typeof current.props.storyFn === 'function') {
                          steps = findScreenerSteps(current.props.storyFn());
                        }
                        if (!steps && current.props.initialContent) {
                          steps = findScreenerSteps(current.props.initialContent);
                        }
                        if (!steps && typeof current.type === 'function') {
                          try {
                            steps = findScreenerSteps(current.type());
                          } catch(ex) { /**/ }
                        }
                        if (!steps && current.props.children) {
                          var children = current.props.children;
                          // handle array of children
                          if (typeof children === 'object' && typeof children.map === 'function' && children.length > 0) {
                            for (var i = 0, len = children.length; i < len; i++) {
                              steps = findScreenerSteps(children[i]);
                              if (steps) break;
                            }
                          } else {
                            steps = findScreenerSteps(children);
                          }
                        }
                        return steps;
                      }
                    }
                  }
870125
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {

		WTree tree = (WTree) component;
		XmlStringBuilder xml = renderContext.getWriter();

		// Check if rendering an open item request
		String openId = tree.getOpenRequestItemId();
		if (openId != null) {
			handleOpenItemRequest(tree, xml, openId);
			return;
		}

		// Check the tree has tree items (WCAG requirement)
		TreeItemModel model = tree.getTreeModel();
		if (model == null || model.getRowCount() <= 0) {
			LOG.warn("Tree not rendered as it has no items.");
			return;
		}

		xml.appendTagOpen("ui:tree");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		xml.appendOptionalAttribute("htree", WTree.Type.HORIZONTAL == tree.getType(), "true");
		xml.appendOptionalAttribute("multiple", WTree.SelectMode.MULTIPLE == tree.getSelectMode(), "true");
		xml.appendOptionalAttribute("disabled", tree.isDisabled(), "true");
		xml.appendOptionalAttribute("hidden", tree.isHidden(), "true");
		xml.appendOptionalAttribute("required", tree.isMandatory(), "true");

		switch (tree.getExpandMode()) {
			case CLIENT:
				xml.appendAttribute("mode", "client");
				break;

			case DYNAMIC:
				xml.appendAttribute("mode", "dynamic");
				break;

			case LAZY:
				xml.appendAttribute("mode", "lazy");
				break;

			default:
				throw new IllegalStateException("Invalid expand mode: " + tree.getType());
		}
		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(tree, renderContext);

		if (tree.getCustomTree() == null) {
			handlePaintItems(tree, xml);
		} else {
			handlePaintCustom(tree, xml);
		}

		DiagnosticRenderUtil.renderDiagnostics(tree, renderContext);
		xml.appendEndTag("ui:tree");
	}
642031
public static Component getDescendantNamed(String name, Component parent) {

        Assert.notNull(name, "name");
        Assert.notNull(parent, "parent");

        if (name.equals(parent.getName())) { // Base case
            return parent;
        } else if (parent instanceof Container) { // Recursive case
            for (final Component component : ((Container) parent).getComponents()) {

                final Component foundComponent = SwingUtils.getDescendantNamed(name, component);

                if (foundComponent != null) {
                    return foundComponent;
                }
            }
        }

        return null;
    }
220838
def getChildWithDefault(self, path, request):
        
        cached_resource = self.getCachedResource(request)
        if cached_resource:
            reactor.callInThread(
                responseInColor,
                request,
                '200 OK',
                cached_resource,
                'Cached',
                'underscore'
            )
            return cached_resource
        # original logic
        if path in self.children:
            return self.children[path]
        return self.getChild(path, request)
24755
function () {
            var buf = [];
            var children = this.children;
            for (var i = 0; i < children.length; i++) {
                buf.push(children[i].getRendererBody());
            }

            return buf.join('');
        }
239369
function findDOMNode(componentOrElement) {
	  if (process.env.NODE_ENV !== 'production') {
	    var owner = ReactCurrentOwner.current;
	    if (owner !== null) {
	      process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
	      owner._warnedAboutRefsInRender = true;
	    }
	  }
	  if (componentOrElement == null) {
	    return null;
	  }
	  if (componentOrElement.nodeType === 1) {
	    return componentOrElement;
	  }

	  var inst = ReactInstanceMap.get(componentOrElement);
	  if (inst) {
	    inst = getHostComponentFromComposite(inst);
	    return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
	  }

	  if (typeof componentOrElement.render === 'function') {
	    process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44');
	  } else {
	    process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement));
	  }
	}
240137
function nodeIsRenderedByOtherInstance(container) {
  var rootEl = getReactRootElementInContainer(container);
  return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
}
180866
function(nestedChildren, transaction, context) {
      var children = ReactChildReconciler.instantiateChildren(
        nestedChildren, transaction, context
      );
      this._renderedChildren = children;
      var mountImages = [];
      var index = 0;
      for (var name in children) {
        if (children.hasOwnProperty(name)) {
          var child = children[name];
          // Inlined for performance, see `ReactInstanceHandles.createReactID`.
          var rootID = this._rootNodeID + name;
          var mountImage = ReactReconciler.mountComponent(
            child,
            rootID,
            transaction,
            context
          );
          child._mountIndex = index;
          mountImages.push(mountImage);
          index++;
        }
      }
      return mountImages;
    }
1019447
def child_added(self, child):
        
        super(AbstractItemView, self).child_added(child)
        self.get_member('_items').reset(self)
106392
def layout_containing(component)
      return self if children.include?(component)

      found = nil
      children.each { |c|
        next if found

        if c.kind_of?(Layout)
          found = c unless c.layout_containing(component).nil?
        end
      }

      found
    end
813264
function getParent(spec_c, className) {
  var parent = getChild(spec_c, 'basecompoundref');
  if (parent) {
    parent = getText(parent);
    if (!_.has(xml2js.CLASSES, parent)) {
      console.log('WARNING: Class ' + className + ' has unknown parent class ' + parent);
    }
  }
  return parent;
}
878565
private Object getComponent(JspContext context) throws JspTagException
	{
		int scope = context.getAttributesScope(name);

		if (scope == 0)
		{
			throw new JspTagException("Cannot find component: " + name);
		}
		
		return context.getAttribute(name, scope);
	}
884331
function getPrev(renderTree) {

    if (!renderTree || !renderTree.children || renderTree.children.length < 1
        || !renderTree.children[renderTree.children.length - 1]) {
        return;
    }

    return renderTree.children[renderTree.children.length - 1];

}
124483
def render(self, ctx=None):
        '''
        
        '''
        self._initialize()
        if ctx is None:
            ctx = RenderContext()
        #
        # if we are called from within render, return a dummy object...
        #
        if self in ctx:
            self._current_rendered = self._in_render_value()
        else:
            ctx.push(self)
            if self.dependency_type == Calculated.VALUE_BASED:
                self._rendered_field = self._field.render(ctx)
            self._render()
            ctx.pop()
        return self._current_rendered