This methods only propagates down an expression e coming from a provider parent p of a LJ node n,
and not the joining condition of n.
<p>
e is not added to the joining condition of n,
but may be propagated down d irectly to the left subtree of n
518484
private Push findPushInLeftJoinRootedSubtree(IntermediateQuery query,
                                                 ImmutableExpression expression,
                                                 JoinOrFilterNode providerNode,
                                                 LeftJoinNode currentNode) {
        QueryNode leftChild = query.getChild(currentNode, LEFT)
                .orElseThrow(() -> new MinorOntopInternalBugException("Was expecting a left child"));

        return query.getVariables(leftChild).containsAll(expression.getVariables())
                ? new Push(new Recipient(leftChild), expression)
                : getProviderAsPush(providerNode, expression);
    }
614713
protected static void buildTree(EndpointPart parent, String[] parts, int index, String endpointType) {
        // Check if operation qualifier is part of last element
        String name = parts[index];
        String qualifier = null;

        if (index == parts.length - 1) {
            qualifier = EndpointUtil.decodeEndpointOperation(parts[index], false);
            name = EndpointUtil.decodeEndpointURI(parts[index]);
        }

        // Check if part is defined in the parent
        EndpointPart child = parent.addChild(name);

        if (index < parts.length - 1) {
            buildTree(child, parts, index + 1, endpointType);
        } else {
            // Check if part has an operation qualifier
            if (qualifier != null) {
                child = child.addChild(qualifier);
                child.setQualifier(true);
            }
            child.setEndpointType(endpointType);
        }
    }
575484
private static <T> Optional<T> lowestCommonAncestor(TreeDef.Parented<T> treeDef, T nodeA, T nodeB) {
		class TreeSearcher {
			private T tip;
			private final Set<T> visited;

			public TreeSearcher(T start) {
				this.tip = start;
				this.visited = new HashSet<>();
			}

			public boolean hasMore() {
				return tip != null;
			}

			public Optional<T> march(TreeSearcher other) {
				if (other.visited.contains(tip)) {
					return Optional.of(tip);
				} else {
					visited.add(tip);
					tip = treeDef.parentOf(tip);
					return Optional.empty();
				}
			}
		}

		// make a list of a's parents (bottom of stack is 'a' itself, top of is root)
		TreeSearcher searchA = new TreeSearcher(nodeA);
		TreeSearcher searchB = new TreeSearcher(nodeB);

		Optional<T> commonAncestor = searchB.march(searchA);
		// so long as both searches
		while (searchA.hasMore() && searchB.hasMore()) {
			commonAncestor = searchA.march(searchB);
			if (commonAncestor.isPresent()) {
				return commonAncestor;
			}
			commonAncestor = searchB.march(searchA);
			if (commonAncestor.isPresent()) {
				return commonAncestor;
			}
		}
		while (searchA.hasMore() && !commonAncestor.isPresent()) {
			commonAncestor = searchA.march(searchB);
		}
		while (searchB.hasMore() && !commonAncestor.isPresent()) {
			commonAncestor = searchB.march(searchA);
		}
		return commonAncestor;
	}
206520
private void maybeAddUsage(NodeTraversal t, Node n, final JSTypeExpression expr) {
    // Just look at the root node, don't traverse.
    Predicate<Node> pred =
        new Predicate<Node>() {
          @Override
          public boolean apply(Node n) {
            return n == expr.getRoot();
          }
        };
    maybeAddUsage(t, n, expr.getRoot(), true, pred);
  }
1075368
private void visitGetProp(NodeTraversal t, Node n) {
    // obj.prop or obj.method()
    // Lots of types can appear on the left, a call to a void function can
    // never be on the left. getPropertyType will decide what is acceptable
    // and what isn't.
    Node property = n.getLastChild();
    Node objNode = n.getFirstChild();
    JSType childType = getJSType(objNode);

    if (childType.isDict()) {
      report(property, TypeValidator.ILLEGAL_PROPERTY_ACCESS, "'.'", "dict");
    } else if (validator.expectNotNullOrUndefined(t, n, childType,
        "No properties on this expression", getNativeType(OBJECT_TYPE))) {
      checkPropertyAccessForGetProp(n);
    }
    ensureTyped(n);
  }
143854
private static <T extends QueryNode> NodeCentricOptimizationResults<T> propagateSubstitution(
            IntermediateQuery query,
            Optional<ImmutableSubstitution<VariableOrGroundTerm>> optionalSubstitution,
            T topNode) throws EmptyQueryException {
        if (optionalSubstitution.isPresent()) {

            // TODO: filter the non-bound variables from the substitution before propagating!!!

            SubstitutionPropagationProposal<T> propagationProposal = new SubstitutionPropagationProposalImpl<>(
                    topNode, optionalSubstitution.get(), false);

            // Forces the use of an internal executor (the treeComponent must remain the same).
            return query.applyProposal(propagationProposal, true);
        }
        /*
         * No substitution to propagate
         */
        else {
            return new NodeCentricOptimizationResultsImpl<>(query, topNode);
        }

    }
418202
static Node getConditionExpression(Node n) {
    switch (n.getToken()) {
      case IF:
      case WHILE:
        return n.getFirstChild();
      case DO:
        return n.getLastChild();
      case FOR:
        return n.getSecondChild();
      case FOR_IN:
      case FOR_OF:
      case FOR_AWAIT_OF:
      case CASE:
        return null;
      default:
        break;
    }
    throw new IllegalArgumentException(n + " does not have a condition.");
  }
1180107
@Override
	public void propagate(int evtmask) throws ContradictionException {
		// reset data structures
		reset();
		// reach all nodes from root
		if (domFinder.findDominators()) {
			// remove backward arcs
			remBackArcs();
			// enforce dominators and arc-dominators
			enforceDominators();
		} else {
			fails();
		}
	}
473553
protected <R> R liftRegularChildBinding(ConstructionNode selectedChildConstructionNode,
                                            int selectedChildPosition,
                                            IQTree selectedGrandChild,
                                            ImmutableList<IQTree> children,
                                            ImmutableSet<Variable> nonLiftableVariables,
                                            Optional<ImmutableExpression> initialJoiningCondition,
                                            VariableGenerator variableGenerator,
                                            LiftConverter<R> liftConverter) throws UnsatisfiableConditionException {

        ImmutableSubstitution<ImmutableTerm> selectedChildSubstitution = selectedChildConstructionNode.getSubstitution();

        ImmutableSubstitution<NonFunctionalTerm> downPropagableFragment = selectedChildSubstitution
                .getNonFunctionalTermFragment();

        ImmutableSubstitution<ImmutableFunctionalTerm> nonDownPropagableFragment = selectedChildSubstitution.getFunctionalTermFragment();


        ImmutableSet<Variable> otherChildrenVariables = IntStream.range(0, children.size())
                .filter(i -> i != selectedChildPosition)
                .boxed()
                .map(children::get)
                .flatMap(iq -> iq.getVariables().stream())
                .collect(ImmutableCollectors.toSet());

        InjectiveVar2VarSubstitution freshRenaming = computeOtherChildrenRenaming(nonDownPropagableFragment,
                otherChildrenVariables, variableGenerator);

        ExpressionAndSubstitution expressionResults = simplifyCondition(
                computeNonOptimizedCondition(initialJoiningCondition, selectedChildSubstitution, freshRenaming),
                nonLiftableVariables);
        Optional<ImmutableExpression> newCondition = expressionResults.optionalExpression;

        ImmutableSubstitution<ImmutableTerm> ascendingSubstitution = expressionResults.substitution.composeWith(
                selectedChildSubstitution);
        ImmutableSubstitution<NonFunctionalTerm> descendingSubstitution =
                        expressionResults.substitution.composeWith2(freshRenaming)
                                .composeWith2(downPropagableFragment);

        return liftConverter.convert(children, selectedGrandChild, selectedChildPosition, newCondition,
                ascendingSubstitution, descendingSubstitution);
    }
1080678
private boolean isDangling(Node node)
	{
		if (!result.contains(node)) return false;
		if (ST.contains(node)) return false;

		boolean hasIncoming = false;

		for (Edge edge : node.getUpstream())
		{
			if (result.contains(edge))
			{
				hasIncoming = true;
				break;
			}
		}

		boolean hasOutgoing = false;

		for (Edge edge : node.getDownstream())
		{
			if (result.contains(edge))
			{
				hasOutgoing = true;
				break;
			}
		}

		if (hasIncoming && hasOutgoing) return false;

		boolean hasParent = false;

		for (Node parent : node.getUpperEquivalent())
		{
			if (result.contains(parent))
			{
				hasParent = true;
				break;
			}
		}

		if (hasParent && (hasIncoming || hasOutgoing)) return false;

		boolean hasChild = false;

		for (Node child : node.getLowerEquivalent())
		{
			if (result.contains(child))
			{
				hasChild = true;
				break;
			}
		}

		return !(hasChild && (hasIncoming || hasOutgoing || hasParent));
	}
137089
private void visitGetprop(NodeTraversal t, Node n) {
    Node receiverNode = n.getFirstChild();
    String propName = receiverNode.getNext().getString();
    if (isGlobalSymbol(t, receiverNode)) {
      compiler.ensureLibraryInjected("es6/symbol", false);
      Node statement = NodeUtil.getEnclosingStatement(n);
      switch (propName) {
        case "iterator":
          {
            Node init =
                IR.exprResult(IR.call(NodeUtil.newQName(compiler, "$jscomp.initSymbolIterator")))
                    .useSourceInfoFromForTree(statement);
            statement.getParent().addChildBefore(init, statement);
            compiler.reportChangeToEnclosingScope(init);
            break;
          }
        case "asyncIterator":
          {
            Node init =
                IR.exprResult(
                        IR.call(NodeUtil.newQName(compiler, "$jscomp.initSymbolAsyncIterator")))
                    .useSourceInfoFromForTree(statement);
            statement.getParent().addChildBefore(init, statement);
            compiler.reportChangeToEnclosingScope(init);
            break;
          }
        default:
          // TODO(bradfordcsmith): Should we warn for unrecognized symbol names?
          break;
      }
    }
  }
1198514
@SuppressWarnings("unchecked")
    private void decreaseKey(Node<K, V> n, K newKey) {
        int c;
        if (comparator == null) {
            c = ((Comparable<? super K>) newKey).compareTo(n.key);
        } else {
            c = comparator.compare(newKey, n.key);
        }

        if (c > 0) {
            throw new IllegalArgumentException("Keys can only be decreased!");
        }
        n.key = newKey;
        if (c == 0 || root == n) {
            return;
        }

        if (n.o_s == null) {
            throw new IllegalArgumentException("Invalid handle!");
        }

        // unlink from parent
        if (n.y_s != null) {
            n.y_s.o_s = n.o_s;
        }
        if (n.o_s.o_c == n) { // I am the oldest :(
            n.o_s.o_c = n.y_s;
        } else { // I have an older sibling!
            n.o_s.y_s = n.y_s;
        }
        n.y_s = null;
        n.o_s = null;

        // merge with root
        if (comparator == null) {
            root = link(root, n);
        } else {
            root = linkWithComparator(root, n);
        }
    }
427001
@SafeVarargs
	public static <T> Optional<T> lowestCommonAncestor(TreeDef.Parented<T> treeDef, T... nodes) {
		return lowestCommonAncestor(treeDef, Arrays.asList(nodes));
	}
95363
@Override
	public void propagate(int evtmask) throws ContradictionException {
		// trivial case
		k.updateLowerBound(0, this);
		if (g.getPotentialNodes().size() == 0) {
			k.instantiateTo(0, this);
			return;
		}
		if (k.getUB() == 0) {
			for (int i : g.getPotentialNodes()) {
				g.removeNode(i, this);
			}
			return;
		}

		// bound computation
		int min = minCC();
		int max = maxCC();
		k.updateLowerBound(min, this);
		k.updateUpperBound(max, this);

		// A bit of pruning (removes unreachable nodes)
		if (k.getUB() == min && min != max) {
			int ccs = envCCFinder.getNbSCC();
			boolean pot = true;
			for (int cc = 0; cc < ccs; cc++) {
				for (int i = envCCFinder.getSCCFirstNode(cc); i >= 0 && pot; i = envCCFinder.getNextNode(i)) {
					if (g.getMandatoryNodes().contains(i)) {
						pot = false;
					}
				}
				if (pot) {
					for (int i = envCCFinder.getSCCFirstNode(cc); i >= 0; i = envCCFinder.getNextNode(i)) {
						g.removeNode(i, this);
					}
				}
			}
		}
	}
1361943
function(node, root) {
    var pn = node.parentNode;
    while (pn) {
      if (pn == root) {
        break;
      }
      pn = pn.parentNode;
    }
    return !!pn;
  }
412090
public CompositeGeneratorNode appendNewLineIfNotEmpty(final CompositeGeneratorNode parent) {
    List<IGeneratorNode> _children = parent.getChildren();
    String _lineDelimiter = this.wsConfig.getLineDelimiter();
    NewLineNode _newLineNode = new NewLineNode(_lineDelimiter, true);
    _children.add(_newLineNode);
    return parent;
  }
78151
public void visitApply(JCMethodInvocation tree) {
            if (TreeInfo.name(tree.meth) == names._super) {
                Symbol constructor = TreeInfo.symbol(tree.meth);
                ClassSymbol c = (ClassSymbol)constructor.owner;
                if (c.hasOuterInstance() &&
                    !tree.meth.hasTag(SELECT) &&
                    outerThisStack.head != null)
                    visitSymbol(outerThisStack.head);
            }
            super.visitApply(tree);
        }