code: public int[] executeBatch() throws SQLException {
      checkClose();
      int size;
      if (batchQueries == null || (size = batchQueries.size()) == 0) {
        return new int[0];
      }
  
      lock.lock();
      try {
        internalBatchExecution(size);
        return results.getCmdInformation().getUpdateCounts();
      } catch (SQLException initialSqlEx) {
        throw executeBatchExceptionEpilogue(initialSqlEx, size);
      } finally {
        executeBatchEpilogue();
        lock.unlock();
      }
    }
docs: Execute statements. depending on option, queries mays be rewritten :
  
  <p>those queries will be rewritten if possible to INSERT INTO ... VALUES (...) ; INSERT INTO ...
  VALUES (...);</p>
  
  <p>if option rewriteBatchedStatements is set to true, rewritten to INSERT INTO ... VALUES (...),
  (...);</p>
  
  @return an array of update counts containing one element for each command in the batch.  The
  elements of the array are ordered according to the order in which send were added to the
  batch.
  @throws SQLException if a database access error occurs, this method is called on a closed
  <code>Statement</code> or the driver does not support batch statements.
  Throws {@link BatchUpdateException} (a subclass of
  <code>SQLException</code>) if one of the send sent to the database fails
  to execute properly or attempts to return a result set.
  @see #addBatch
  @see DatabaseMetaData#supportsBatchUpdates
  @since 1.3