Recursive method for traversing and collecting row references.
963708
private void getEager(Set<HBeanRow> rows, HBeanRowCollector collector, int level,
            FetchType... fetchType) throws HBeanNotFoundException {
        int size = rows.size();
        if (size == 0) {
            return;
        }
        if (--level < 0) {
            return;
        }
        Set<HBeanRow> refs = new HashSet<>();
        for (HBeanRow row : rows) {
            refs.addAll(row.getReferenceRows());
        }
        // only recurse rowkeys we havent already
        // visited to break circular references
        refs = collector.filterUnvisted(refs);
        refs = getLazy(refs, fetchType);

        collector.addReferences(refs);
        getEager(refs, collector, level, fetchType);
    }
268428
private Iterator<Row<ByteBuffer, DeltaKey>> rowScan(final DeltaPlacement placement,
                                                        final ByteBufferRange rowRange,
                                                        final ByteBufferRange columnRange,
                                                        final LimitCounter limit,
                                                        final ReadConsistency consistency) {
        return rowScan(placement, placement.getBlockedDeltaColumnFamily(), rowRange, columnRange, limit, consistency);
    }
479027
def traverse_frozen_data(data_structure):
    """"""
    parent_stack = [data_structure]
    while parent_stack:
        node = parent_stack.pop(0)
        # We don't iterate strings
        tlen = -1
        if not isinstance(node, _string_types):
            # If item has a length we freeze it
            try:
                tlen = len(node)
            except:
                pass
        if tlen == -1:
            yield node
        else:
            parent_stack = list(node) + parent_stack
659540
def _nested_lookup(document, references, operation):
        """"""
        if isinstance(document, list):
            for d in document:
                for result in NestedLookup._nested_lookup(d, references, operation):
                    yield result

        if isinstance(document, dict):
            for k, v in document.items():
                if operation(k, v):
                    references.append((document, k))
                    yield v
                elif isinstance(v, dict):
                    for result in NestedLookup._nested_lookup(v, references, operation):
                        yield result
                elif isinstance(v, list):
                    for d in v:
                        for result in NestedLookup._nested_lookup(d, references, operation):
                            yield result
256947
private Tree<Row> findIf( Tree<Row> pointer ){
        while( !Type.IF.equals( pointer.getContent().getType() ) ){
            pointer = pointer.getPrevious();
        }
        return pointer;
    }
183167
def next(self):
        """"""
        # I'm pretty sure this is the completely wrong way to go about this, but
        # oh well, this works.
        if not hasattr(self, '_iter'):
            self._iter = self.readrow_as_dict()
        return self._iter.next()
958214
public Iterator<InternalRow> rowIterator() {
    final int maxRows = numRows;
    final MutableColumnarRow row = new MutableColumnarRow(columns);
    return new Iterator<InternalRow>() {
      int rowId = 0;

      @Override
      public boolean hasNext() {
        return rowId < maxRows;
      }

      @Override
      public InternalRow next() {
        if (rowId >= maxRows) {
          throw new NoSuchElementException();
        }
        row.rowId = rowId++;
        return row;
      }

      @Override
      public void remove() {
        throw new UnsupportedOperationException();
      }
    };
  }
1019087
private List<ExpandedPair> checkRows(List<ExpandedRow> collectedRows, int currentRow) throws NotFoundException {
    for (int i = currentRow; i < rows.size(); i++) {
      ExpandedRow row = rows.get(i);
      this.pairs.clear();
      for (ExpandedRow collectedRow : collectedRows) {
        this.pairs.addAll(collectedRow.getPairs());
      }
      this.pairs.addAll(row.getPairs());

      if (!isValidSequence(this.pairs)) {
        continue;
      }

      if (checkChecksum()) {
        return this.pairs;
      }

      List<ExpandedRow> rs = new ArrayList<>(collectedRows);
      rs.add(row);
      try {
        // Recursion: try to add more rows
        return checkRows(rs, i + 1);
      } catch (NotFoundException e) {
        // We failed, try the next candidate
      }
    }

    throw NotFoundException.getNotFoundInstance();
  }
553784
def row_iter(self):
        """"""
        for k in utils.range_(self.side):
            yield self.row(k)
160547
def next_row(self):
        """"""
        row = self.currentIndex().row()
        rows = self.source_model.rowCount()
        if row + 1 == rows:
            row = -1
        self.selectRow(row + 1)
123138
def _references(self, i, sequence=False):
        """"""

        c = next(i)
        if c == '\\':
            # \\
            if sequence and self.bslash_abort:
                raise PathNameException
        elif c == '/':
            # \/
            if sequence and self.pathname:
                raise PathNameException
            elif self.pathname:
                i.rewind(1)
        else:
            # \a, \b, \c, etc.
            pass
1284449
public static function rowMapper(): Closure
    {
        return static function (stdClass $row): Source {
            return Source::getInstance($row->s_id, Tree::findById((int) $row->s_file), $row->s_gedcom);
        };
    }
1138715
def rowkey(self, row):
        ''
        return tuple(c.getTypedValueOrException(row) for c in self.keyCols)
511263
def _row_generator(self, cursor):
        
        rowset = cursor.fetchmany(self._arraysize)
        while rowset:
            if self._row_formatter is not None:
                rowset = (self._row_formatter(r, cursor) for r in rowset)
            for row in rowset:
                yield row
            rowset = cursor.fetchmany(self._arraysize)
1089026
private List<Bean> findReferences(BeanId reference, Collection<Bean> predecessors,
            ArrayList<Bean> matches, ArrayList<Bean> checked) {

        for (Bean predecessor : predecessors) {
            findReferences(reference, predecessor, matches, checked);
        }
        return matches;
    }
396846
def _get_row(self, id):
        """"""
        return {name: d['func'](id) for (name, d) in self._columns.items()}
544133
def iter_rows(self):
        
        fileobj = self._fileobj
        cls_row = self.cls_row
        fields = self.fields

        for idx in range(self.prolog.records_count):
            data = fileobj.read(1)

            marker = struct.unpack('<1s', data)[0]
            is_deleted = marker == b'*'

            if is_deleted:
                continue

            row_values = []
            for field in fields:
                val = field.cast(fileobj.read(field.len))
                row_values.append(val)

            yield cls_row(*row_values)