<commit_before>package com.github.miachm.SODS.spreadsheet;

import java.util.ArrayList;
import java.util.List;

public class Range {
    private final int column_init,row_init;
    private final int numrows,numcolumns;
    private final Sheet sheet;

    Range(Sheet sheet,int row_init,int column_init,int numrows,int numcolumns){
        this.sheet = sheet;
        this.row_init = row_init;
        this.column_init = column_init;
        this.numrows = numrows;
        this.numcolumns = numcolumns;
    }

    public void clear(){
        iterateRange((cell) -> cell.clear());
    }

    public void copyTo(Range dest){
        dest.setValues(dest.getValues());
    }

    public Range getCell(int row,int column){
        return new Range(sheet,row_init+row,column_init+column,1,1);
    }

    public int getColumn(){
        return column_init;
    }

    public String getFormula(){
        return sheet.getCell(row_init,column_init).getFormula();
    }

    public List<String> getFormulas(){
        ArrayList<String> formulas = new ArrayList<String>();
        formulas.ensureCapacity(getNumRows()*getNumColumns());

        iterateRange((cell) -> formulas.add(cell.getFormula()));

        return formulas;
    }

    public int getLastColumn(){
        return column_init + getNumColumns();
    }

    public int getLastRow(){
        return row_init + getNumRows();
    }

    public int getNumColumns(){
        return numcolumns;
    }

    public int getNumRows(){
        return numrows;
    }

    public int getRow(){
        return row_init;
    }

    public Sheet getSheet(){
        return sheet;
    }

    public Object getValue(){
        return sheet.getCell(row_init,column_init).getValue();
    }

    public List<Object> getValues(){
        ArrayList<Object> values = new ArrayList<Object>();
        values.ensureCapacity(getNumRows()*getNumColumns());
        iterateRange((cell) -> values.add(cell.getValue()));
        return values;
    }

    public void setValue(Object o){
        iterateRange((cell) -> cell.setValue(o));<commit_msg>Implemented getNumValues() in Range<commit_after>package com.github.miachm.SODS.spreadsheet;

import java.util.ArrayList;
import java.util.List;

public class Range {
    private final int column_init,row_init;
    private final int numrows,numcolumns;
    private final Sheet sheet;

    Range(Sheet sheet,int row_init,int column_init,int numrows,int numcolumns){
        this.sheet = sheet;
        this.row_init = row_init;
        this.column_init = column_init;
        this.numrows = numrows;
        this.numcolumns = numcolumns;
    }

    public void clear(){
        iterateRange((cell) -> cell.clear());
    }

    public void copyTo(Range dest){
        dest.setValues(dest.getValues());
    }

    public Range getCell(int row,int column){
        return new Range(sheet,row_init+row,column_init+column,1,1);
    }

    public int getColumn(){
        return column_init;
    }

    public String getFormula(){
        return sheet.getCell(row_init,column_init).getFormula();
    }

    public List<String> getFormulas(){
        ArrayList<String> formulas = new ArrayList<String>();
        formulas.ensureCapacity(getNumRows()*getNumColumns());

        iterateRange((cell) -> formulas.add(cell.getFormula()));

        return formulas;
    }

    public int getLastColumn(){
        return column_init + getNumColumns();
    }

    public int getLastRow(){
        return row_init + getNumRows();
    }

    public int getNumColumns(){
        return numcolumns;
    }

    public int getNumRows(){
        return numrows;
    }

    public int getRow(){
        return row_init;
    }

    public Sheet getSheet(){
        return sheet;
    }

    public Object getValue(){
        return sheet.getCell(row_init,column_init).getValue();
    }

    public List<Object> getValues(){
        ArrayList<Object> values = new ArrayList<Object>();
        values.ensureCapacity(getNumRows()*getNumColumns());
        iterateRange((cell) -> values.add(cell.getValue()));
        return values;
    }

    public int getNumValues(){
        return getNumColumns()*getNumRows();
    }

    public void setValue(Object o){
        iterateRange((cell) -> cell.setValue(o));
{'fraction_non_alphanumeric': 0.11291460832745237, 'fraction_numerical': 0.0009409550693954364, 'mean_word_length': 2.7396657871591907, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, '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': '7218581', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1198, 'n_words': 271}