question: private static String [ ] tidyOptionsArray ( String [ ] options ) { if ( options == null || options . length < 1 ) { return options ; } Set < String > parsedOptions = new HashSet < String > ( ) ; for ( String optionsArrayItem : options ) { String [ ] optionsArrayItems = optionsArrayItem . split ( "[,\\s+]+" ) ; for ( String option : optionsArrayItems ) { if ( option != null && ! option . equals ( "" ) ) { parsedOptions . add ( option ) ; } } } return parsedOptions . toArray ( new String [ parsedOptions . size ( ) ] ) ; }
target:  Tidy an array of options for a command line option that takes multiple values. For example { "Pfam,", "Gene3d,SMART", ",", ",test" } becomes { "Pfam", "Gene3d", "SMART", "test" }. The validity of the options are not checked here.