method iterates over all nodes that provide dependency to the current node,
            and compile composite state of them all
            :return instance of <NodesCompositeState>
336420
def dependent_on_composite_state(self):
        
        composite_state = NodesCompositeState()

        for dependent_on in self.tree.dependent_on:
            node_b = self.find_counterpart_in(dependent_on)

            if node_b is None:
                # special case when counterpart tree has no process with corresponding time_qualifier
                # for example Financial Monthly has no counterpart in Third-party Daily Report -
                # so we assume that its not blocked
                continue

            composite_state.enlist(node_b)

        return composite_state
124384
private void processCompositeFilter(final StringBuilder whereBuilder,
                                        final List<Object> paramList, final CompositeFilter compositeFilter) throws RepositoryException {
        final List<Filter> subFilters = compositeFilter.getSubFilters();
        if (2 > subFilters.size()) {
            throw new RepositoryException("At least two sub filters in a composite filter");
        }

        whereBuilder.append("(");

        final Iterator<Filter> iterator = subFilters.iterator();
        while (iterator.hasNext()) {
            final Filter filter = iterator.next();

            if (filter instanceof PropertyFilter) {
                processPropertyFilter(whereBuilder, paramList, (PropertyFilter) filter);
            } else { // CompositeFilter
                processCompositeFilter(whereBuilder, paramList, (CompositeFilter) filter);
            }

            if (iterator.hasNext()) {
                switch (compositeFilter.getOperator()) {
                    case AND:
                        whereBuilder.append(" AND ");
                        break;

                    case OR:
                        whereBuilder.append(" OR ");
                        break;

                    default:
                        throw new RepositoryException("Unsupported composite filter [operator=" + compositeFilter.getOperator() + "]");
                }
            }
        }

        whereBuilder.append(")");
    }
601349
private void addComposites(MBeanAttributeConfig config,
			CompositeData compositeData) {
		CompositeType compositeType = compositeData.getCompositeType();
		for (String key : compositeType.keySet()) {
			config.addChild(makeComposite(compositeType, key));
		}
	}
1270741
private NodeImpl doAddNode(NodeImpl parentNode, InternalQName name, InternalQName primaryTypeName,
      NodeDefinitionData nodeDef) throws ItemExistsException, RepositoryException, ConstraintViolationException,
      VersionException, LockException
   {
      validateChildNode(parentNode, name, primaryTypeName, nodeDef);

      // Initialize data
      InternalQName[] mixinTypeNames = new InternalQName[0];
      String identifier = IdGenerator.generate();

      int orderNum = parentNode.getNextChildOrderNum();
      int index = parentNode.getNextChildIndex(name, primaryTypeName, parentNode.nodeData(), nodeDef);

      QPath path = QPath.makeChildPath(parentNode.getInternalPath(), name, index);

      AccessControlList acl = parentNode.getACL();

      // create new nodedata, [PN] fix of use index as persisted version
      NodeData nodeData =
         new TransientNodeData(path, identifier, -1, primaryTypeName, mixinTypeNames, orderNum, parentNode
            .getInternalIdentifier(), acl);

      // Create new Node
      ItemState state = ItemState.createAddedState(nodeData, false);
      NodeImpl node = (NodeImpl)dataManager.update(state, true);

      NodeTypeDataManager ntmanager = session.getWorkspace().getNodeTypesHolder();
      ItemAutocreator itemAutocreator = new ItemAutocreator(ntmanager, valueFactory, dataManager, true);

      PlainChangesLog changes =
         itemAutocreator.makeAutoCreatedItems(node.nodeData(), primaryTypeName, dataManager, session.getUserID());
      for (ItemState autoCreatedState : changes.getAllStates())
      {
         dataManager.updateItemState(autoCreatedState);
      }

      session.getActionHandler().postAddNode(node);

      return node;
   }
89932
private void buildDependencyTree()
        throws DependencyTreeBuilderException
    {
        if ( rootNode == null )
        {
            rootNode =
                dependencyTreeBuilder.buildDependencyTree( project, localRepository, artifactFactory,
                                                           artifactMetadataSource, null, artifactCollector );
        }
    }
319195
static MavenArtifactInfo fromDependencyNode(final DependencyNode dependencyNode) {
        final Artifact artifact = dependencyNode.getDependency().getArtifact();
        final List<DependencyNode> children = dependencyNode.getChildren();

        // SHRINKRES-143 lets ignore invalid scope
        ScopeType scopeType = ScopeType.RUNTIME;
        try {
            scopeType = ScopeType.fromScopeType(dependencyNode.getDependency().getScope());
        } catch (IllegalArgumentException e) {
            // let scope be RUNTIME
            log.log(Level.WARNING, "Invalid scope {0} of retrieved dependency {1} will be replaced by <scope>runtime</scope>",
                    new Object[] { dependencyNode.getDependency().getScope(), dependencyNode.getDependency().getArtifact() });
        }
        final boolean optional = dependencyNode.getDependency().isOptional();
        return new MavenArtifactInfoImpl(artifact, scopeType, children, optional);
    }
193822
def project(self, node):
        
        child_object = self.translate(node.child)
        child_object.select_block = str(node.attributes)
        return child_object
1252314
def each_node(from = covered_code.root, &block)
      return to_enum(:each_node) unless block_given?
      begin
        yield from unless from.is_a?(Node::Root)
      rescue ProblemWithDiagnostic
        raise
      rescue StandardError, SystemStackError => e
        raise ProblemWithDiagnostic.new(covered_code, from.diagnostic_expression, e)
      end
      node_children(from).each do |child|
        each_node(child, &block)
      end
    end
334738
protected Tuple composeComposite(AbstractCompositeType comparator, ByteBuffer name) throws IOException
    {
        List<CompositeComponent> result = comparator.deconstruct(name);
        Tuple t = TupleFactory.getInstance().newTuple(result.size());
        for (int i=0; i<result.size(); i++)
            setTupleValue(t, i, cassandraToObj(result.get(i).comparator, result.get(i).value));

        return t;
    }
423857
function getNodeFromInstance(inst) {
  if (inst.tag === HostComponent || inst.tag === HostText) {
    // In Fiber this, is just the state node right now. We assume it will be
    // a host component or host text.
    return inst.stateNode;
  }

  // Without this first invariant, passing a non-DOM-component triggers the next
  // invariant for a missing parent, which is super confusing.
  !(inst._hostNode !== undefined) ? invariant(false, 'getNodeFromInstance: Invalid argument.') : void 0;

  if (inst._hostNode) {
    return inst._hostNode;
  }

  // Walk up the tree until we find an ancestor whose DOM node we have cached.
  var parents = [];
  while (!inst._hostNode) {
    parents.push(inst);
    !inst._hostParent ? invariant(false, 'React DOM tree root should always have a node reference.') : void 0;
    inst = inst._hostParent;
  }

  // Now parents contains each ancestor that does *not* have a cached native
  // node, and `inst` is the deepest ancestor that does.
  for (; parents.length; inst = parents.pop()) {
    precacheChildNodes(inst, inst._hostNode);
  }

  return inst._hostNode;
}
688970
def each_node(&block)
      return to_enum :each_node unless block_given?
      children_nodes.each do |child|
        child.each_node(&block)
      end
      yield self
      self
    end
699727
function composite() {
		var configs, type, recipe, tasks, wrapper;

		configs = Configuration.sort(taskInfo, rawConfig, parentConfig);
		tasks = configs.taskInfo.parallel || configs.taskInfo.series || configs.taskInfo.task || configs.subTaskConfigs;
		type = _type();
		if (type) {
			tasks = createTasks(configs);
			recipe = recipes.flow({ recipe: type });
			wrapper = self.create(prefix, {
				name: '<' + type + '>',
				visibility: CONSTANT.VISIBILITY.HIDDEN
			}, configs.taskConfig, recipe, tasks);
			if (configs.taskInfo.name) {
				return self.create(prefix, configs.taskInfo, configs.taskConfig, wrapper, [wrapper]);
			}
			configs.taskInfo.visibility = CONSTANT.VISIBILITY.HIDDEN;
			return wrapper;
		}

		if (_forward()) {
			tasks = createTasks(configs);
			recipe = function (done) {
				return tasks[0].call(this, done);
			};
			return self.create(prefix, configs.taskInfo, configs.taskConfig, recipe, tasks);
		}

		function _type() {
			if (configs.taskInfo.series) {
				return 'series';
			} else if (configs.taskInfo.parallel) {
				return 'parallel';
			} else if (_.size(tasks) > 1) {
				if (Array.isArray(tasks)) {
					return 'series';
				} else if (_.isPlainObject(tasks)) {
					return 'parallel';
				}
			}
		}

		function _forward() {
			return _.size(tasks) === 1;
		}
	}
610755
void onBuildChildNode(Object childObject, EntityMetadata childMetadata, PersistenceDelegator delegator,
            PersistenceCache pc, Node node, Relation relation)
    {
        Node childNode = generate(childObject, delegator, pc, null);
        if (childNode != null)
        {
            assignNodeLinkProperty(node, relation, childNode);
        }
    }
651742
def leaves(self, nodes=None, unique=True):
        
        if nodes is None:
            return super(DependencyTree, self).leaves(unique=unique)

        res = list()
        for child_id in nodes:
            for sub_child in self._all_nodes[child_id].leaves(unique=unique):
                if not unique or sub_child not in res:
                    res.append(sub_child)
        return res
937627
def _read_composites(self, compositor_nodes):
        """"""
        keepables = set()
        for item in compositor_nodes:
            self._generate_composite(item, keepables)
        return keepables
784224
def compile_node(self, node):
        
        # XXX Optimize certain Wildcard-containing-Wildcard patterns
        # that can be merged
        if node.type == self.syms.Matcher:
            node = node.children[0] # Avoid unneeded recursion

        if node.type == self.syms.Alternatives:
            # Skip the odd children since they are just '|' tokens
            alts = [self.compile_node(ch) for ch in node.children[::2]]
            if len(alts) == 1:
                return alts[0]
            p = pytree.WildcardPattern([[a] for a in alts], min=1, max=1)
            return p.optimize()

        if node.type == self.syms.Alternative:
            units = [self.compile_node(ch) for ch in node.children]
            if len(units) == 1:
                return units[0]
            p = pytree.WildcardPattern([units], min=1, max=1)
            return p.optimize()

        if node.type == self.syms.NegatedUnit:
            pattern = self.compile_basic(node.children[1:])
            p = pytree.NegatedPattern(pattern)
            return p.optimize()

        assert node.type == self.syms.Unit

        name = None
        nodes = node.children
        if len(nodes) >= 3 and nodes[1].type == token.EQUAL:
            name = nodes[0].value
            nodes = nodes[2:]
        repeat = None
        if len(nodes) >= 2 and nodes[-1].type == self.syms.Repeater:
            repeat = nodes[-1]
            nodes = nodes[:-1]

        # Now we've reduced it to: STRING | NAME [Details] | (...) | [...]
        pattern = self.compile_basic(nodes, repeat)

        if repeat is not None:
            assert repeat.type == self.syms.Repeater
            children = repeat.children
            child = children[0]
            if child.type == token.STAR:
                min = 0
                max = pytree.HUGE
            elif child.type == token.PLUS:
                min = 1
                max = pytree.HUGE
            elif child.type == token.LBRACE:
                assert children[-1].type == token.RBRACE
                assert  len(children) in (3, 5)
                min = max = self.get_int(children[1])
                if len(children) == 5:
                    max = self.get_int(children[3])
            else:
                assert False
            if min != 1 or max != 1:
                pattern = pattern.optimize()
                pattern = pytree.WildcardPattern([[pattern]], min=min, max=max)

        if name is not None:
            pattern.name = name
        return pattern.optimize()
402017
private void buildReplacementNodesFromSource(MsgNode msg) {

    currReplacementNodes = Lists.newArrayList();

    for (StandaloneNode child : msg.getChildren()) {

      if (child instanceof RawTextNode) {
        currReplacementNodes.add(child);

      } else if (child instanceof MsgPlaceholderNode) {
        for (StandaloneNode contentNode : ((MsgPlaceholderNode) child).getChildren()) {
          // If the content node is a MsgHtmlTagNode, it needs to be replaced by a number of
          // consecutive siblings. This is done by visiting the MsgHtmlTagNode. Otherwise, we
          // simply add the content node to the currReplacementNodes list being built.
          if (contentNode instanceof MsgHtmlTagNode) {
            currReplacementNodes.addAll(((MsgHtmlTagNode) contentNode).getChildren());
          } else {
            currReplacementNodes.add(contentNode);
          }
        }

      } else {
        throw new AssertionError();
      }
    }
  }