<commit_before>package info.limpet.impl;

import info.limpet.ICommand;

import java.util.List;

import javax.measure.unit.Unit;

import org.eclipse.january.dataset.DatasetFactory;
import org.eclipse.january.dataset.DoubleDataset;
import org.eclipse.january.dataset.IDataset;

public class NumberDocumentBuilder extends
    CoreDocumentBuilder<Double, NumberDocument>
{
  private final Unit<?> _type;
  private Range _range;

  public NumberDocumentBuilder(final String name, final Unit<?> valueUnits,
      final ICommand predecessor, final Unit<?> indexUnits)
  {
    super(name, predecessor, indexUnits);
    _type = valueUnits;
  }

  @Override
  protected void finishOff(final NumberDocument res)
  {
    super.finishOff(res);

    res.setRange(_range);
  }

  @Override
  protected IDataset getDataset(final List<Double> values)
  {
    final Double[] arr = values.toArray(new Double[]
    {});
    return DatasetFactory.createFromObject(DoubleDataset.class, arr, null);
  }

  @Override
  protected NumberDocument getDocument(final IDataset dataset,
      final ICommand _predecessor2)
  {
    return new NumberDocument((DoubleDataset) dataset, _predecessor2, _type);
  }

  public void setRange(final Range range)
  {
    _range = range;
  }
}<commit_msg>fix member name so it remains consistent with previous xstream data format<commit_after>package info.limpet.impl;

import info.limpet.ICommand;

import java.util.List;

import javax.measure.unit.Unit;

import org.eclipse.january.dataset.DatasetFactory;
import org.eclipse.january.dataset.DoubleDataset;
import org.eclipse.january.dataset.IDataset;

public class NumberDocumentBuilder extends
    CoreDocumentBuilder<Double, NumberDocument>
{
  private final Unit<?> _units;
  private Range _range;

  public NumberDocumentBuilder(final String name, final Unit<?> valueUnits,
      final ICommand predecessor, final Unit<?> indexUnits)
  {
    super(name, predecessor, indexUnits);
    _units = valueUnits;
  }

  @Override
  protected void finishOff(final NumberDocument res)
  {
    super.finishOff(res);

    res.setRange(_range);
  }

  @Override
  protected IDataset getDataset(final List<Double> values)
  {
    final Double[] arr = values.toArray(new Double[]
    {});
    return DatasetFactory.createFromObject(DoubleDataset.class, arr, null);
  }

  @Override
  protected NumberDocument getDocument(final IDataset dataset,
      final ICommand predecessor)
  {
    return new NumberDocument((DoubleDataset) dataset, predecessor, _units);
  }

  public void setRange(final Range range)
  {
    _range = range;
  }
}
{'fraction_non_alphanumeric': 0.0913312693498452, 'fraction_numerical': 0.0007739938080495357, 'mean_word_length': 4.385416666666667, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5323296', 'n_tokens_mistral': 763, 'n_tokens_neox': 769, 'n_words': 191}