code: public static boolean isStartState(TraceEvent te)
     {
        if (te.getType() == TraceEvent.GET_CONNECTION_LISTENER ||
            te.getType() == TraceEvent.GET_CONNECTION_LISTENER_NEW ||
            te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER ||
            te.getType() == TraceEvent.GET_INTERLEAVING_CONNECTION_LISTENER_NEW ||
            te.getType() == TraceEvent.CLEAR_CONNECTION_LISTENER)
           return true;
  
        return false;
     }
docs: Is start state
  @param te The event
  @return The value