/src/main/java/org/htmlunit/util/UrlUtils.java
final int questionMarkIndex = StringUtils.indexOf( newUserName, '?', startIndex, endIndex) ;
final int questionMarkIndex = StringUtils.indexOf ( spec, '?', startIndex, endIndex ) ;
} } else { locationStartIndex = -1; locationEndIndex = -1; } <extra_id_0> if (questionMarkIndex >= 0) { if ((locationStartIndex >= 0) && (locationEndIndex < 0)) { locationEndIndex = questionMarkIndex; startIndex = questionMarkIndex; } url.query_ = spec.substring(questionMarkIndex + 1, endIndex);