code: public static StatsGroup createStatsGroup(String groupName, String statsTemplate, StatsGroup parentGroup, ObjectName mBean, StatisticActions actionLsnr)
                      throws StatsFactoryException {
          if (tc.isEntryEnabled())
              Tr.entry(tc, new StringBuffer("createStatsGroup:name=").append(groupName).append(";parent group=").
                              append(parentGroup.getName()).append(";template=").append(statsTemplate).append(";mBean=").append((mBean == null) ? null : mBean.toString()).toString());
  
          checkPMIService(groupName);
  
          StatsGroup group;
          try {
              group = StatsGroupImpl.createGroup(groupName, parentGroup, statsTemplate, mBean, false, actionLsnr);
          } catch (StatsFactoryException e) {
              if (tc.isDebugEnabled())
                  Tr.debug(tc, "Exception:", e);
  
              if (tc.isEntryEnabled())
                  Tr.exit(tc, "createStatsGroup");
  
              throw e;
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "createStatsGroup");
  
          return group;
      }
docs: Create a StatsGroup using the Stats template and add to the PMI tree under the specified parent group.
  This method will associate the MBean provided by the caller to the Stats group.
  
  @param groupName name of the group
  @param statsTemplate location of the Stats template XML file
  @param parentGroup parent Stats group
  @param mBean MBean that needs to be associated with the Stats group
  @return Stats group
  @exception StatsFactoryException if error while creating Stats group