If tree refers to a superclass constructor call,
add all free variables of the superclass.
761261
public void visitApply(JCMethodInvocation tree) {
            if (TreeInfo.name(tree.meth) == names._super) {
                addFreeVars((ClassSymbol) TreeInfo.symbol(tree.meth).owner);
            }
            super.visitApply(tree);
        }
139533
private void putSuperAndThisConstructorSymbols()
  {
    IGosuClassInternal thisClass = getGosuClass();
    IGosuClassInternal superClass = thisClass.getSuperClass();
    if( superClass != null )
    {
      for( DynamicFunctionSymbol dfs : superClass.getConstructorFunctions() )
      {
        if( superClass.isAccessible( getGosuClass(), dfs ) )
        {
          dfs = new SuperConstructorFunctionSymbol( superClass.isParameterizedType()
                                                    ? dfs.getParameterizedVersion( superClass )
                                                    : dfs );
          getSymbolTable().putSymbol( dfs );
          getOwner().putDfsDeclInSetByName( dfs );
        }
      }
    }
    for( DynamicFunctionSymbol dfs : thisClass.getConstructorFunctions() )
    {
      dfs = new ThisConstructorFunctionSymbol( dfs );
      getSymbolTable().putSymbol( dfs );
      getOwner().putDfsDeclInSetByName( dfs );
    }
  }
882320
void fillSuperReferences(Node externs, Node root) {
    NodeTraversal.Callback collectSuper =
        new AbstractPostOrderCallback() {
          @Override
          public void visit(NodeTraversal t, Node n, Node parent) {
            // Process only 'super' nodes with types.
            if (!n.isSuper() || n.getJSType() == null) {
              return;
            }
            Symbol classSymbol = getSymbolForTypeHelper(n.getJSType(), /* linkToCtor= */ false);
            if (classSymbol != null) {
              classSymbol.defineReferenceAt(n);
            }
          }
        };
    NodeTraversal.traverseRoots(compiler, collectSuper, externs, root);
  }
1306275
def add_root(cls, **kwargs):
        """"""

        # do we have a root node already?
        last_root = cls.get_last_root_node()

        if last_root and last_root.node_order_by:
            # there are root nodes and node_order_by has been set
            # delegate sorted insertion to add_sibling
            return last_root.add_sibling('sorted-sibling', **kwargs)

        if last_root:
            # adding the new root node as the last one
            newtree_id = last_root.tree_id + 1
        else:
            # adding the first root node
            newtree_id = 1

        if len(kwargs) == 1 and 'instance' in kwargs:
            # adding the passed (unsaved) instance to the tree
            newobj = kwargs['instance']
            if newobj.pk:
                raise NodeAlreadySaved("Attempted to add a tree node that is "\
                    "already in the database")
        else:
            # creating the new object
            newobj = get_result_class(cls)(**kwargs)

        newobj.depth = 1
        newobj.tree_id = newtree_id
        newobj.lft = 1
        newobj.rgt = 2
        # saving the instance before returning it
        newobj.save()
        return newobj
913637
function _addNewEntries(treeData, added) {
        added.forEach(function (filePath) {
            var isFolder = _.last(filePath) === "/";

            filePath = isFolder ? filePath.substr(0, filePath.length - 1) : filePath;

            var parentPath = FileUtils.getDirectoryPath(filePath),
                parentObjectPath = _filePathToObjectPath(treeData, parentPath),
                basename = FileUtils.getBaseName(filePath);

            if (parentObjectPath) {
                // Verify that the children are loaded
                var childrenPath = _.clone(parentObjectPath);
                childrenPath.push("children");
                if (treeData.getIn(childrenPath) === null) {
                    return;
                }

                treeData = _createPlaceholder(treeData, parentPath, basename, isFolder, {
                    notInCreateMode: true,
                    doNotOpen: true
                });
            }
        });

        return treeData;
    }
376162
void addBridges(DiagnosticPosition pos, ClassSymbol origin, ListBuffer<JCTree> bridges) {
        Type st = types.supertype(origin.type);
        while (st.hasTag(CLASS)) {
//          if (isSpecialization(st))
            addBridges(pos, st.tsym, origin, bridges);
            st = types.supertype(st);
        }
        for (List<Type> l = types.interfaces(origin.type); l.nonEmpty(); l = l.tail)
//          if (isSpecialization(l.head))
            addBridges(pos, l.head.tsym, origin, bridges);
    }
949012
private void addTypeSubstitutions(Map<Wrapper<ExprNode>, SoyType> substitutionsToAdd) {
    for (Map.Entry<Wrapper<ExprNode>, SoyType> entry : substitutionsToAdd.entrySet()) {
      ExprNode expr = entry.getKey().get();
      // Get the existing type
      SoyType previousType = expr.getType();
      for (TypeSubstitution subst = substitutions; subst != null; subst = subst.parent) {
        if (ExprEquivalence.get().equivalent(subst.expression, expr)) {
          previousType = subst.type;
          break;
        }
      }

      // If the new type is different than the current type, then add a new type substitution.
      if (!entry.getValue().equals(previousType)) {
        substitutions = new TypeSubstitution(substitutions, expr, entry.getValue());
      }
    }
  }
1233134
private function buildTree(string $class): void
    {
        $level = 0;
        $stack = new SplStack();

        while (true) {

            //initialize array if not already initialized
            if (empty($this->tree[$level][$class])) {
                $this->tree[$level][$class] = [];
            }

            //get parameter from constructor
            //can return error when constructor not declared
            $parameters = (new ReflectionClass($class))->getConstructor()->getParameters();

            //loop parameter
            foreach ($parameters as $param) {

                //check if argument is already stored
                $notAlreadyStored = !\in_array($param, $this->tree[$level][$class]);

                //if there is parameter with callable type
                if (\class_exists((string) $param->getType()) && $notAlreadyStored) {

                    //push values in stack for simulate later recursive function
                    $stack->push([$level, $class]);

                    //store dependency
                    $this->tree[$level][$class][] = $param;

                    //update values for simulate recursive function
                    $level++;
                    $class = $param->getClass()->name;

                    //return to main while
                    continue 2;
                }

                if ($notAlreadyStored) {
                    //store dependency
                    $this->tree[$level][$class][] = $param;
                }
            }

            //if stack is empty break while end exit from function
            if ($stack->count() === 0) {
                break;
            }

            //get last value pushed into stack;
            list($level, $class) = $stack->pop();
        }
    }
1126670
public void add(int var, Type t) {
    Set<Integer> tVars = t.getTypeVariables();
    Set<Integer> intersection = Sets.intersection(tVars, bindings.keySet());
    Preconditions.checkArgument(intersection.size() == 0,
        "Tried to replace %s with %s, but already have bindings for %s", var, t, intersection);
    Preconditions.checkArgument(!tVars.contains(var),
        "Recursive replacement: tried to replace %s with %s", var, t);
    
    Map<Integer, Type> newBinding = Maps.newHashMap();
    newBinding.put(var, t);
    for (int boundVar : bindings.keySet()) {
      bindings.put(boundVar, bindings.get(boundVar).substitute(newBinding));
    }
    bindings.put(var, t);
  }
626513
private void initialize(Map context) {
    // Guard against recursion.
    context.put(jsTypeTree, this);

    // Create temporary accumulators for the contents of the fields and variants instance
    // variables.
    List tmpFields = new ArrayList();
    List tmpVariants = new ArrayList();

    // Perform tasks assigned to the recursive 'number' subroutine (see comment there)
    number(jsTypeTree, context, false, 0, tmpFields, tmpVariants);

    // Move information from temporaries into permanent instance variables
    fields = (JSField[])tmpFields.toArray(new JSField[0]);
    variants = (JSVariant[])tmpVariants.toArray(new JSVariant[0]);

    // Compute the contents of the 'boxed' instance variable, which is deriveable from the
    // contents of those JSVariants which have found their way into 'fields.'  These are
    // all intended to be boxed variants because they were detected to be underneath
    // JSRepeated nodes during the 'number' process.
    int boxLen = 0; // accumulate total length of boxed array
    for (int i = 0; i < fields.length; i++)
      if (fields[i] instanceof JSVariant)
        // On the first pass, we box the variant and accumulate its accessor count
        boxLen += ((JSVariant)fields[i]).box(context).getAccessorCount();
    boxed = new int[boxLen][];
    int boxIndex = 0;

    // On the second pass through the boxed variants, we get their accessor count a second
    // time and use it this time to fill in the contents of the 'boxed' instance variable
    // proper.
    for (int i = 0; i < fields.length; i++)
      if (fields[i] instanceof JSVariant)
        for (int j = 0; j < ((JSVariant)fields[i]).getBoxed().getAccessorCount(); j++)
          boxed[boxIndex++] = new int[] { i, j };

    // Set the 'accessor' property of every JSField in the tree (see comment on
    // setAccessors).
    setAccessors(0, this);

    // Set the multiChoiceCount for each node in the tree.  Note this must be done
    // after boxing any variants found underneath JSRepeated nodes, since boxing changes
    // the multiChoiceCount.  setMultiChoiceCount is a recursive method that will set
    // counts starting from the leaves working back to the root.
    jsTypeTree.setMultiChoiceCount();

    // Compute the serialForm if it isn't already there due to the deserializing
    // constructor
    if (serialForm == null) {
      // Store the name in a convenient non-null form
      name = jsTypeTree.getFeatureName();
      if (name == null)
        name = "";
      try {
        byte[] utfname = name.getBytes("UTF8");
        serialForm = new byte[2 + utfname.length + 2 + jsTypeTree.encodedTypeLength()];
        ArrayUtil.writeShort(serialForm, 0, (short)utfname.length);
        System.arraycopy(utfname, 0, serialForm, 2, utfname.length);
        int limits[] = new int[] { 2 + utfname.length, serialForm.length };
        JSType.setCount(serialForm, limits, version);
        jsTypeTree.encodeType(serialForm, limits);
      } catch (UnsupportedEncodingException e) {
        FFDCFilter.processException(e, "initialize", "604");
        IllegalArgumentException ex = new IllegalArgumentException();
        ex.initCause(e);
        throw ex;
      }
    }

    // Compute the schemaID, which is a 64-bit truncated SHA-1 hash over the serialForm.
    schemaID = CryptoHash.hash(serialForm);
    schemaLongID = Long.valueOf(schemaID);
  }
1006868
@Nonnull
  public ExpressionTreeElement addSubTree(@Nonnull final ExpressionTree tree) {
    assertNotEmptySlot();

    final ExpressionTreeElement root = tree.getRoot();
    if (!root.isEmptySlot()) {
      root.makeMaxPriority();
      addElementToNextFreeSlot(root);
    }
    return this;
  }
1322438
private void updateGlobalNameDeclarationAtVariableNode(
      Name n, boolean canCollapseChildNames) {
    if (!canCollapseChildNames) {
      return;
    }

    Ref ref = n.getDeclaration();
    String name = ref.getNode().getString();
    Node rvalue = ref.getNode().getFirstChild();
    Node variableNode = ref.getNode().getParent();
    Node grandparent = variableNode.getParent();

    boolean isObjLit = rvalue.isObjectLit();

    if (isObjLit) {
      declareVariablesForObjLitValues(
          n, name, rvalue, variableNode, variableNode.getPrevious(), grandparent);
    }

    addStubsForUndeclaredProperties(n, name, grandparent, variableNode);

    if (isObjLit && canEliminate(n)) {
      variableNode.removeChild(ref.getNode());
      compiler.reportChangeToEnclosingScope(variableNode);
      if (!variableNode.hasChildren()) {
        grandparent.removeChild(variableNode);
      }

      // Clear out the object reference, since we've eliminated it from the
      // parse tree.
      n.updateRefNode(ref, null);
    }
  }
888381
public static void add(ClassVisitor  cw, ClassInfo classInfo, boolean typeQueryRootBean) {

    List<FieldInfo> fields = classInfo.getFields();

    if (fields != null) {
      for (FieldInfo field : fields) {
        field.writeMethod(cw, typeQueryRootBean);
      }
    }
  }
891338
private void init() {
        // Add this node to parents children
        if (null != parent) { parent.getChildren().add(this); }

        children.addListener((ListChangeListener<TreeNode>) c -> {
            while (c.next()) {
                if (c.wasRemoved()) { c.getRemoved().forEach(removedItem -> removedItem.removeAllTreeNodeEventListeners()); }
            }
            getTreeRoot().fireTreeNodeEvent(CHILDREN_CHANGED);
        });
    }
1095253
public void addTree(@Nonnull final ExpressionTree tree) {
    assertNotNull("Tree is null", tree);
    if (last.isEmptySlot()) {
      final ExpressionTreeElement thatTreeRoot = tree.getRoot();
      if (!thatTreeRoot.isEmptySlot()) {
        last = thatTreeRoot;
        last.makeMaxPriority();
      }
    } else {
      last = last.addSubTree(tree);
    }
  }
252719
private void addModuleToTree(final DbModule module, final TreeNode tree) {
        final TreeNode subTree = new TreeNode();
        subTree.setName(module.getName());
        tree.addChild(subTree);

        // Add SubsubModules
        for (final DbModule subsubmodule : module.getSubmodules()) {
            addModuleToTree(subsubmodule, subTree);
        }
    }
1298529
def add_child(self, tree):
        '''
        '''
        tree.parent = self
        self.children.append(tree)
        return tree