question: private String extractHumanReadableRealmString ( String realm ) { if ( realm == null || ! realm . contains ( "o=" ) ) { return "" ; } List < String > tokens = new ArrayList < String > ( ) ; StringTokenizer tokenizer = new StringTokenizer ( realm , "," ) ; while ( tokenizer . hasMoreTokens ( ) ) { tokens . add ( tokenizer . nextToken ( ) ) ; } String extractedRealmString = "" ; for ( String token : tokens ) { if ( token . contains ( "o=" ) ) { extractedRealmString += "/" + token . substring ( token . indexOf ( "=" ) + 1 ) ; } } extractedRealmString += "/" ; return extractedRealmString ; }
target:  A less complicated String detailing just the realm information. This is both more human-friendly, and also fits better on a mobile app's screen.