original_string: public function addGroup($sectionName, $name, $label, $position=0)
      {
          $groupManager = $this->container->get('admin.configuration.configgroup_manager');
          $sectionManager = $this->container->get('admin.configuration.configsection_manager');
          $group = $groupManager->getRepository()->findOneBySectionAndGroupName($sectionName, $name);
          $section = $sectionManager->getRepository()->findOneByName($sectionName);
          if (!$section) {
              throw new AdminConfigurationBuilderException(sprintf('The section "%s" does not exist.', $sectionName));
          }
          if (!$group && $section) {
              $group = new ConfigGroup();
              $group->setConfigSection($section);
              $group->setName($name);
              $group->setGLabel($label);
              $group->setPosition($position);
              $groupManager->create($group);
  
              return true;
          }
  
          return false;
      }
code: public function addGroup($sectionName, $name, $label, $position=0)
      {
          $groupManager = $this->container->get('admin.configuration.configgroup_manager');
          $sectionManager = $this->container->get('admin.configuration.configsection_manager');
          $group = $groupManager->getRepository()->findOneBySectionAndGroupName($sectionName, $name);
          $section = $sectionManager->getRepository()->findOneByName($sectionName);
          if (!$section) {
              throw new AdminConfigurationBuilderException(sprintf('The section "%s" does not exist.', $sectionName));
          }
          if (!$group && $section) {
              $group = new ConfigGroup();
              $group->setConfigSection($section);
              $group->setName($name);
              $group->setGLabel($label);
              $group->setPosition($position);
              $groupManager->create($group);
  
              return true;
          }
  
          return false;
      }
code_tokens: public function addGroup ( $ sectionName , $ name , $ label , $ position = 0 ) { $ groupManager = $ this -> container -> get ( 'admin.configuration.configgroup_manager' ) ; $ sectionManager = $ this -> container -> get ( 'admin.configuration.configsection_manager' ) ; $ group = $ groupManager -> getRepository ( ) -> findOneBySectionAndGroupName ( $ sectionName , $ name ) ; $ section = $ sectionManager -> getRepository ( ) -> findOneByName ( $ sectionName ) ; if ( ! $ section ) { throw new AdminConfigurationBuilderException ( sprintf ( 'The section "%s" does not exist.' , $ sectionName ) ) ; } if ( ! $ group && $ section ) { $ group = new ConfigGroup ( ) ; $ group -> setConfigSection ( $ section ) ; $ group -> setName ( $ name ) ; $ group -> setGLabel ( $ label ) ; $ group -> setPosition ( $ position ) ; $ groupManager -> create ( $ group ) ; return true ; } return false ; }
docstring: Add a ConfigGroup
  If a ConfigGroup with this name and within this section already exist then it does nothing
  
  @param string  $sectionName Section name
  @param string  $name        Group name
  @param string  $label       Group label
  @param integer $position    Group position
  
  @return boolean
docstring_tokens: Add a ConfigGroup If a ConfigGroup with this name and within this section already exist then it does nothing