code: public static StatsInstanceImpl createGroupInstance(String name, StatsGroup igroup, ObjectName userProvidedMBeanObjectName, boolean bCreateDefaultMBean,
                                                          StatisticActions actionLsnr)
                      throws StatsFactoryException {
          StatsGroupImpl group = (StatsGroupImpl) igroup;
  
          // construct path
          String[] parentPath = group.getPath();
          String[] path = new String[parentPath.length + 1];
  
          for (int i = 0; i < parentPath.length; i++) {
              path[i] = parentPath[i];
          }
          path[parentPath.length] = name;
  
          StatsInstanceImpl instance = new StatsInstanceImpl(name, group.getModuleConfig(), path, actionLsnr);
          //instance._scListener = scl;
  
          instance._register(userProvidedMBeanObjectName, bCreateDefaultMBean);
  
          return instance;
      }
docs: Create instance under group (same type)