code: @SuppressWarnings("unchecked")
      public static void validate_ids(StormTopology topology, String topologyId) throws InvalidTopologyException {
          String topologyName = topologyIdToName(topologyId);
          if (!charValidate(topologyName)) {
              throw new InvalidTopologyException(topologyName + " is not a valid topology name. " + nameErrorInfo);
          }
  
          List<String> list = new ArrayList<>();
          for (StormTopology._Fields field : Thrift.STORM_TOPOLOGY_FIELDS) {
              Object value = topology.getFieldValue(field);
              if (value != null) {
                  Map<String, Object> obj_map = (Map<String, Object>) value;
                  Set<String> commids = obj_map.keySet();
  
                  for (String id : commids) {
                      if (system_id(id) || !charComponentValidate(id)) {
                          throw new InvalidTopologyException(id + " is not a valid component id. " + compErrorInfo);
                      }
                  }
  
                  for (Object obj : obj_map.values()) {
                      validate_component(obj);
                  }
  
                  list.addAll(commids);
              }
          }
  
          List<String> offending = JStormUtils.getRepeat(list);
          if (!offending.isEmpty()) {
              throw new InvalidTopologyException("Duplicate component ids: " + offending);
          }
      }
docs: Check Whether ID of Bolt or spout is system_id
  
  @throws InvalidTopologyException