create cross parameter node node.

@param parent parent node
@return new node implementation
972734
public static NodeImpl createCrossParameterNode(final NodeImpl parent) {
    return new NodeImpl( //
        CROSS_PARAMETER_NODE_NAME, //
        parent, //
        false, //
        null, //
        null, //
        ElementKind.CROSS_PARAMETER, //
        EMPTY_CLASS_ARRAY, //
        null, //
        null, //
        null, //
        null //
    );
  }
960470
@SuppressWarnings("unchecked")
	public static <T> TreeDef.Parented<TreeNode<T>> treeDef() {
		return (TreeDef.Parented<TreeNode<T>>) TREE_DEF;
	}
1348371
private Node newParameter(JSType type) {
    Node paramNode = Node.newString(Token.NAME, "");
    paramNode.setJSType(type);
    root.addChildToBack(paramNode);
    return paramNode;
  }
1176988
private void singlePointCrossover(BitString father, BitString mother, BitString[] offsprings) {
        int point = 0; // crossover point
        while (point == 0) {
            point = Math.randomInt(length);
        }

        int[] son = new int[length];
        System.arraycopy(father.bits, 0, son, 0, point);
        System.arraycopy(mother.bits, point, son, point, length - point);

        int[] daughter = new int[length];
        System.arraycopy(mother.bits, 0, daughter, 0, point);
        System.arraycopy(father.bits, point, daughter, point, length - point);

        offsprings[0] = new BitString(son, measure, crossover, crossoverRate, mutationRate);
        offsprings[1] = new BitString(daughter, measure, crossover, crossoverRate, mutationRate);
    }
46219
public void createPartControl(Composite parent) {
		viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
		viewer.setContentProvider(new ViewContentProvider());
		viewer.setLabelProvider(new ViewLabelProvider());
		viewer.setInput(createDummyModel());
	}
748852
public static String makePath(String parent, String child)
    {
        StringBuilder path = new StringBuilder();

        joinPath(path, parent, child);

        return path.toString();
    }
587526
public static R create(String text, P parentParagraph) {
        R run = create(text);
        applyParagraphStyle(parentParagraph, run);
        return run;
    }
1095483
public Element createElement(org.w3c.dom.Element element, Element parent) throws
      InvalidInputException {
    String tag = element.getNodeName();

    if (Header.isHeaderElement(tag)) {
      return new Header(parent, tag);
    }

    switch (tag) {
      case Chime.MESSAGEML_TAG:
        validateFormat(tag);
        return new Chime(parent, FormatEnum.MESSAGEML);

      case Chime.PRESENTATIONML_TAG:
        return new Chime(parent, FormatEnum.PRESENTATIONML);

      case Paragraph.MESSAGEML_TAG:
        return new Paragraph(parent);

      case LineBreak.MESSAGEML_TAG:
        return new LineBreak(parent);

      case HorizontalRule.MESSAGEML_TAG:
        return new HorizontalRule(parent);

      case Span.MESSAGEML_TAG:
        switch (element.getAttribute(CLASS_ATTR)) {
          case Entity.PRESENTATIONML_CLASS:
            return createEntity(element, parent);
          default:
            return new Span(parent);
        }

      case Div.MESSAGEML_TAG:
        switch (element.getAttribute(CLASS_ATTR)) {
          case Entity.PRESENTATIONML_CLASS:
            return createEntity(element, parent);
          case Card.PRESENTATIONML_CLASS:
            element.removeAttribute(CLASS_ATTR);
            return new Card(parent, FormatEnum.PRESENTATIONML);
          case CardBody.PRESENTATIONML_CLASS:
            element.removeAttribute(CLASS_ATTR);
            return new CardBody(parent, FormatEnum.PRESENTATIONML);
          case CardHeader.PRESENTATIONML_CLASS:
            element.removeAttribute(CLASS_ATTR);
            return new CardHeader(parent, FormatEnum.PRESENTATIONML);
          default:
            return new Div(parent);
        }

      case Bold.MESSAGEML_TAG:
        return new Bold(parent);

      case Italic.MESSAGEML_TAG:
        return new Italic(parent);

      case Preformatted.MESSAGEML_TAG:
        return new Preformatted(parent);

      case HashTag.MESSAGEML_TAG:
        validateFormat(tag);
        return new HashTag(parent, ++index);

      case CashTag.MESSAGEML_TAG:
        validateFormat(tag);
        return new CashTag(parent, ++index);

      case Mention.MESSAGEML_TAG:
        validateFormat(tag);
        return new Mention(parent, ++index, dataProvider);

      case Link.MESSAGEML_TAG:
        return new Link(parent, dataProvider);

      case Image.MESSAGEML_TAG:
        return new Image(parent);

      case BulletList.MESSAGEML_TAG:
        return new BulletList(parent);

      case OrderedList.MESSAGEML_TAG:
        return new OrderedList(parent);

      case ListItem.MESSAGEML_TAG:
        return new ListItem(parent);

      case Table.MESSAGEML_TAG:
        return new Table(parent);

      case TableHeader.MESSAGEML_TAG:
        return new TableHeader(parent);

      case TableBody.MESSAGEML_TAG:
        return new TableBody(parent);

      case TableFooter.MESSAGEML_TAG:
        return new TableFooter(parent);

      case TableRow.MESSAGEML_TAG:
        return new TableRow(parent);

      case TableHeaderCell.MESSAGEML_TAG:
        return new TableHeaderCell(parent);

      case TableCell.MESSAGEML_TAG:
        return new TableCell(parent);

      case Card.MESSAGEML_TAG:
        validateFormat(tag);
        return new Card(parent, FormatEnum.MESSAGEML);

      case Code.MESSAGEML_TAG:
        return new Code(parent);

      case CardHeader.MESSAGEML_TAG:
        validateFormat(tag);
        return new CardHeader(parent, FormatEnum.MESSAGEML);

      case CardBody.MESSAGEML_TAG:
        validateFormat(tag);
        return new CardBody(parent, FormatEnum.MESSAGEML);

      case Emoji.MESSAGEML_TAG:
        return new Emoji(parent, ++index);

      case Form.MESSAGEML_TAG:
        return new Form(parent);

      case Button.MESSAGEML_TAG:
        return new Button(parent);

      default:
        throw new InvalidInputException("Invalid MessageML content at element \"" + tag + "\"");
    }
  }
464895
public static PlanNode transpose(PlanNode parent, PlanNode child)
    {
        return child.replaceChildren(ImmutableList.of(
                parent.replaceChildren(
                        child.getSources())));
    }
494190
public static EntityType create(@NonNull String name, EntityType parent) {
      EntityType toReturn = DynamicEnum.register(new EntityType(name, parent));
      if (toReturn.setParentIfAbsent(parent)) {
         Config.setProperty(toReturn.canonicalName() + ".parent", parent.canonicalName());
      }
      values.add(toReturn);
      return toReturn;
   }
299441
protected ComponentContainer createContainer(@Nullable ComponentContainer parent) {
    if (parent == null) {
      return new ComponentContainer();
    }
    return parent.createChild();
  }
1247455
public static Iterator<Node> iterator(Node parent) {
        return parent != null ? new JsArrayNodeIterator(parent) : emptyIterator();
    }
271382
public static <T extends HierarchyEntity<T, ?>> void addParent(Collection<T> nodes) {
    addParent(nodes, null);
  }
473385
public static NodeImpl createPropertyNode(final String name, final NodeImpl parent) {
    return new NodeImpl( //
        name, //
        parent, //
        false, //
        null, //
        null, //
        ElementKind.PROPERTY, //
        EMPTY_CLASS_ARRAY, //
        null, //
        null, //
        null, //
        null //
    );
  }
254028
protected final void setParentNode(final DiffNode parentNode)
	{
		if (this.parentNode != null && this.parentNode != parentNode)
		{
			throw new IllegalStateException("The parent of a node cannot be changed, once it's set.");
		}
		this.parentNode = parentNode;
	}
291627
public static Matcher<Tree> parentNode(Matcher<? extends Tree> treeMatcher) {
    @SuppressWarnings("unchecked") // Safe contravariant cast
    Matcher<Tree> matcher = (Matcher<Tree>) treeMatcher;
    return new ParentNode(matcher);
  }
1042567
public SharedTreeNode makeRightChildNode(SharedTreeNode parent) {
    SharedTreeNode child = new SharedTreeNode(nodesArray.size(), parent, subgraphNumber, parent.getDepth() + 1);
    nodesArray.add(child);
    makeRightEdge(parent, child);
    return child;
  }