<commit_before>package org.apache.derby.impl.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;

import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.reference.JDBC40Translation;
import org.apache.derby.iapi.sql.ResultColumnDescriptor;
import org.apache.derby.iapi.sql.execute.ExecRow;
import org.apache.derby.iapi.types.DataTypeDescriptor;
import org.apache.derby.iapi.types.DataValueDescriptor;
import org.apache.derby.iapi.types.SQLInteger;
import org.apache.derby.iapi.types.SQLSmallint;
import org.apache.derby.iapi.types.SQLVarchar;
import org.apache.derby.impl.sql.GenericColumnDescriptor;
import org.apache.derby.impl.sql.execute.IteratorNoPutResultSet;
import org.apache.derby.impl.sql.execute.ValueRow;

/**
 * Builder class to make it simpler to define and create a ResultSet.  Creating a Derby ResultSet can include creating all sorts
 * of objects (ExecRows, DataValueDescriptors, GenericColumnDescriptors, etc.).  And you end up copying and pasting many lines of
 * boilerplate code to create a simple result set.  This builder does it all for you.  All you need to do is define the columns and
 * add the rows.
 * 
 * <h3>Example:</h3>
 * <pre>
 * 		// Step 1: Define the columns.
 *		ResultSetBuilder rsBuilder = new ResultSetBuilder();
 *		rsBuilder.getColumnBuilder()
 *			.addColumn("PROCEDURE_CAT", Types.VARCHAR, 128)
 *			.addColumn("COLUMN_TYPE", Types.SMALLINT)
 *			.addColumn("DATA_TYPE", Types.INTEGER)
 *		;
 *		// Step 2: Add the rows.  NOTE: The columns are now frozen (no changes allowed).
 *		RowBuilder rowBuilder = rsBuilder.getRowBuilder();
 *		rowBuilder.getDvd(0).setValue("Utilities"));
 *		rowBuilder.getDvd(1).setValue(24);
 *		rowBuilder.getDvd(2).setValue(777);
 *		rowBuilder.addRow();
 *		rowBuilder.getDvd(0).setValue("Admin"));
 *		rowBuilder.getDvd(1).setValue(42);
 *		rowBuilder.getDvd(2).setValue(6502);<commit_msg>DB-1804 Fixed typos in Javadoc.<commit_after>package org.apache.derby.impl.jdbc;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;

import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.reference.JDBC40Translation;
import org.apache.derby.iapi.sql.ResultColumnDescriptor;
import org.apache.derby.iapi.sql.execute.ExecRow;
import org.apache.derby.iapi.types.DataTypeDescriptor;
import org.apache.derby.iapi.types.DataValueDescriptor;
import org.apache.derby.iapi.types.SQLInteger;
import org.apache.derby.iapi.types.SQLSmallint;
import org.apache.derby.iapi.types.SQLVarchar;
import org.apache.derby.impl.sql.GenericColumnDescriptor;
import org.apache.derby.impl.sql.execute.IteratorNoPutResultSet;
import org.apache.derby.impl.sql.execute.ValueRow;

/**
 * Builder class to make it simpler to define and create a ResultSet.  Creating a Derby ResultSet can include creating all sorts
 * of objects (ExecRows, DataValueDescriptors, GenericColumnDescriptors, etc.).  And you end up copying and pasting many lines of
 * boilerplate code to create a simple result set.  This builder does it all for you.  All you need to do is define the columns and
 * add the rows.
 * 
 * <h3>Example:</h3>
 * <pre>
 * 		// Step 1: Define the columns.
 *		ResultSetBuilder rsBuilder = new ResultSetBuilder();
 *		rsBuilder.getColumnBuilder()
 *			.addColumn("PROCEDURE_CAT", Types.VARCHAR, 128)
 *			.addColumn("COLUMN_TYPE", Types.SMALLINT)
 *			.addColumn("DATA_TYPE", Types.INTEGER)
 *		;
 *		// Step 2: Add the rows.  NOTE: The columns are now frozen (no changes allowed).
 *		RowBuilder rowBuilder = rsBuilder.getRowBuilder();
 *		rowBuilder.getDvd(0).setValue("Utilities");
 *		rowBuilder.getDvd(1).setValue(24);
 *		rowBuilder.getDvd(2).setValue(777);
 *		rowBuilder.addRow();
 *		rowBuilder.getDvd("PROCEDURE_CAT").setValue("Admin");
 *		rowBuilder.getDvd("COLUMN_TYPE").setValue(42);
 *		rowBuilder.getDvd("DATA_TYPE").setValue(6502);
{'fraction_non_alphanumeric': 0.12201195219123506, 'fraction_numerical': 0.013197211155378486, 'mean_word_length': 4.898678414096916, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1085921', 'n_tokens_mistral': 1383, 'n_tokens_neox': 1350, 'n_words': 291}