Program: 147475
Project: 147475
Buggy source:
public boolean add(final String domain,final String usagePlanName,final String firstName,final String lastName,final String adminUserName,final String adminPassword,final String adminPasswordRepeat,final String adminEmail){
  boolean isSuccessful=false;
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(domain);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(firstName);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(lastName);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminUserName);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminPassword);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminPasswordRepeat);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminEmail);
  driver.findElement(By.xpath(UIElementMapper.getInstance().getElement("String_Node_Str"))).click();
  String dialog=driver.getWindowHandle();
  driver.switchTo().window(dialog);
  if (driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).getText().contains("String_Node_Str")) {
    isSuccessful=true;
  }
  List<WebElement> buttonList=driver.findElements(By.tagName("String_Node_Str"));
  for (  WebElement okButton : buttonList) {
    if (okButton.getText().compareToIgnoreCase("String_Node_Str") == 0) {
      okButton.click();
      break;
    }
  }
  return isSuccessful;
}

Fixed version (ground truth):
/** 
 * Add a new tenant
 * @param domain domain of the tenant
 * @param usagePlanName tenants usage plan
 * @param firstName tenant first name
 * @param lastName tenant last name
 * @param adminUserName admin users' user name
 * @param adminPassword admin users' password
 * @param adminPasswordRepeat admin users' password (if repeat password doesn't match operationmust be unsuccessful)
 * @param adminEmail admin users' email
 * @return true if tenant successfully created. false otherwise
 */
public boolean add(final String domain,final String usagePlanName,final String firstName,final String lastName,final String adminUserName,final String adminPassword,final String adminPasswordRepeat,final String adminEmail){
  boolean isSuccessful=false;
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(domain);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(firstName);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(lastName);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminUserName);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminPassword);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminPasswordRepeat);
  driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).sendKeys(adminEmail);
  driver.findElement(By.xpath(UIElementMapper.getInstance().getElement("String_Node_Str"))).click();
  String dialog=driver.getWindowHandle();
  driver.switchTo().window(dialog);
  if (driver.findElement(By.id(UIElementMapper.getInstance().getElement("String_Node_Str"))).getText().contains("String_Node_Str")) {
    isSuccessful=true;
  }
  List<WebElement> buttonList=driver.findElements(By.tagName("String_Node_Str"));
  for (  WebElement okButton : buttonList) {
    if (okButton.getText().compareToIgnoreCase("String_Node_Str") == 0) {
      okButton.click();
      break;
    }
  }
  return isSuccessful;
}