plugin/checkstyle/src/main/java/se/jguru/nazgul/tools/plugin/checkstyle/RuleUtil.java
public static String getCategory(String eventSrcName) {
        if (eventSrcName == null) {
            return null;
        }

        int end = eventSrcName.lastIndexOf('.');
        eventSrcName = eventSrcName.substring(0, end);

        if (CHECKSTYLE_PACKAGE.equals(eventSrcName)) {
            return "misc";
        } else if (!eventSrcName.startsWith(CHECKSTYLE_PACKAGE)) {
            return "extension";
        }

        return eventSrcName.substring(eventSrcName.lastIndexOf('.') + 1);
    }
public static String getCategory(String eventSrcName) {
        if (eventSrcName == null) {
            return null;
        }

        int end = eventSrcName.lastIndexOf('.');
        eventSrcName = eventSrcName.substring(0, end);

        if (CHECKSTYLE_PACKAGE.equals(eventSrcName)) {
            return "misc";
        } else if (!eventSrcName.startsWith(CHECKSTYLE_PACKAGE)) {
            return "extension";
        }

        return eventSrcName.substring(eventSrcName.lastIndexOf('.') + 1);
    }
Get the rule category from an audit event source name.

@param eventSrcName the audit event source name
@return the rule category, which is the last package name or "misc" or "extension"