question: public static Severity parseSeverity ( String str ) throws IllegalSeverityException { if ( str . equalsIgnoreCase ( Messages . ERROR ) ) { return ERROR ; } else if ( str . equalsIgnoreCase ( Messages . WARNING ) ) { return WARNING ; } else { throw new IllegalSeverityException ( ) ; } }
target:  Parse str and convert to appropriate Severity.