Perform dataflow checks on attributed parse trees.
These include checks for definite assignment and unreachable statements.
If any errors occur, an empty list will be returned.
@return the list of attributed parse trees
491134
public Queue<Env<AttrContext>> flow(Queue<Env<AttrContext>> envs) {
        ListBuffer<Env<AttrContext>> results = new ListBuffer<>();
        for (Env<AttrContext> env: envs) {
            flow(env, results);
        }
        return stopIfError(CompileState.FLOW, results);
    }
130067
public List<FacesConfigFlowDefinitionType<FacesConfigType<T>>> getAllFlowDefinition()
   {
      List<FacesConfigFlowDefinitionType<FacesConfigType<T>>> list = new ArrayList<FacesConfigFlowDefinitionType<FacesConfigType<T>>>();
      List<Node> nodeList = childNode.get("flow-definition");
      for(Node node: nodeList)
      {
         FacesConfigFlowDefinitionType<FacesConfigType<T>>  type = new FacesConfigFlowDefinitionTypeImpl<FacesConfigType<T>>(this, "flow-definition", childNode, node);
         list.add(type);
      }
      return list;
   }
975812
private ProcessAttributes getAttributes() {
    return new ProcessAttributes(
          getCommand(),
          getDirectory(),
          new LinkedHashMap<String, String>(environment),
          allowedExitValues == null ? null : new HashSet<Integer>(allowedExitValues));
  }
307795
public Iterable<Attribute> getOwnAttributes() {
    return stream(getOwnAllAttributes()).filter(attr -> attr.getParent() == null).collect(toList());
  }
286008
protected List<DCTree> htmlAttrs() {
        ListBuffer<DCTree> attrs = new ListBuffer<DCTree>();
        skipWhitespace();

        loop:
        while (isIdentifierStart(ch)) {
            int namePos = bp;
            Name name = readIdentifier();
            skipWhitespace();
            List<DCTree> value = null;
            ValueKind vkind = ValueKind.EMPTY;
            if (ch == '=') {
                ListBuffer<DCTree> v = new ListBuffer<DCTree>();
                nextChar();
                skipWhitespace();
                if (ch == '\'' || ch == '"') {
                    vkind = (ch == '\'') ? ValueKind.SINGLE : ValueKind.DOUBLE;
                    char quote = ch;
                    nextChar();
                    textStart = bp;
                    while (bp < buflen && ch != quote) {
                        if (newline && ch == '@') {
                            attrs.add(erroneous("dc.unterminated.string", namePos));
                            // No point trying to read more.
                            // In fact, all attrs get discarded by the caller
                            // and superseded by a malformed.html node because
                            // the html tag itself is not terminated correctly.
                            break loop;
                        }
                        attrValueChar(v);
                    }
                    addPendingText(v, bp - 1);
                    nextChar();
                } else {
                    vkind = ValueKind.UNQUOTED;
                    textStart = bp;
                    while (bp < buflen && !isUnquotedAttrValueTerminator(ch)) {
                        attrValueChar(v);
                    }
                    addPendingText(v, bp - 1);
                }
                skipWhitespace();
                value = v.toList();
            }
            DCAttribute attr = m.at(namePos).Attribute(name, vkind, value);
            attrs.add(attr);
        }

        return attrs.toList();
    }
169456
public static Deferred<List<Tree>> fetchAllTrees(final TSDB tsdb) {
    
    final Deferred<List<Tree>> result = new Deferred<List<Tree>>();
    
    /**
     * Scanner callback that recursively calls itself to load the next set of
     * rows from storage. When the scanner returns a null, the callback will
     * return with the list of trees discovered.
     */
    final class AllTreeScanner implements Callback<Object, 
      ArrayList<ArrayList<KeyValue>>> {
  
      private final List<Tree> trees = new ArrayList<Tree>();
      private final Scanner scanner;
      
      public AllTreeScanner() {
        scanner = setupAllTreeScanner(tsdb);
      }
      
      /**
       * Fetches the next set of results from the scanner and adds this class
       * as a callback.
       * @return A list of trees if the scanner has reached the end
       */
      public Object fetchTrees() {
        return scanner.nextRows().addCallback(this);
      }
      
      @Override
      public Object call(ArrayList<ArrayList<KeyValue>> rows)
          throws Exception {
        if (rows == null) {
          result.callback(trees);
          return null;
        }
        
        for (ArrayList<KeyValue> row : rows) {
          final Tree tree = new Tree();
          for (KeyValue column : row) {
            if (column.qualifier().length >= TREE_QUALIFIER.length && 
                Bytes.memcmp(TREE_QUALIFIER, column.qualifier()) == 0) {
              // it's *this* tree. We deserialize to a new object and copy
              // since the columns could be in any order and we may get a rule 
              // before the tree object
              final Tree local_tree = JSON.parseToObject(column.value(), 
                  Tree.class);
              tree.created = local_tree.created;
              tree.description = local_tree.description;
              tree.name = local_tree.name;
              tree.notes = local_tree.notes;
              tree.strict_match = local_tree.strict_match;
              tree.enabled = local_tree.enabled;
              tree.store_failures = local_tree.store_failures;
              
              // WARNING: Since the JSON data in storage doesn't contain the tree
              // ID, we need to parse it from the row key
              tree.setTreeId(bytesToId(row.get(0).key()));
              
            // tree rule
            } else if (column.qualifier().length > TreeRule.RULE_PREFIX().length &&
                Bytes.memcmp(TreeRule.RULE_PREFIX(), column.qualifier(), 
                0, TreeRule.RULE_PREFIX().length) == 0) {
              final TreeRule rule = TreeRule.parseFromStorage(column);
              tree.addRule(rule);
            }
          }
          
          // only add the tree if we parsed a valid ID
          if (tree.tree_id > 0) {
            trees.add(tree);
          }
        }
        
        // recurse to get the next set of rows from the scanner
        return fetchTrees();
      }
      
    }
    
    // start the scanning process
    new AllTreeScanner().fetchTrees();
    return result;
  }
1372400
public java.util.List<DBSnapshotAttribute> getDBSnapshotAttributes() {
        if (dBSnapshotAttributes == null) {
            dBSnapshotAttributes = new com.amazonaws.internal.SdkInternalList<DBSnapshotAttribute>();
        }
        return dBSnapshotAttributes;
    }
948986
private ParseTree parseTryStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.TRY);
    ParseTree body = parseBlock();
    ParseTree catchBlock = null;
    if (peek(TokenType.CATCH)) {
      catchBlock = parseCatch();
    }
    ParseTree finallyBlock = null;
    if (peek(TokenType.FINALLY)) {
      finallyBlock = parseFinallyBlock();
    }
    if (catchBlock == null && finallyBlock == null) {
      reportError("'catch' or 'finally' expected.");
    }
    return new TryStatementTree(getTreeLocation(start), body, catchBlock, finallyBlock);
  }
716026
def get_trees(self, data, showerrors = False): # -> list:
        
        if showerrors:
            raise NotImplementedError("This parser doesn't implement errors")
        self.data = data
        self.index = 0
        try:
            return [self.__aux_parser(self._productionset.initialsymbol)]
        except (IndexError, ParseError):
            return []
1090553
Object processVariableLists(Object rawValue, ExtendedAttributeDefinition attributeDef,
                                EvaluationContext context, boolean ignoreWarnings) throws ConfigEvaluatorException {
        if (attributeDef != null && !attributeDef.resolveVariables())
            return rawValue;

        if (rawValue instanceof List) {
            List<Object> returnList = new ArrayList<Object>();
            List<Object> values = (List<Object>) rawValue;
            for (Object o : values) {
                Object processed = processVariableLists(o, attributeDef, context, ignoreWarnings);
                if (processed instanceof List)
                    returnList.addAll((List<Object>) processed);
                else
                    returnList.add(processed);
            }
            return returnList;
        } else if (rawValue instanceof String) {
            // Look for functions of the form ${list(variableName)} first
            Matcher matcher = XMLConfigConstants.VAR_LIST_PATTERN.matcher((String) rawValue);
            if (matcher.find()) {
                String var = matcher.group(1);
                String rep = getProperty(var, context, ignoreWarnings, true);
                return rep == null ? rawValue : MetaTypeHelper.parseValue(rep);
            } else {
                return rawValue;
            }
        } else {
            return rawValue;
        }

    }
150
@Override
  public List<ExecutableFlow> getRunningFlows() {
    final ArrayList<ExecutableFlow> flows = new ArrayList<>();
    try {
      getFlowsHelper(flows, this.executorLoader.fetchUnfinishedFlows().values());
    } catch (final ExecutorManagerException e) {
      logger.error("Failed to get running flows.", e);
    }
    return flows;
  }
1186971
public Flowable<Tree<T>> parents() {
    return Flowable.generate(() -> Wrapper.of(this), (n, e) -> {
      Tree<T> parent = n.get().getParent();
      if (parent != null) {
        e.onNext(parent);
        n.set(parent);
      } else {
        e.onComplete();
      }
    });
  }
696199
private ImmutableList<ParseTree> parseExportSpecifierSet() {
    ImmutableList.Builder<ParseTree> elements;
    elements = ImmutableList.builder();
    eat(TokenType.OPEN_CURLY);
    while (peekIdOrKeyword()) {
      elements.add(parseExportSpecifier());
      if (!peek(TokenType.CLOSE_CURLY)) {
        eat(TokenType.COMMA);
      }
    }
    eat(TokenType.CLOSE_CURLY);
    return elements.build();
  }
969363
public List<AstNode> getStatements() {
        List<AstNode> stmts = new ArrayList<AstNode>();
        Node n = getFirstChild();
        while (n != null) {
            stmts.add((AstNode)n);
            n = n.getNext();
        }
        return stmts;
    }
1339855
public static List<ParserDescription> getAvailableParsers() {
        Set<String> groups = Sets.newHashSet();
        for (AbstractWarningsParser parser : getAllParsers()) {
            groups.add(parser.getGroup());
        }

        List<ParserDescription> sorted = Lists.newArrayList();
        for (String group : groups) {
            sorted.add(new ParserDescription(group, getParser(group).getParserName()));
        }
        Collections.sort(sorted);
        return sorted;
    }
202680
public Tree tree() throws ScanException, ParseException {
		consumeToken();
		AstNode t = text();
		if (token.getSymbol() == EOF) {
			if (t == null) {
				t = new AstText("");
			}
			return new Tree(t, functions, identifiers, false);
		}
		AstEval e = eval();
		if (token.getSymbol() == EOF && t == null) {
			return new Tree(e, functions, identifiers, e.isDeferred());
		}
		ArrayList<AstNode> list = new ArrayList<AstNode>();
		if (t != null) {
			list.add(t);
		}
		list.add(e);
		t = text();
		if (t != null) {
			list.add(t);
		}
		while (token.getSymbol() != EOF) {
			if (e.isDeferred()) {
				list.add(eval(true, true));
			} else {
				list.add(eval(true, false));
			}
			t = text();
			if (t != null) {
				list.add(t);
			}
		}
		return new Tree(createAstComposite(list), functions, identifiers, e.isDeferred());
	}
682506
public static Attribute[] getAttributes(InputStream stream) throws IOException, ParseException {
        Reader r = new BufferedReader(new InputStreamReader(stream));
        StreamTokenizer tokenizer = new StreamTokenizer(r);
        
        ArffParser parser = new ArffParser();
        parser.initTokenizer(tokenizer);

        List<Attribute> attributes = new ArrayList<>();
        parser.readHeader(tokenizer, attributes);

        return attributes.toArray(new Attribute[attributes.size()]);
    }