<commit_before>package ru.stqa.pft.addressbook.appmanager;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import ru.stqa.pft.addressbook.model.GroupData;

import static org.openqa.selenium.By.linkText;
import static org.openqa.selenium.By.name;

/**
 * Created by Z51-70 on 05.01.2017.
 */
public class GroupHelper extends BaseHelper {

  public GroupHelper(WebDriver wd) {
    super(wd);
  }

  public void returnToGroupPage() {
    click(linkText("group page"));
  }

  public void submitCroupCreation() {
    click(name("submit"));
  }

  public void fillGroupForm(GroupData groupData) {
    clickClearAndSendkeys(name("group_name"), groupData.getName());
    clickClearAndSendkeys(name("group_header"), groupData.getHeader());
    clickClearAndSendkeys(name("group_footer"), groupData.getFooter());
  }

  public void initGroupCreation() {
    click(name("new"));
  }

  public void deleteSelectedGroups() {
    click(name("delete"));
  }

  public void selectGroup() {
    if (!wd.findElement(name("selected[]")).isSelected()) {
      wd.findElement(name("selected[]")).click();
    }
  }

  public void initGroupModification() {
    click(name("edit"));
  }

  public void submitGroupModification() {
    click(name("update"));
  }

  public void createGroup(GroupData group) {
    initGroupCreation();
    fillGroupForm(group);
    submitCroupCreation();
    returnToGroupPage();
  }

  public boolean isThereAGroup() {
    return isElementPresented(By.name("selected[]"));
  }
}
<commit_msg>Fixed typo in the method name<commit_after>package ru.stqa.pft.addressbook.appmanager;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import ru.stqa.pft.addressbook.model.GroupData;

import static org.openqa.selenium.By.linkText;
import static org.openqa.selenium.By.name;

/**
 * Created by Z51-70 on 05.01.2017.
 */
public class GroupHelper extends BaseHelper {

  public GroupHelper(WebDriver wd) {
    super(wd);
  }

  public void returnToGroupPage() {
    click(linkText("group page"));
  }

  public void submitGroupCreation() {
    click(name("submit"));
  }

  public void fillGroupForm(GroupData groupData) {
    clickClearAndSendkeys(name("group_name"), groupData.getName());
    clickClearAndSendkeys(name("group_header"), groupData.getHeader());
    clickClearAndSendkeys(name("group_footer"), groupData.getFooter());
  }

  public void initGroupCreation() {
    click(name("new"));
  }

  public void deleteSelectedGroups() {
    click(name("delete"));
  }

  public void selectGroup() {
    if (!wd.findElement(name("selected[]")).isSelected()) {
      wd.findElement(name("selected[]")).click();
    }
  }

  public void initGroupModification() {
    click(name("edit"));
  }

  public void submitGroupModification() {
    click(name("update"));
  }

  public void createGroup(GroupData group) {
    initGroupCreation();
    fillGroupForm(group);
    submitGroupCreation();
    returnToGroupPage();
  }

  public boolean isThereAGroup() {
    return isElementPresented(By.name("selected[]"));
  }
}

{'fraction_non_alphanumeric': 0.14248366013071895, 'fraction_numerical': 0.00784313725490196, 'mean_word_length': 4.370175438596491, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '538120', 'n_tokens_mistral': 1001, 'n_tokens_neox': 952, 'n_words': 169}