<commit_before><?php
/**
 * Ginq: Generator INtegrated Query
 * Copyright 2013, <NAME> <<EMAIL>>
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * PHP Version 5.3 or later
 *
 * @author     <NAME> <<EMAIL>>
 * @copyright  Copyright 2013, <NAME> <<EMAIL>>
 * @license    MIT License (http://www.opensource.org/licenses/mit-license.php)
 * @package    Ginq
 */
namespace Ginq\Iterator;

use Ginq\Lookup;

require_once dirname(dirname(__FILE__)) . "/iter.php";
require_once dirname(dirname(__FILE__)) . "/Lookup.php";

/**
 * GroupByIterator
 * @package Ginq
 */
class GroupByIterator implements \Iterator
{
    private $keySelector;
    private $elementSelector;
    private $groupSelector;

    private $it;
    private $group;
    private $i;

    public function __construct($xs, $keySelector, $elementSelector, $groupSelector)
    {
        $this->it = \Ginq\iter($xs);
        $this->keySelector     = $keySelector;
        $this->elementSelector = $elementSelector;
        $this->groupSelector   = $groupSelector;
    }

    public function current()
    {
        $group = new SelectIterator(
            $this->group->current(),
            $this->elementSelector,
            function($x, $k) { return $k; }
        );<commit_msg>Dependent class was not loaded.<commit_after><?php
/**
 * Ginq: Generator INtegrated Query
 * Copyright 2013, <NAME> <<EMAIL>>
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * PHP Version 5.3 or later
 *
 * @author     <NAME> <<EMAIL>>
 * @copyright  Copyright 2013, <NAME> <<EMAIL>>
 * @license    MIT License (http://www.opensource.org/licenses/mit-license.php)
 * @package    Ginq
 */
namespace Ginq\Iterator;

use Ginq\Lookup;

require_once dirname(dirname(__FILE__)) . "/iter.php";
require_once dirname(dirname(__FILE__)) . "/Lookup.php";

/**
 * GroupByIterator
 * @package Ginq
 */
class GroupByIterator implements \Iterator
{
    private $keySelector;
    private $elementSelector;
    private $groupSelector;

    private $it;
    private $group;
    private $i;

    public function __construct($xs, $keySelector, $elementSelector, $groupSelector)
    {
        $this->it = \Ginq\iter($xs);
        $this->keySelector     = $keySelector;
        $this->elementSelector = $elementSelector;
        $this->groupSelector   = $groupSelector;
    }

    public function current()
    {
        require_once dirname(__FILE__) . "/SelectIterator.php";
        $group = new SelectIterator(
            $this->group->current(),
            $this->elementSelector,
            function($x, $k) { return $k; }
        );
{'fraction_non_alphanumeric': 0.1332089552238806, 'fraction_numerical': 0.007462686567164179, 'mean_word_length': 2.9718518518518517, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5200878', 'n_tokens_mistral': 819, 'n_tokens_neox': 796, 'n_words': 201}