code: public String retrieveNonWildcardStem(String topic)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(
          tc,
          "retrieveNonWildcardStem",
          new Object[] { topic});
  
      String stem = null;
  
      int wildMany = topic.indexOf(MatchSpace.SUBTOPIC_DOUBLE_SEPARATOR_STRING);
      int wildOne = topic.indexOf(MatchSpace.SUBTOPIC_MATCHONE_CHAR);
  
      if( wildOne > -1)
      {
        if(wildMany > wildOne)
          stem = topic.substring(0, wildOne - 1); // Careful need to account for "/"
        else
        {
          if(wildMany > -1)
            stem = topic.substring(0,wildMany);
          else
            stem = topic.substring(0, wildOne - 1); // Careful need to account for "/"
        }
      }
      else
      {
        if(wildMany > -1)
        {
          stem = topic.substring(0,wildMany);
        }
        else
        {
          // No wildcards
          stem = topic;
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "retrieveNonWildcardStem", stem);
  
      return stem;
    }
docs: Method retrieveNonWildcardStem
  
  Used to retrieve the fully qualified substring that precedes the first wildcard
  in a wildcarded discriminator expression.
  
  @param topic
  @return
  @throws SIDiscriminatorSyntaxException