docs: VoltTable[] executeSlowHomogeneousBatch(final List<QueuedSQL> batch, final boolean finalTask) {
          MpTransactionState txnState = (MpTransactionState)m_txnState;
          assert(txnState != null);
          BatchState state = new BatchState(batch.size(), txnState, m_site.getCorrespondingSiteId(), finalTask,
                  m_procedureName, m_procNameToLoadForFragmentTasks, m_perCallStats.samplingStmts());
  
          // iterate over all sql in the batch, filling out the above data
          // structures
          for (int i = 0; i < batch.size(); ++i) {
              QueuedSQL queuedSQL = batch.get(i);
  
              assert (queuedSQL.stmt != null);
  
              // Figure out what is needed to resume the proc
              int collectorOutputDepId = m_txnState.getNextDependencyId();
              state.m_depsToResume[i] = collectorOutputDepId;
  
              // Build the set of params for the frags
              ByteBuffer paramBuf = null;
              try {
                  paramBuf = ByteBuffer.allocate(queuedSQL.params.getSerializedSize());
                  queuedSQL.params.flattenToBuffer(paramBuf);
              } catch (IOException e) {
                  throw new RuntimeException("Error serializing parameters for SQL statement: " + queuedSQL.stmt.getText()
                          + " with params: " + queuedSQL.params.toJSONString(), e);
              }
              assert (paramBuf != null);
              paramBuf.flip();
  
              /*
               * This numfrags == 1 code is for routing multi-partition reads of a
               * replicated table to the local site. This was a broken performance
               * optimization. see https://issues.voltdb.com/browse/ENG-1232.
               *
               * The problem is that the fragments for the replicated read are not
               * correctly interleaved with the distributed writes to the
               * replicated table that might be in the same batch of SQL
               * statements. We do end up doing the replicated read locally but we
               * break up the batches in the face of mixed reads and writes
               */
              state.addStatement(i, queuedSQL.stmt, paramBuf, m_site);
          }
  
          // instruct the dtxn what's needed to resume the proc
          m_txnState.setupProcedureResume(state.m_depsToResume);
  
          // create all the local work for the transaction
          for (int i = 0; i < state.m_depsForLocalTask.length; i++) {
              if (state.m_depsForLocalTask[i] < 0) {
                  continue;
              }
              state.m_localTask.setInputDepId(i, state.m_depsForLocalTask[i]);
          }
  
          // note: non-transactional work only helps us if it's final work
          m_txnState.createLocalFragmentWork(state.m_localTask, state.m_localFragsAreNonTransactional && finalTask);
  
          if (!state.m_distributedTask.isEmpty()) {
              state.m_distributedTask.setBatch(m_batchIndex);
              m_txnState.createAllParticipatingFragmentWork(state.m_distributedTask);
          }
  
          // recursively call recursableRun and don't allow it to shutdown
          Map<Integer, List<VoltTable>> mapResults = m_site.recursableRun(m_txnState);
  
          assert (mapResults != null);
          assert (state.m_depsToResume != null);
          assert (state.m_depsToResume.length == batch.size());
  
          // build an array of answers, assuming one result per expected id
          for (int i = 0; i < batch.size(); i++) {
              List<VoltTable> matchingTablesForId = mapResults.get(state.m_depsToResume[i]);
              assert (matchingTablesForId != null);
              assert (matchingTablesForId.size() == 1);
              state.m_results[i] = matchingTablesForId.get(0);
          }
  
          return state.m_results;
      }