/src/main/java/org/htmlunit/html/HtmlSelect.java
element.replace(newOption); ensureSelectedIndex(); return ;
if ( i == index ) { element.replace ( newOption ) ; ensureSelectedIndex ( ) ; return; }
} public void replaceOption(final int index, final HtmlOption newOption) { final ChildElementsIterator iterator = new ChildElementsIterator(this); for (int i = 0; iterator.hasNext();) { final DomElement element = iterator.next(); if (element instanceof HtmlOption) { <extra_id_0> i++; } } if (newOption.isSelected()) { setSelectedAttribute(newOption, true); }