<commit_before><?php

namespace FOS\UserBundle\Form;

use Symfony\Component\Form\Form;
use Symfony\Component\Form\TextField;
use Symfony\Component\Form\TextareaField;

use Symfony\Component\Validator\ValidatorInterface;

use Symfony\Component\HttpFoundation\Request;
use FOS\UserBundle\Model\GroupInterface;
use FOS\UserBundle\Model\GroupManagerInterface;

class GroupForm extends Form
{
    protected $request;
    protected $groupManager;

    /**
     * Constructor.
     *
     * @param string $name
     * @param array|object $data
     * @param ValidatorInterface $validator
     * @param array $options
     */
    public function __construct($name, array $options = array())
    {
        $this->addOption('theme');

        parent::__construct($name, $options);
    }

    public function setRequest(Request $request)
    {
        $this->request = $request;
    }

    public function setGroupManager(GroupManagerInterface $groupManager)
    {
        $this->groupManager = $groupManager;
    }

    public function configure()
    {
        $this->add(new TextField('name'));
        $this->add(new TextareaField('description'));
    }

    public function process(GroupInterface $group = null)
    {
        if (null === $group) {
            $group = $this->groupManager->createGroup('');
        }

        $this->setData($group);

        if ('POST' == $this->request->getMethod()) {
            $this->bind($this->request);

            if ($this->isValid()) {
                $this->groupManager->updateGroup($group);
                return true;
            }
        }

        return false;<commit_msg>removing description field from GroupForm. Doesnt exist in model<commit_after><?php

namespace FOS\UserBundle\Form;

use Symfony\Component\Form\Form;
use Symfony\Component\Form\TextField;
use Symfony\Component\Form\TextareaField;

use Symfony\Component\Validator\ValidatorInterface;

use Symfony\Component\HttpFoundation\Request;
use FOS\UserBundle\Model\GroupInterface;
use FOS\UserBundle\Model\GroupManagerInterface;

class GroupForm extends Form
{
    protected $request;
    protected $groupManager;

    /**
     * Constructor.
     *
     * @param string $name
     * @param array|object $data
     * @param ValidatorInterface $validator
     * @param array $options
     */
    public function __construct($name, array $options = array())
    {
        $this->addOption('theme');

        parent::__construct($name, $options);
    }

    public function setRequest(Request $request)
    {
        $this->request = $request;
    }

    public function setGroupManager(GroupManagerInterface $groupManager)
    {
        $this->groupManager = $groupManager;
    }

    public function configure()
    {
        $this->add(new TextField('name'));
    }

    public function process(GroupInterface $group = null)
    {
        if (null === $group) {
            $group = $this->groupManager->createGroup('');
        }

        $this->setData($group);

        if ('POST' == $this->request->getMethod()) {
            $this->bind($this->request);

            if ($this->isValid()) {
                $this->groupManager->updateGroup($group);
                return true;
            }
        }

        return false;
{'fraction_non_alphanumeric': 0.12681271212588707, 'fraction_numerical': 0.0, 'mean_word_length': 2.58232044198895, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, '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': '7275077', 'n_tokens_mistral': 909, 'n_tokens_neox': 889, 'n_words': 181}