Source:
<code>public int searchQueueSubscriptions(String queueNamePattern, String identifierPattern, int ownNodeIdIndex, boolean isNameExactMatch, boolean isIdentifierExactMatch) { WebElement queueNamePatternField = driver.findElement(By.name(UIElementMapper.getInstance() <START> .getElement("mb.search.queue.name.pattern.tag.name"))); <END> queueNamePatternField.clear(); queueNamePatternField.sendKeys(queueNamePattern); WebElement queueNameExactMatchField = driver.findElement( By.name(UIElementMapper.getInstance().getElement("mb.search.queue.name.exactmatch.tag.name"))); if (isNameExactMatch && !queueNameExactMatchField.isSelected()) { queueNameExactMatchField.click(); } if (!isNameExactMatch && queueNameExactMatchField.isSelected()) { queueNameExactMatchField.click(); } WebElement queueIdentifierExactMatchField = driver.findElement( By.name(UIElementMapper.getInstance().getElement("mb.search.queue.identifier.exactmatch.tag.name"))); if (isIdentifierExactMatch && !queueIdentifierExactMatchField.isSelected()) { queueIdentifierExactMatchField.click(); } if (!isIdentifierExactMatch && queueIdentifierExactMatchField.isSelected()) { queueIdentifierExactMatchField.click(); } WebElement queueIdentifierPatternField = driver.findElement(By.name(UIElementMapper.getInstance() .getElement("mb.search.queue.identifier.pattern.tag.name"))); queueIdentifierPatternField.clear(); queueIdentifierPatternField.sendKeys(identifierPattern); Select ownNodeIdDropdown = new Select(driver.findElement(By.id(UIElementMapper.getInstance() .getElement("mb.search.queue.own.node.id.element.id")))); ownNodeIdDropdown.selectByIndex(ownNodeIdIndex); driver.findElement(By.xpath(UIElementMapper.getInstance() .getElement("mb.search.queue.search.button.xpath"))).click(); return getSubscriptionCount(); }</code><technical_language>strings extracted constants</technical_language>

Target:
public int searchQueueSubscriptions(String queueNamePattern, String identifierPattern, int ownNodeIdIndex, boolean isNameExactMatch, boolean isIdentifierExactMatch) { WebElement queueNamePatternField = driver.findElement(By.name(UIElementMapper.getInstance() .getElement("mb.search.queue.name.pattern.tag.name"))); queueNamePatternField.clear(); queueNamePatternField.sendKeys(queueNamePattern); WebElement queueNameExactMatchField = driver.findElement( By.name(UIElementMapper.getInstance().getElement("mb.search.queue.name.exactmatch.tag.name"))); if (isNameExactMatch != queueNameExactMatchField.isSelected()) { queueNameExactMatchField.click(); } WebElement queueIdentifierExactMatchField = driver.findElement( By.name(UIElementMapper.getInstance().getElement("mb.search.queue.identifier.exactmatch.tag.name"))); if (isIdentifierExactMatch != queueIdentifierExactMatchField.isSelected()) { queueIdentifierExactMatchField.click(); } WebElement queueIdentifierPatternField = driver.findElement(By.name(UIElementMapper.getInstance() .getElement("mb.search.queue.identifier.pattern.tag.name"))); queueIdentifierPatternField.clear(); queueIdentifierPatternField.sendKeys(identifierPattern); Select ownNodeIdDropdown = new Select(driver.findElement(By.id(UIElementMapper.getInstance() .getElement("mb.search.queue.own.node.id.element.id")))); ownNodeIdDropdown.selectByIndex(ownNodeIdIndex); driver.findElement(By.xpath(UIElementMapper.getInstance() .getElement("mb.search.queue.search.button.xpath"))).click(); return getSubscriptionCount(); }