Get the next (only) plan for a VoltDB SWAP TABLE statement.
These are pretty simple and will only generate a single plan.

@return The next (only) plan for a given SWAP TABLE statement, then null.
513324
private CompiledPlan getNextSwapPlan() {
        // there's really only one way to do a swap, so just
        // plan it the right way once, then return null after that
        if (m_bestAndOnlyPlanWasGenerated) {
            return null;
        }
        m_bestAndOnlyPlanWasGenerated = true;

        // figure out which tables we're swapping
        assert (m_parsedSwap.m_tableList.size() == 2);
        Table theTable = m_parsedSwap.m_tableList.get(0);
        Table otherTable = m_parsedSwap.m_tableList.get(1);
        CompiledPlan retval = new CompiledPlan(m_isLargeQuery);
        retval.setReadOnly(false);

        // the root of the SWAP TABLE plan is always a SwapPlanNode
        SwapTablesPlanNode swapNode = new SwapTablesPlanNode();
        swapNode.initializeSwapTablesPlanNode(theTable, otherTable);

        // SWAP commands are only run single-partition when invoked from
        // an explicitly declared single-partition stored procedure.
        if (m_partitioning.wasSpecifiedAsSingle()) {
            retval.rootPlanGraph = swapNode;
            return retval;
        }

        // Add a compensating sum of modified tuple counts or a limit 1
        // AND a send on top of the union-like receive node.
        boolean isReplicated = theTable.getIsreplicated();
        retval.rootPlanGraph = addCoordinatorToDMLNode(swapNode, isReplicated);
        return retval;
    }
520066
public Object getNextData()
    {
        try   {
            String strNext = m_daIn.readUTF();
            return strNext;
        } catch (IOException ex)    {
            ex.printStackTrace();
            return null;
        }
    }
292651
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <DATATYPE> next ()
  {
    if (!hasNext ())
      throw new NoSuchElementException ();

    // Not for the very first item, as the first item is the original order
    final boolean bFirstItem = m_bUseLong ? m_nCombinationsLeft == m_nTotalCombinations
                                          : m_aCombinationsLeft.equals (m_aTotalCombinations);
    if (!bFirstItem)
    {
      final int nElementCount = m_aElements.length;
      final int nSlotCount = m_aIndexResult.length;

      int i = nSlotCount - 1;
      while (m_aIndexResult[i] == (nElementCount - nSlotCount + i))
      {
        i--;
      }
      m_aIndexResult[i]++;
      final int nIndexResultI = m_aIndexResult[i];
      for (int j = i + 1; j < nSlotCount; j++)
      {
        m_aIndexResult[j] = nIndexResultI + j - i;
      }
    }

    // One combination less
    if (m_bUseLong)
      m_nCombinationsLeft--;
    else
      m_aCombinationsLeft = m_aCombinationsLeft.subtract (BigInteger.ONE);

    // Build result list
    final ICommonsList <DATATYPE> aResult = new CommonsArrayList <> (m_aIndexResult.length);
    for (final int nIndex : m_aIndexResult)
      aResult.add (m_aElements[nIndex]);
    return aResult;
  }
198783
public Object next()
    {
        String result = null;

        if ( _literal != null )
        {
            result = _literal;
            _literal = null;
        }
        else if ( _token != null )
        {
            result = _token;
            _token = null;
        }
        return result;
    }
1247365
public final Link getNextLink() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(this, tc, "getNextLink", _positionString());
        }
        Link nextLink = null;
        LinkedList parent = _parent;
        if (null != parent) {
            nextLink = _parent.getNextLink(this);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(this, tc, "getNextLink", nextLink);
        }
        return nextLink;
    }
884689
@Override
    AbstractPlanNode nextPlan() {
        if (!m_generatedPlans) {
            assert (m_parsedStmt.m_joinTree != null);
            // Clone the node to make make sure that analyze expression is called
            // only once on the node.
            JoinNode tableNode = (JoinNode) m_parsedStmt.m_joinTree.clone();
            // Analyze join conditions
            tableNode.analyzeJoinExpressions(m_parsedStmt.m_noTableSelectionList);
            // these just shouldn't happen right?
            assert(m_parsedStmt.m_noTableSelectionList.size() == 0);

            m_generatedPlans = true;
            // This is either UPDATE or DELETE statement. Consolidate all expressions
            // into the WHERE list.
            tableNode.m_whereInnerList.addAll(tableNode.m_joinInnerList);
            tableNode.m_joinInnerList.clear();
            tableNode.m_accessPaths.addAll(getRelevantAccessPathsForTable(tableNode.getTableScan(),
                    null,
                    tableNode.m_whereInnerList,
                    null));

            for (AccessPath path : tableNode.m_accessPaths) {
                tableNode.m_currentAccessPath = path;

                AbstractPlanNode plan = getAccessPlanForTable(tableNode);
                m_plans.add(plan);
            }

        }
        return m_plans.poll();
    }
141730
public Object next()
  {
    if(_currentSubIterator == null || !_currentSubIterator.hasNext())
    {
      nextQueue();
    }
    
    Object nextRemoteQueue = null;

    if(_currentSubIterator != null)
    {
      nextRemoteQueue = _currentSubIterator.next(); 
    }

    return nextRemoteQueue;        
  }
669305
@SuppressWarnings("unchecked")
	public REC next() {
		checkDirection(true);

		ORecordInternal<?> record = getRecord();

		// ITERATE UNTIL THE NEXT GOOD RECORD
		while (hasNext()) {
			record = getTransactionEntry();
			if (record != null)
				return (REC) record;

			if ((record = readCurrentRecord(null, +1)) != null)
				// FOUND
				return (REC) record;
		}

		throw new NoSuchElementException();
	}
1134697
public Integer next() {
		for(int i = currentIndex; i < t.size(); i++){
			if(i+timelag>=t.size()){
				return null;
			}
			if((t.get(i) != null) && (t.get(i+timelag) != null)){
				if(overlap){
					currentIndex = i+1;
				}
				else{
					currentIndex = i+timelag;
				}
				return i;
			}
		}
		
		return null;
	}
55902
protected int getNextNode()
  {
    if (null != m_exprObj)
    {
      m_lastFetched = m_exprObj.nextNode();
    }
    else
      m_lastFetched = DTM.NULL;

    return m_lastFetched;
  }
220449
public Val nextValue() throws IOException {
      switch (peek()) {
         case BEGIN_ARRAY:
            return Val.of(nextCollection(ArrayList::new));
         case BEGIN_OBJECT:
            return Val.of(nextMap());
         case NAME:
            return nextKeyValue().getV2();
         default:
            return nextSimpleValue();
      }
   }
369264
@Nullable
  public ResultT first() {
    final CoreRemoteMongoCursor<ResultT> cursor = iterator();
    if (!cursor.hasNext()) {
      return null;
    }
    return cursor.next();
  }
298639
@Override
  public synchronized Integer next() {
    if (availablePorts.isEmpty()) {
      return null;
    }
    Collections.sort(availablePorts);
    Integer port = availablePorts.get(0);
    portsInUse.add(port);
    availablePorts.remove(port);
    return port;
  }
118220
public Record getNextGridRecord(boolean bFirstTime) throws DBException
    {
        Record record = this.getMainRecord();
        BaseTable table = record.getTable();
        if (bFirstTime)
            table.close();
        boolean bHasNext = table.hasNext();
        if (!bHasNext)
            return null;
        return (Record)table.next();
    }
1164156
public T next() {
        if (entry == null) return null;
        entry = entry.next;
        return entry.element;
    }
504497
public LeafNode<K, V> nextNode() {
		if (rightid == NULL_ID) {
			return null;
		}
		return (LeafNode<K, V>) tree.getNode(rightid);
	}
1191864
public T next() {
		if(MapUtil.isEmpty(this.weightMap)) {
			return null;
		}
		final double randomWeight = this.weightMap.lastKey() * random.nextDouble();
		final SortedMap<Double, T> tailMap = this.weightMap.tailMap(randomWeight, false);
		return this.weightMap.get(tailMap.firstKey());
	}