It might help to take a look at this sample: URCap Sample: Vision Template Builder
Src → PickProgramNodeContribution.java
I would think that the code should look something like this:
TreeNode root = MoveP node
root.addChild(Point_2).
But check the out the API Reference for TreeNode/Program node and the sample.