code: public static Object getOptionWithMatching(final List<?> options, final Object data) {
  		if (options != null) {
  			boolean legacyMatch = false;
  			Object legacyOption = null;
  
  			for (Object option : options) {
  				if (option instanceof OptionGroup) {
  					List<?> groupOptions = ((OptionGroup) option).getOptions();
  					if (groupOptions != null) {
  						for (Object nestedOption : groupOptions) {
  							// Check for match via equals/code
  							if (Util.equals(nestedOption, data) || isOptionCodeMatch(nestedOption,
  									data)) {
  								return nestedOption;
  							}
  
  							// Check for legacy match, but continue processing in case of a match via equals/code
  							if (!legacyMatch && isLegacyMatch(nestedOption, data)) {
  								legacyMatch = true;
  								legacyOption = nestedOption;
  							}
  						}
  					}
  				} else {
  					// Check for match via equals/code
  					if (Util.equals(option, data) || isOptionCodeMatch(option, data)) {
  						return option;
  					}
  
  					// Check for legacy match, but continue processing in case of a match via equals/code
  					if (!legacyMatch && isLegacyMatch(option, data)) {
  						legacyMatch = true;
  						legacyOption = option;
  					}
  				}
  			}
  
  			// Check if a legacy match was found
  			if (legacyMatch) {
  				return legacyOption;
  			}
  
  		}
  
  		return null;
  	}
docs: Return the option that matches the data allowing for Option/Code and Legacy matching.
  <p>
  This method should be used in conjunction with {@link #containsOptionWithMatching(List, Object)} as this method
  will return null if no match found, but null could be a valid option.
  </p>
  
  @param options the list of options
  @param data the test data value
  @return the option that matches allowing for Option/Code and Legacy matching, otherwise return null