question: private String parseMalformed ( String urlString ) { if ( parts != null && ! parts . isEmpty ( ) ) { String ret ; for ( URLPart part : parts ) { switch ( part ) { case PROTOCOL : ret = applyPattern ( REGEX_PROTOCOL , urlString ) ; break ; case PORT : ret = applyPattern ( REGEX_PORT , urlString ) ; break ; case QUERY : ret = applyPattern ( REGEX_QUERY , urlString ) ; break ; case WHOLE : ret = urlString ; break ; default : ret = urlString ; } if ( ! Strings . isNullOrEmpty ( ret ) ) { return ret ; } } } return urlString ; }
target:  Attempt to parse a malformed url string