docs: public synchronized static ModuleItem registerModule(PmiModule instance) {
          if (tc.isEntryEnabled()) {
              Tr.entry(tc, "registerModule");
          }
          if (!initialized)
              init();
          if (!validateModule(instance)) {
              Tr.exit(tc, "registerModule - module is null");
              return null;
          }
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "**** " + "registerModule: " + instance.getModuleID() + ", " + instance.getName());
          }
  
          String[] path = instance.getPath();
  
          //int parentLevel = LEVEL_UNDEFINED;
          ModuleItem parent = null;
          if (path == null || path.length == 0) {
              Tr.warning(tc, "PMI0001W", instance.getName());
              return null;
          } else if (path.length == 1) {
              parent = moduleRoot;
              if (tc.isDebugEnabled()) {
                  printPMITree(parent);
              }
          } else {
              String[] parentPath = getParentPath(path);
              parent = moduleRoot.add(parentPath, 0);
          }
          //SET THE LEVEL TO BASIC
          instance.setInstrumentationBySet(defaultLevel);
  
          ModuleItem retItem = new ModuleItem(instance);
          if (!parent.add(retItem)) {
              Tr.warning(tc, "PMI0023W", instance.getName());
  
              if (tc.isDebugEnabled()) {
                  // unable to add due to duplicate name.
                  // print all children.
                  String p = "root";
                  if (parent.getInstance() != null)
                      p = parent.getInstance().getName();
  
                  StringBuffer b = new StringBuffer("Current entries under: " + p);
                  ModuleItem c[] = parent.children();
                  if (c != null) {
                      for (int k = 0; k < c.length; k++) {
                          PmiModule pm = c[k].getInstance();
                          if (pm != null)
                              b.append("\r\n").append(pm.getName());
                      }
                  }
                  Tr.debug(tc, b.toString());
              }
  
              retItem = null;
          }
          if (tc.isEntryEnabled())
              Tr.exit(tc, "registerModule");
          return retItem;
      }