Enter description here ...

@param  PhingFile $parent
@param  string $child
@throws NullPointerException
6776
protected function _constructFileParentStringChild($parent, $child = null)
    {
        // obtain ref to the filesystem layer
        $fs = FileSystem::getFileSystem();

        if ($child === null) {
            throw new NullPointerException("Argument to function must not be null");
        }

        if ($parent !== null) {
            if ($parent->path === "") {
                $this->path = $fs->resolve($fs->getDefaultParent(), $fs->normalize($child));
            } else {
                $this->path = $fs->resolve($parent->path, $fs->normalize($child));
            }
        } else {
            $this->path = $fs->normalize($child);
        }
        $this->prefixLength = $fs->prefixLength($this->path);
    }
571397
@SuppressWarnings("unchecked")
  public void setParent(PvmExecutionImpl parent) {
    PvmExecutionImpl currentParent = getParent();

    setParentExecution(parent);

    if (currentParent != null) {
      currentParent.getExecutions().remove(this);
    }

    if (parent != null) {
      ((List<PvmExecutionImpl>) parent.getExecutions()).add(this);
    }
  }
156807
private function handleParentClassNotFound(ParentClassNotFoundException $exception, &$classMap)
    {
        // Now collect all parent classes and display them then.
        $classes = array();
        while ($exception) {
            $parentClass = $exception->getParentClass();
            $classes[]   = $parentClass;
            $exception   = $exception->getPrevious();

            unset($classMap[$parentClass]);
        }
        $classes     = array_reverse($classes);
        $parentClass = array_shift($classes);
        // Check if the parent class is known in the class map.
        if (isset($this->classMap[$parentClass])) {
            // It is known, nothing we can do anymore. Next one.
            $this->logger->error(
                'Could not load class.' . "\n" .
                'class:  {class}' . "\n" .
                'file:   {file}',
                array('class' => $parentClass, 'parent' => $this->classMap[$parentClass])
            );
        }
        $logLine = '{class0}<Missing parent class!>';
        $args    = array('class0' => $parentClass);
        // Ok, top most parent is somewhere lost, log this incident.
        foreach ($classes as $class) {
            $parName        = sprintf('class%1$d', count($args));
            $logLine       .= sprintf(' <= {%1$s}', $parName);
            $args[$parName] = $class;
        }

        $this->logger->warning($logLine, $args);
    }
304803
public function isDescendantOf($child, $parent)
    {
        $childMeta = $this->getMetadataForType($child);
        if (false === $childMeta->isChildEntity()) {
            return false;
        }
        if ($childMeta->getParentEntityType() === $parent) {
            return true;
        }
        return $this->isDescendantOf($childMeta->getParentEntityType(), $parent);
    }
24400
public function resolve($parent_path, $child_path) {
        if (!is_string($parent_path)) {
            throw new \InvalidArgumentException("The first path param must be string.");
        }
        if (!is_string($child_path)) {
            throw new \InvalidArgumentException("The child Path param must be string.");
        }
        $real_path = null;
        if ('/' === substr($child_path, 0, 1)) {
            $real_path = $child_path;
        } elseif (preg_match('#^[a-zA-Z]:[\/\\\]#', $child_path)) {
            $real_path = $child_path;
        } else {
            if (\is_dir($parent_path)) {
                // Resolve as a relative path join.
                $real_path = $parent_path . '/' . $child_path;
            } else {
                // Resolve as a file position search.
                $real_path = dirname($parent_path) . '/' . $child_path;
            }
        }
        return $this->normalize($real_path);
    }
1179297
public void setParent( IVarDef parent)
    {
    parent_ = parent;
    pathName_ = null;
    effCondition_ = null;
    position_ = null;
    }
1084981
public static void lazyAppend(Element parent, Element child) {
        if (!parent.contains(child)) {
            parent.appendChild(child);
        }
    }
233642
protected function loadFile(PhingFile $file)
    {
        $fileParser = $this->fileParserFactory->createParser($file->getFileExtension());
        $props = new Properties(null, $fileParser);
        $this->log("Loading " . $file->getAbsolutePath(), $this->logOutput ? Project::MSG_INFO : Project::MSG_VERBOSE);
        try { // try to load file
            if ($file->exists()) {
                $props->load($file);
                $this->addProperties($props);
            } else {
                $this->log(
                    "Unable to find property file: " . $file->getAbsolutePath() . "... skipped",
                    $this->quiet ? Project::MSG_VERBOSE : Project::MSG_WARN
                );
            }
        } catch (IOException $ioe) {
            throw new BuildException("Could not load properties from file.", $ioe);
        }
    }
325665
public function addGroup($parent, $child)
    {
        // Find the parent group's dn
        $parentDn = $this->dn($parent);

        $childDn = $this->dn($child);

        if ($parentDn && $childDn) {
            $add['member'] = $childDn;

            // Add the child to the parent group and return the result
            return $this->connection->modAdd($parentDn, $add);
        }

        return false;
    }
108049
public final void removeChild(Node child) {
    checkState(child.parent == this, "%s is not the parent of %s", this, child);
    checkNotNull(child.previous);

    Node last = first.previous;
    Node prevSibling = child.previous;
    Node nextSibling = child.next;
    if (first == child) {
      first = nextSibling;
      if (nextSibling != null) {
        nextSibling.previous = last;
      }
      // last.next remains null
    } else if (child == last) {
      first.previous = prevSibling;
      prevSibling.next = null;
    } else {
      prevSibling.next = nextSibling;
      nextSibling.previous = prevSibling;
    }

    child.next = null;
    child.previous = null;
    child.parent = null;
  }
997084
private function addSkipped(ParentNode $parent) {
    $parent->addChildren($this->getSkipNodes($this->skipped));
    $this->skipped = [];
    $this->matchDocComment($this->skipParent ?: $parent, NULL);
    $this->skipParent = NULL;
  }
41827
final void checkChildScope(S parent) {
    checkNotNull(parent);
    checkArgument(NodeUtil.createsScope(rootNode), rootNode);
    checkArgument(
        rootNode != parent.getRootNode(),
        "rootNode should not be the parent's root node: %s", rootNode);
  }
423651
public static function isBeneath(string $child, string $parent)
    {
        if ((strlen($child) >= strlen($parent))
            && strpos($child, $parent) === 0) {
                return true;
        }

        return false;
    }
765140
public void addToFirstChildren(XmlElement parent,Element child){
        List<Element> elements = parent.getElements();
        elements.add(0,child);
    }
112946
public void addChild(Config child)
  {
    Params.notNull(child, "Child");
    child.parent = this;
    children.add(child);
  }
512269
public function load(LoadingContext $context, ParentChildMap $map)
    {
        $filteredParentMap = new ParentChildMap();
        $parentItemMap     = new \SplObjectStorage();
        $relatedEntityMap  = $context->getIdentityMap($this->mapper->getObjectType());

        foreach ($map->getItems() as $item) {
            $relatedId = $item->getParent()->getColumn($this->foreignKeyToRelated);

            if ($relatedId === null) {
                $item->setChild(null);
            } elseif ($this->reference instanceof RelationIdentityReference) {
                $item->setChild((int)$relatedId);
            } elseif ($relatedEntityMap->has($relatedId)) {
                $item->setChild($relatedEntityMap->get($relatedId));
            } else {
                $filteredParentMap->add($item->getParent(), null);
                $parentItemMap[$item->getParent()] = $item;
            }
        }

        if ($filteredParentMap->getAllChildren()) {
            parent::load($context, $filteredParentMap);

            foreach ($filteredParentMap->getItems() as $item) {
                /** @var ParentChildItem $originalItem */
                $originalItem = $parentItemMap[$item->getParent()];
                $originalItem->setChild($item->getChild());
            }
        }
    }
761401
public RedwoodConfiguration handler(final LogRecordHandler parent, final LogRecordHandler child){
    tasks.add(new Runnable() { public void run() { Redwood.appendHandler(parent, child);} });
    return this;
  }