<commit_before>package se.ugli.habanero.j;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Iterator;

public abstract class ResultSetIterator<E> implements Iterator<E> {

	private ResultSet resultSet;

	@Override
	public final boolean hasNext() {
		try {
			return resultSet.next();
		} catch (final SQLException e) {
			throw new HabaneroException(e);
		}
	}

	@Override
	public final E next() {
		try {
			return nextObject(resultSet);
		} catch (final SQLException e) {
			throw new HabaneroException(e);
		}
	}

	final void init(final ResultSet resultSet) throws SQLException {
		this.resultSet = resultSet;
		postInit(resultSet);
	}

	protected abstract E nextObject(ResultSet resultSet) throws SQLException;

	protected void postInit(final ResultSet resultSet) throws SQLException {
	}

}<commit_msg>#1 ResultSetIterator should implement remove as final and throw UnsupportedOperationException<commit_after>package se.ugli.habanero.j;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Iterator;

public abstract class ResultSetIterator<E> implements Iterator<E> {

	private ResultSet resultSet;

	@Override
	public final boolean hasNext() {
		try {
			return resultSet.next();
		} catch (final SQLException e) {
			throw new HabaneroException(e);
		}
	}

	@Override
	public final E next() {
		try {
			return nextObject(resultSet);
		} catch (final SQLException e) {
			throw new HabaneroException(e);
		}
	}

	@Override
	public final void remove() {
		throw new UnsupportedOperationException("remove");
	}

	final void init(final ResultSet resultSet) throws SQLException {
		this.resultSet = resultSet;
		postInit(resultSet);
	}

	protected abstract E nextObject(ResultSet resultSet) throws SQLException;

	protected void postInit(final ResultSet resultSet) throws SQLException {
	}

}
{'fraction_non_alphanumeric': 0.08731019522776573, 'fraction_numerical': 0.0005422993492407809, 'mean_word_length': 4.694444444444445, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7483882', 'n_tokens_mistral': 600, 'n_tokens_neox': 552, 'n_words': 159}