code: public List<Parameter> getAllParameters() {
          List<Parameter> ret = new ArrayList<Parameter>();
  
          // Parameters within statements
          if (statements != null) {
              for (final Statement stmt : statements)
                  ret.addAll(stmt.getAllParameters());
          }
  
          // Parameters within nested statement groups
          if (statementGroups != null) {
              for (final StatementGroup sg : statementGroups)
                  ret.addAll(sg.getAllParameters());
          }
  
          return ret;
      }
docs: Returns a list of all parameters contained by this statement group's
  statements, and nested statement groups.
  
  @return List of parameters