<commit_before>package com.threerings.util {

import flash.errors.IllegalOperationError;

/**
 * Provides a generic iterator for an Array.
 * No co-modification checking is done.
 */
public class ArrayIterator
    implements Iterator
{
    /**
     * Create an ArrayIterator.
     */
    public function ArrayIterator (arr :Array)
    {
        _arr = arr;
        _index = 0;
    }

    // documentation inherited from interface Iterator
    public function hasNext () :Boolean
    {
        return (_index < _arr.length);
    }

    // documentation inherited from interface Iterator
    public function next () :Object
    {
        _lastIndex = _index;
        return _arr[_index++];
    }

    // documentation inherited from interface Iterator
    public function remove () :void
    {
        if (_lastIndex == -1) {
            throw new IllegalOperationError();

        } else {
            _arr.splice(_lastIndex, 1);
            _lastIndex = -1;
        }
    }

    /** The array we're iterating over. */
    protected var _arr :Array;

    /** The current index. */
    protected var _index :int;

    /** The last-removed index. */
    protected var _lastIndex :int = -1;
}
}
<commit_msg>Bugfix.<commit_after>package com.threerings.util {

import flash.errors.IllegalOperationError;

/**
 * Provides a generic iterator for an Array.
 * No co-modification checking is done.
 */
public class ArrayIterator
    implements Iterator
{
    /**
     * Create an ArrayIterator.
     */
    public function ArrayIterator (arr :Array)
    {
        _arr = arr;
        _index = 0;
    }

    // documentation inherited from interface Iterator
    public function hasNext () :Boolean
    {
        return (_index < _arr.length);
    }

    // documentation inherited from interface Iterator
    public function next () :Object
    {
        _lastIndex = _index;
        return _arr[_index++];
    }

    // documentation inherited from interface Iterator
    public function remove () :void
    {
        if (_lastIndex == -1) {
            throw new IllegalOperationError();

        } else {
            _arr.splice(_lastIndex, 1);
            _lastIndex = -1;
            _index--; // since _lastIndex is always before _index
        }
    }

    /** The array we're iterating over. */
    protected var _arr :Array;

    /** The current index. */
    protected var _index :int;

    /** The last-removed index. */
    protected var _lastIndex :int = -1;
}
}

{'fraction_non_alphanumeric': 0.0989456609894566, 'fraction_numerical': 0.0040551500405515, 'mean_word_length': 2.0532178217821784, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4616270', 'n_tokens_mistral': 694, 'n_tokens_neox': 676, 'n_words': 211}