code: private Integer findMinimumSafeLevel(PackageIndex<Integer> index) {
          if (index == null) {
              return null;
          }
          Integer minimumLevel = index.find(name);
          if (minimumLevel == null) {
              // Find by groups
              for (String group : groups) {
                  minimumLevel = index.find(group);
                  if (minimumLevel != null) {
                      break;
                  }
              }
          }
          return minimumLevel;
      }
docs: Search by name first and if not found, then search by groups.
  
  @param index
  @return the minimum safe level to enable trace for, or null if not found.