Adds the caller of parentExpr to the current body of the last
function that was created.

@param parentExpr
557338
private void updateCurrentFunction(AbstractFunctionExpression parentExpr) {
        GroovyExpression expr = parentExpr.getCaller();
        if (expr instanceof AbstractFunctionExpression) {
            AbstractFunctionExpression exprAsFunction = (AbstractFunctionExpression) expr;
            GroovyExpression exprCaller = exprAsFunction.getCaller();
            parentExpr.setCaller(exprCaller);
            updateCurrentFunctionDefintion(exprAsFunction);
        }
    }
1161880
void setParent(ProjectCalendarWeek parent)
   {
      m_parent = parent;

      for (int loop = 0; loop < m_days.length; loop++)
      {
         if (m_days[loop] == null)
         {
            m_days[loop] = DayType.DEFAULT;
         }
      }
   }
1155860
public function add($parentexpr, $value, $name = "")
    {
        $get = $this->get($parentexpr);
        if ($parents =& $get) {

            foreach ($parents as &$parent) {
                $parent = is_array($parent) ? $parent : array();

                if ($name != "") {
                    $parent[$name] = $value;
                } else {
                    $parent[] = $value;
                }
            }

            return true;
        }

        return false;
    }
810168
void setParent(JMFMessageData parent) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.entry(this, tc, "setParent", new Object[] { parent });

        synchronized (getMessageLockArtefact()) {

            // If the parent is a JSMessageData then this is straight forward
            if (parent instanceof JSMessageData) {
                parentMessage = (JSMessageData) parent;
                master = ((JSMessageData) parent).master;
                containingMessage = ((JSMessageData) parent).compatibilityWrapperOrSelf;
            }

            // ... if not, it must be a JSCompatibleMessageImpl, and its encoding must
            // be a JSMessageData, because if it was a JMFEncapsulation it couldn't be our parent
            else {
                JSMessageData msg = (JSMessageData) ((JSCompatibleMessageImpl) parent).getEncodingMessage();
                parentMessage = msg;
                master = msg.master;
                containingMessage = parent;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            JmfTr.exit(this, tc, "setParent");
    }
1085519
protected void afterParserOrEnumRuleCall() {
	ICompositeNode newCurrent = nodeBuilder.compressAndReturnParent(currentNode);
	if(currentNode == lastConsumedNode){
		lastConsumedNode = newCurrent;
	}
		currentNode = newCurrent;
    }
465035
private function forExpr(ForNode $parent, $terminator, $property_name, $is_last = FALSE, $terminator_name = NULL) {
    if ($this->tryMatch($terminator, $parent)) {
      $parent->addChild(new CommaListNode(), $property_name);
      return;
    }
    $parent->addChild($this->exprList(), $property_name);
    $this->mustMatch($terminator, $parent, $terminator_name, $is_last, FALSE);
  }
102782
function isCallbackExpression(node, parentNode) {

            // ensure the parent node exists and is an expression
            if (!parentNode || parentNode.type !== "ExpressionStatement") {
                return false;
            }

            // cb()
            if (parentNode.expression === node) {
                return true;
            }

            // special case for cb && cb() and similar
            if (parentNode.expression.type === "BinaryExpression" || parentNode.expression.type === "LogicalExpression") {
                if (parentNode.expression.right === node) {
                    return true;
                }
            }

            return false;
        }
1333276
private void handleParentMethod(ExecutableElement parentMethodElement, ExecutableElement
      childMethodElement) {
    MethodReferenceNode parentMethodNode = (MethodReferenceNode) elementReferenceMap
        .get(stitchMethodIdentifier(parentMethodElement));
    if (parentMethodNode == null) {
      parentMethodNode = new MethodReferenceNode(parentMethodElement);
    }
    parentMethodNode.invokedMethods.add(stitchMethodIdentifier(childMethodElement));
    elementReferenceMap.put(stitchMethodIdentifier(parentMethodElement), parentMethodNode);
    addToOverrideMap(parentMethodElement);
  }
667752
public void init(RecordOwnerParent parent, String strSourcePrefix)
    {
        beforePackage = "";
        foundComment = false;
        foundPackage = false;
        lineSeparator = (String) java.security.AccessController.doPrivileged(new sun.security.action.GetPropertyAction("line.separator"));;
        super.init(parent, strSourcePrefix);
    }
103939
public static function addList(DOMElement $parent, array $extensions) : void
    {
        if (empty($extensions)) {
            return;
        }

        $extElement = $parent->ownerDocument->createElementNS(Constants::NS_SAMLP, 'samlp:Extensions');
        $parent->appendChild($extElement);

        foreach ($extensions as $ext) {
            $ext->toXML($extElement);
        }
    }
381028
void addParentBuffer(StreamCharBuffer parent) {
        if (!notifyParentBuffersEnabled) return;

        if (parentBuffers==null) {
            parentBuffers=new HashSet<SoftReference<StreamCharBufferKey>>();
        }
        parentBuffers.add(new SoftReference<StreamCharBufferKey>(parent.bufferKey));
    }
239509
protected void setParent(Node newParent, boolean removeDep) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setParent entry: new parent will be: " + newParent + " for node: " + this);
        }

        Node oldParent = parent;

        parent = newParent;
        if (newParent != null) {
            parent.addDependent(this);
        }

        // removing dependents can cause ConcurrentModificationException if calling is iterating over a list of dependent nodes
        // therefore removeDep should be false if setParent is being called while iterating or looping over a list of
        // dependent nodes.
        if (removeDep) {
            // remove this node from the old parents list of dependents.
            if (oldParent != null) {
                if (newParent == null) {
                    oldParent.removeDependent(this);
                } else if (oldParent.getStreamID() != parent.getStreamID()) {
                    oldParent.removeDependent(this);
                }
            }
        }
    }
421865
public final void setParent(ElementBase parent) {
        ElementBase oldParent = this.parent;
        
        if (oldParent == parent) {
            return;
        }
        
        if (oldParent != null) {
            oldParent.removeChild(this, false);
        }
        
        if (parent != null) {
            parent.addChild(this);
        }
    }
626998
public void setParentIdentifier(String parentIdentifier) {

        // Translate root identifier back into null
        if (parentIdentifier != null
                && parentIdentifier.equals(RootConnectionGroup.IDENTIFIER))
            parentIdentifier = null;

        getModel().setParentIdentifier(parentIdentifier);

    }
1190838
protected void attachParentListener() {

        final AutoRelease ar = ClassUtility.getLastClassAnnotation(this.getClass(), AutoRelease.class);

        // Only manage automatic release when the annotation exists with true value
        if (ar != null && ar.value() && node() != null) { // TODO check rootnode null when using NullView

            // Allow to release the model if the root business object doesn't exist anymore
            node().parentProperty().addListener(new ChangeListener<Node>() {

                @Override
                public void changed(final ObservableValue<? extends Node> observable, final Node oldValue, final Node newValue) {
                    if (newValue != null) {
                        AbstractBaseModel.this.hasBeenAttached = true;
                    }
                    if (newValue == null && AbstractBaseModel.this.hasBeenAttached) {
                        AbstractBaseModel.this.hasBeenAttached = false;
                        release();
                        node().parentProperty().removeListener(this);
                    }
                }

            });
        }
    }
1104778
public final void entryRuleXParenthesizedExpression() throws RecognitionException {
        try {
            // InternalXbase.g:859:1: ( ruleXParenthesizedExpression EOF )
            // InternalXbase.g:860:1: ruleXParenthesizedExpression EOF
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getXParenthesizedExpressionRule()); 
            }
            pushFollow(FOLLOW_1);
            ruleXParenthesizedExpression();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getXParenthesizedExpressionRule()); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
1313827
public void setParent(AstNode parent) {
        if (parent == this.parent) {
            return;
        }

        // Convert position back to absolute.
        if (this.parent != null) {
            setRelative(-this.parent.getAbsolutePosition());
        }

        this.parent = parent;
        if (parent != null) {
            setRelative(parent.getAbsolutePosition());
        }
    }