static void checkConfigGroupsHasServiceName() {
    Map<Long, ConfigGroup> configGroupMap = collectConfigGroupsWithoutServiceName();
    if (MapUtils.isEmpty(configGroupMap))
      return;

    String message = String.join(" ), ( ",
            configGroupMap.values().stream().map(ConfigGroup::getName).collect(Collectors.toList()));

    warning("You have config groups present in the database with no " +
            "service name, [(ConfigGroup) => ( {} )]. Run --auto-fix-database to fix " +
            "this automatically. Please backup Ambari Server database before running --auto-fix-database.", message);
  }
This method checks if there are any ConfigGroup with empty or null service name field
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java