Set the returnTypeNode, paramsNode, and blockNode based on child
node structure.  No evaluation is done here.
431262
synchronized void insureNodesParsed()
    {
        if ( paramsNode != null ) // there is always a paramsNode
            return;

        Object firstNode = jjtGetChild(0);
        firstThrowsClause = 1;
        if ( firstNode instanceof BSHReturnType )
        {
            returnTypeNode = (BSHReturnType)firstNode;
            paramsNode = (BSHFormalParameters)jjtGetChild(1);
            if ( jjtGetNumChildren() > 2+numThrows )
                blockNode = (BSHBlock)jjtGetChild(2+numThrows); // skip throws
            ++firstThrowsClause;
        }
        else
        {
            paramsNode = (BSHFormalParameters)jjtGetChild(0);
            blockNode = (BSHBlock)jjtGetChild(1+numThrows); // skip throws
        }
        paramsNode.insureParsed();
        isVarArgs = paramsNode.isVarArgs;
    }
875705
function isParentNodeType(parent, nodeType) {
            return parent.type === nodeType ||
                (parent.body && parent.body.type === nodeType) ||
                (parent.consequent && parent.consequent.type === nodeType);
        }
646842
public void setNodeTypeSpecificValues(java.util.Collection<NodeTypeSpecificValue> nodeTypeSpecificValues) {
        if (nodeTypeSpecificValues == null) {
            this.nodeTypeSpecificValues = null;
            return;
        }

        this.nodeTypeSpecificValues = new java.util.ArrayList<NodeTypeSpecificValue>(nodeTypeSpecificValues);
    }
179317
FunctionTypeBuilder inferParameterTypes(@Nullable Node paramsParent, @Nullable JSDocInfo info) {
    if (paramsParent == null) {
      if (info == null) {
        return this;
      } else {
        return inferParameterTypes(info);
      }
    }

    // arguments
    Node oldParameterType = null;
    if (parametersNode != null) {
      oldParameterType = parametersNode.getFirstChild();
    }

    FunctionParamBuilder builder = new FunctionParamBuilder(typeRegistry);
    boolean warnedAboutArgList = false;
    Set<String> allJsDocParams =
        (info == null) ? new HashSet<>() : new HashSet<>(info.getParameterNames());
    boolean isVarArgs = false;
    int paramIndex = 0;
    for (Node param : paramsParent.children()) {
      boolean isOptionalParam = false;

      if (param.isRest()) {
        isVarArgs = true;
        param = param.getOnlyChild();
      } else if (param.isDefaultValue()) {
        // The first child is the actual positional parameter
        param = checkNotNull(param.getFirstChild(), param);
        isOptionalParam = true;
      } else {
        isVarArgs = isVarArgsParameterByConvention(param);
        isOptionalParam = isOptionalParameterByConvention(param);
      }

      String paramName = null;
      if (param.isName()) {
        paramName = param.getString();
      } else {
        checkState(param.isDestructuringPattern());
        // Right now, the only way to match a JSDoc param to a destructuring parameter is through
        // ordering the JSDoc parameters. So the third formal parameter will correspond to the
        // third JSDoc parameter.
        if (info != null) {
          paramName = info.getParameterNameAt(paramIndex);
        }
      }
      allJsDocParams.remove(paramName);

      // type from JSDocInfo
      JSType parameterType = null;
      if (info != null && info.hasParameterType(paramName)) {
        JSTypeExpression parameterTypeExpression = info.getParameterType(paramName);
        parameterType = parameterTypeExpression.evaluate(templateScope, typeRegistry);
        isOptionalParam = isOptionalParam || parameterTypeExpression.isOptionalArg();
        isVarArgs = isVarArgs || parameterTypeExpression.isVarArgs();
      } else if (param.getJSDocInfo() != null && param.getJSDocInfo().hasType()) {
        JSTypeExpression parameterTypeExpression = param.getJSDocInfo().getType();
        parameterType = parameterTypeExpression.evaluate(templateScope, typeRegistry);
        isOptionalParam = parameterTypeExpression.isOptionalArg();
        isVarArgs = parameterTypeExpression.isVarArgs();
      } else if (oldParameterType != null &&
          oldParameterType.getJSType() != null) {
        parameterType = oldParameterType.getJSType();
        isOptionalParam = oldParameterType.isOptionalArg();
        isVarArgs = oldParameterType.isVarArgs();
      } else {
        parameterType = typeRegistry.getNativeType(UNKNOWN_TYPE);
      }

      warnedAboutArgList |= addParameter(
          builder, parameterType, warnedAboutArgList,
          isOptionalParam,
          isVarArgs);

      if (oldParameterType != null) {
        oldParameterType = oldParameterType.getNext();
      }
      paramIndex++;
    }
    // Copy over any old parameters that aren't in the param list.
    if (!isVarArgs) {
      while (oldParameterType != null && !isVarArgs) {
        builder.newParameterFromNode(oldParameterType);
        oldParameterType = oldParameterType.getNext();
      }
    }

    for (String inexistentName : allJsDocParams) {
      reportWarning(INEXISTENT_PARAM, inexistentName, formatFnName());
    }

    parametersNode = builder.build();
    return this;
  }
22068
def setnode(delta, graph, node, exists):
    """"""
    delta.setdefault(graph, {}).setdefault('nodes', {})[node] = bool(exists)
529428
public static void buildRowKeys(OrganigramNode node) {
        if (node.getChildren() != null && !node.getChildren().isEmpty()) {
            for (int i = 0; i < node.getChildren().size(); i++) {
                OrganigramNode childNode = node.getChildren().get(i);

                String childRowKey = (node.getParent() == null) ? String.valueOf(i) : node.getRowKey() + "_" + i;
                childNode.setRowKey(childRowKey);

                buildRowKeys(childNode);
            }
        }
    }
370873
@Override
  protected void visitExprNode(ExprNode node) {

    if (!(node instanceof ParentExprNode)) {
      return;
    }
    ParentExprNode nodeAsParent = (ParentExprNode) node;

    // Recurse.
    visitChildren(nodeAsParent);

    // If all children are constants, we attempt to preevaluate this node and replace it with a
    // constant.
    for (ExprNode child : nodeAsParent.getChildren()) {
      if (!isConstant(child)) {
        return; // cannot preevaluate
      }
    }
    attemptPreeval(nodeAsParent);
  }
1036495
public static void iterateChildren (@Nonnull final IHCNode aNode, @Nonnull final IHCIteratorCallback aCallback)
  {
    ValueEnforcer.notNull (aNode, "node");
    ValueEnforcer.notNull (aCallback, "callback");

    _recursiveIterateTreeBreakable (aNode, aCallback);
  }
882636
def init_node(cls, *args, **kwargs):
    
    node = cls()
    for name, value in zip(cls._fields, args):
        setattr(node, name, value)
    for name, value in kwargs:
        setattr(node, name, value)
    return node
1159305
private ObjectJS jsonTreeNode(CallTreeNode node, StringifierFactory jsonStringifierFactory) {
		final ObjectJS nodeJS = ObjectJS.create(node, jsonStringifierFactory);
		if (!node.getChildren().isEmpty()) {
			final ArrayJS childNodesJS=new ArrayJS(node.getChildren().size());
			for(CallTreeNode childNode:node.getChildren()) {
				childNodesJS.addElement(jsonTreeNode(childNode, jsonStringifierFactory));
			}
			nodeJS.setAttribute("children", childNodesJS);
		}
		return nodeJS;
	}
933082
function createBlock(type, nodes, props = {}) {
  if (!isArray(nodes)) {
    props = nodes;
    nodes = undefined;
  }

  const node = { object: 'block', type, ...props };
  return addNodes(node, nodes);
}
1214378
private void processNode(final Node node) {
        processNode(node.getPath(), node);

        Set<Node> children = node.getChildren();
        for (Node child : children) {
            processNode(child);
        }
    }
961095
public void addNode(String name, Set<ResourceType> resourceTypes) {
    List<FaultStatsForType> faultStats = new ArrayList<FaultStatsForType>(
        resourceTypes.size());
    for (ResourceType type : resourceTypes) {
      faultStats.add(new FaultStatsForType(type));
    }
    nodeToFaultStats.put(name, faultStats);
  }
1137088
def setAutoscaledNodeTypes(self, nodeTypes):
        
        self._spotBidsMap = {}
        self.nodeShapes = []
        self.nodeTypes = []
        for nodeTypeStr in nodeTypes:
            nodeBidTuple = nodeTypeStr.split(":")
            if len(nodeBidTuple) == 2:
                # This is a preemptable node type, with a spot bid
                nodeType, bid = nodeBidTuple
                self.nodeTypes.append(nodeType)
                self.nodeShapes.append(self.getNodeShape(nodeType, preemptable=True))
                self._spotBidsMap[nodeType] = bid
            else:
                self.nodeTypes.append(nodeTypeStr)
                self.nodeShapes.append(self.getNodeShape(nodeTypeStr, preemptable=False))
101704
public void setRestorableNodeTypes(java.util.Collection<String> restorableNodeTypes) {
        if (restorableNodeTypes == null) {
            this.restorableNodeTypes = null;
            return;
        }

        this.restorableNodeTypes = new com.amazonaws.internal.SdkInternalList<String>(restorableNodeTypes);
    }
556078
public static NodeImpl setTypeParameter(final NodeImpl node, final Class<?> containerClass,
      final Integer typeArgumentIndex) {
    return new NodeImpl( //
        node.name, //
        node.parent, //
        node.isIterableValue, //
        node.index, //
        node.key, //
        node.kind, //
        node.parameterTypes, //
        node.parameterIndex, //
        node.value, //
        containerClass, //
        typeArgumentIndex //
    );
  }
1058929
private void fillNodeList(P parent) {
		P prt = parent;
		if ((prt != null) && (prt.isLeaf())) {
			return;
		}
		while (prt != null) {
			if (!prt.isLeaf()) {
				if (!this.expandedNodes.contains(prt)) {
					this.expandedNodes.add(prt);
					for (int i = prt.getChildCount() - 1; i >= 0; --i) {
						final C child = prt.getChildAt(i);
						if (child != null) {
							final P cn = toTraversableChild(prt, child);
							if (cn != null) {
								this.availableNodes.push(cn);
							}
						}
					}
				} else {
					return;
				}
			}
			prt = this.availableNodes.isEmpty() ? null : this.availableNodes.peek();
			if ((prt != null) && (prt.isLeaf())) {
				return;
			}
		}
	}