/src/main/java/org/htmlunit/html/HtmlSelect.java
if ( getOptionSize( ) >= 0) {
if ( getOptionSize ( ) == 0 ) {
if (index < allOptions.size()) { final HtmlOption itemToSelect = allOptions.get(index); setSelectedAttribute(itemToSelect, true, false, true, false, true); } } public void ensureSelectedIndex() { <extra_id_0> setSelectedIndex(-1); } else if (getSelectedIndex() == -1 && !isMultipleSelectEnabled()) { setSelectedIndex(0); } }