Determines if a message starts with IBM SWG message ID.

@param msg the log record message
@return substring containing message ID or null if message does not
start with IBM SWG pattern.
323380
public static String getMessageId(String msg) {
        if (msg == null) {
            return null;
        }
        // check for IBM SWG pattern - "AAAAANNNNS:"
        // 5 chars followed by 4 numbers, followed by one of E/W/I, followed by a colon
        if (msg.length() >= 10) { // 10 chars in pattern 

            // copy first 9 characters into an array
            char[] lm = new char[9];
            msg.getChars(0, 9, lm, 0);

            // match characters in array against AAAAANNNNS: pattern

            if ((lm[8] >= '0') && (lm[8] <= '9')
                && (lm[7] >= '0') && (lm[7] <= '9')
                && (lm[6] >= '0') && (lm[6] <= '9')
                && (lm[5] >= '0') && (lm[5] <= '9')
                && ((lm[4] >= 'A') && (lm[4] <= 'Z') || (lm[4] >= '0') && (lm[4] <= '9'))
                && ((lm[3] >= 'A') && (lm[3] <= 'Z') || (lm[3] >= '0') && (lm[3] <= '9'))
                && ((lm[2] >= 'A') && (lm[2] <= 'Z') || (lm[2] >= '0') && (lm[2] <= '9'))
                && ((lm[1] >= 'A') && (lm[1] <= 'Z') || (lm[1] >= '0') && (lm[1] <= '9'))
                && ((lm[0] >= 'A') && (lm[0] <= 'Z') || (lm[0] >= '0') && (lm[0] <= '9'))) {
                return msg.substring(0, 10);
            }

        }

        // Check for IBM4.4.1 pattern - "AAAANNNNS:"
        // 4 chars followed by 4 numbers, followed by one of E/W/I, followed by a colon
        if (msg.length() >= 9) { // 9 chars in pattern

            // copy first 8 characters into an array
            char[] lm = new char[8];
            msg.getChars(0, 8, lm, 0);

            // match characters in array against AAAAANNNNS: pattern
            if ((lm[7] >= '0') && (lm[7] <= '9')
                && (lm[6] >= '0') && (lm[6] <= '9')
                && (lm[5] >= '0') && (lm[5] <= '9')
                && (lm[4] >= '0') && (lm[4] <= '9')
                && ((lm[3] >= 'A') && (lm[3] <= 'Z') || (lm[3] >= '0') && (lm[3] <= '9'))
                && ((lm[2] >= 'A') && (lm[2] <= 'Z') || (lm[2] >= '0') && (lm[2] <= '9'))
                && ((lm[1] >= 'A') && (lm[1] <= 'Z') || (lm[1] >= '0') && (lm[1] <= '9'))
                && ((lm[0] >= 'A') && (lm[0] <= 'Z') || (lm[0] >= '0') && (lm[0] <= '9'))) {

                // v5
                return msg.substring(0, 9);
            }
        }
        return null;
    }
1240489
public boolean evaluateMessage(
    Selector selectorTree,
    Selector discriminatorTree,
    SIBusMessage msg)
  { 
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "evaluateMessage", new Object[] { selectorTree, discriminatorTree, msg });

    boolean ret = mpm.evaluateMessage(selectorTree, discriminatorTree, msg );
          
    if (tc.isEntryEnabled()) SibTr.exit(tc, "evaluateMessage", new Boolean(ret));
    return ret;             
  }
718407
private Message doMessageToTypeJoin(Message msg) throws SAXException {
        for (int i = 0; i < msg.messageParts.length; i++) {
            Type schemaType = null;
            String nsprefix = null;
            String partTypeLocalName = null;
            StringTokenizer st =
                    new StringTokenizer(msg.messageParts[i].partTypeName, ":");
            if (st.hasMoreTokens()) {
                nsprefix = st.nextToken();
                partTypeLocalName = st.nextToken();
            } else {
                partTypeLocalName = msg.messageParts[i].partTypeName;
            }
            // FIXIT!! Test whether null nsprefix makes this bag.
            if (nsprefix
                    .equalsIgnoreCase((String) nsPrefixMap.get(XML_XSD.uri))) {
                msg.messageParts[i].partBaseTypeNamespaceURI = XML_XSD.uri;
                msg.messageParts[i].partBaseTypeLocalName = partTypeLocalName;
            }
            // If the part is not an XSD base type, then we assume it is a type defined
            // in the schema definition section of THIS WSDL document (i.e., either
            // a simpleType or a complexType).  NOTE that complexType not currently supported
            // by Fedora.  Also, note that if the part type is not found it the type table
            // (wsdlTypeTbl was created from parsing the schema types section of the WSDL),
            // then an exception will be thrown.  This means that Fedora only supports WSDL
            // whose message parts are either XSD base types or simpleTypes defined in the WSDL document.
            else if ((schemaType = (Type) wsdlTypeTbl.get(partTypeLocalName)) != null) {
                if (schemaType
                        .getClass()
                        .getName()
                        .equalsIgnoreCase("org.fcrepo.server.storage.service.SimpleType")) {
                    msg.messageParts[i].partBaseTypeNamespaceURI =
                            schemaType.baseTypeNamespaceURI;
                    msg.messageParts[i].partBaseTypeLocalName =
                            schemaType.baseTypeLocalName;
                    msg.messageParts[i].enumerationOfValues =
                            ((SimpleType) schemaType).enumerationOfValues;
                    // FIXIT!! Do we want to put more information in the Part object??
                }
            } else {
                throw new SAXException("WSDLParser: message part type must be XSD type or defined in WSDL as simpleType"
                        + msg.messageParts[i].partTypeName);
            }
        }
        return msg;
    }
1103345
public static void d(String msg) {
		if (!debug) {
			return;
		}
		if (messager == null) {
			return;
		}
		messager.printMessage(Diagnostic.Kind.NOTE, msg);
	}
1278646
public boolean hasValidKey(HttpMessage msg) {
		try {
			HttpRequestHeader requestHeader = msg.getRequestHeader();
			return this.hasValidKey(requestHeader, getParams(requestHeader));
		} catch (ApiException e) {
			logger.error(e.getMessage(), e);
			return false;
		}
	}
1236009
public boolean isApiMessage() {
        MessageType mType = getJsMessageType();
        return (mType == MessageType.JMS || mType == MessageType.SDO);
    }
849255
public void trace(String msg) {
        logger.log(FQCN, traceCapable ? Level.TRACE : Level.DEBUG, msg, null);
    }
507937
@Override
    public SmsMessage getSmsMessageBySmppMessageId(final String smppMessageId) {
        final SqlSession session = sessions.openSession();
        try {
            final Map<String, Object> result = session.selectOne(namespace + "getSmsMessageBySmppMessageId", smppMessageId);
            if (result != null) {
                return toSmsMessage(result);
            } else {
                return null;
            }
        } finally {
            session.close();
        }
    }
1298073
@Nonnull
  public static EValidity validateMessage (@Nullable final String sMsg)
  {
    final int nLen = StringHelper.getLength (sMsg);
    if (nLen >= 7 && nLen <= 8)
      if (AbstractUPCEAN.validateMessage (sMsg).isValid ())
        return EValidity.VALID;
    return EValidity.INVALID;
  }
1024275
public void w(final String msg) {
        logMgr.log(tag, LogLevelConst.WARNING, msg, null);
    }
812357
public static String getString(final String msg) {
        ConsoleMenu.print(msg);

        BufferedReader bufReader = null;
        String opt = null;

        try {
            bufReader = new BufferedReader(new InputStreamReader(System.in));
            opt = bufReader.readLine();
        } catch (final IOException ex) {
            log(ex);
            System.exit(1);
        }

        return opt;
    }
1013767
public synchronized SiteNode findClosestParent(HttpMessage msg) {
    	if (msg == null) {
    		return null;
    	}
    	return this.findClosestParent(msg.getRequestHeader().getURI());
    }
726749
public static String getInfoMsg(final String msg) {
    if (msg.startsWith("ERROR")) {
      return msg.replaceFirst("ERROR", "");
    }
    if (msg.startsWith("WARN")) {
      return msg.replaceFirst("WARN", "");
    }
    return msg;
  }
609149
public static String checkNonEmpty(String s, String msg) {
    checkArgument(!s.isEmpty(), msg);
    return s;
  }
461510
public static int wtf(String tag, String msg) {
        return wtf(LOG_ID_MAIN, tag, msg, null, false);
    }
945245
public static String getString(final String msg, final String defaultVal) {
        String s = getString(msg + "(default:" + defaultVal + "):");
        if (StringUtils.isBlank(s)) {
            s = defaultVal;
        }

        return s;
    }
367858
public String render(Message5WH msg) {
		if(msg!=null){
			ST ret = this.stg.getInstanceOf("message5wh");
			if(msg.getWhereLocation()!=null){
				ST where = this.stg.getInstanceOf("where");
				where.add("location", msg.getWhereLocation());
				if(msg.getWhereLine()>0){
					where.add("line", msg.getWhereLine());
				}
				if(msg.getWhereColumn()>0){
					where.add("column", msg.getWhereColumn());
				}
				ret.add("where", where);
			}

			ret.add("reporter", msg.getReporter());

			if(msg.getType()!=null){
				Map<String, Boolean> typeMap = new HashMap<>();
				typeMap.put(msg.getType().toString(), true);
				ret.add("type", typeMap);
			}

			if(msg.getWhat()!=null && !StringUtils.isBlank(msg.getWhat().toString())){
				ret.add("what", msg.getWhat());
			}

			ret.add("who",  msg.getWho());
			ret.add("when", msg.getWhen());

			ret.add("why", msg.getWhy());
			ret.add("how", msg.getHow());

			return ret.render();
		}
		return "";
	}