code: public static String getParentStreamSegmentName(String transactionName) {
          // Check to see if the given name is a properly formatted Transaction.
          int endOfStreamNamePos = transactionName.lastIndexOf(TRANSACTION_DELIMITER);
          if (endOfStreamNamePos < 0 || endOfStreamNamePos + TRANSACTION_DELIMITER.length() + TRANSACTION_ID_LENGTH > transactionName.length()) {
              // Improperly formatted Transaction name.
              return null;
          }
          return transactionName.substring(0, endOfStreamNamePos);
      }
docs: Attempts to extract the name of the Parent StreamSegment for the given Transaction StreamSegment. This method returns a
  valid value only if the Transaction StreamSegmentName was generated using the generateTransactionStreamSegmentName method.
  
  @param transactionName The name of the Transaction StreamSegment to extract the name of the Parent StreamSegment.
  @return The name of the Parent StreamSegment, or null if not a valid StreamSegment.