<commit_before>package com.bbn.bue.common.strings.offsets;

import com.google.common.base.Objects;

import static com.google.common.base.Preconditions.checkNotNull;

public final class OffsetGroupRange {

  private final OffsetGroup startInclusive;
  private final OffsetGroup endInclusive;

  public OffsetGroup startInclusive() {
    return startInclusive;
  }

  public OffsetGroup endInclusive() {
    return endInclusive;
  }

  public static OffsetGroupRange from(final OffsetGroup startInclusive,
      final OffsetGroup endInclusive) {
    return new OffsetGroupRange(startInclusive, endInclusive);
  }

	/*public static OffsetGroupRange fromTokenSpan(final Span span) {
                return new OffsetGroupRange(span.startOffsetGroup(), span.endOffsetGroup());
	}*/

  private OffsetGroupRange(final OffsetGroup startInclusive, final OffsetGroup endInclusive) {
    this.startInclusive = checkNotNull(startInclusive);
    this.endInclusive = checkNotNull(endInclusive);
  }

  @Override
  public String toString() {
    return startInclusive + "-" + endInclusive;<commit_msg>Check validity of OffsetGroupRange at construction<commit_after>package com.bbn.bue.common.strings.offsets;

import com.google.common.base.Objects;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

public final class OffsetGroupRange {

  private final OffsetGroup startInclusive;
  private final OffsetGroup endInclusive;

  public OffsetGroup startInclusive() {
    return startInclusive;
  }

  public OffsetGroup endInclusive() {
    return endInclusive;
  }

  public static OffsetGroupRange from(final OffsetGroup startInclusive,
      final OffsetGroup endInclusive) {
    return new OffsetGroupRange(startInclusive, endInclusive);
  }

	/*public static OffsetGroupRange fromTokenSpan(final Span span) {
                return new OffsetGroupRange(span.startOffsetGroup(), span.endOffsetGroup());
	}*/

  private OffsetGroupRange(final OffsetGroup startInclusive, final OffsetGroup endInclusive) {
    this.startInclusive = checkNotNull(startInclusive);
    this.endInclusive = checkNotNull(endInclusive);
    checkArgument(startInclusive.charOffset().asInt() <= endInclusive.charOffset().asInt(),
        "Starting char offset %s of OffsetGroupRange exceeds ending char offset %s",
        startInclusive.charOffset().asInt(), endInclusive.charOffset().asInt());
    checkArgument(startInclusive.edtOffset().asInt() <= endInclusive.edtOffset().asInt(),
        "Starting EDT offset %s of OffsetGroupRange exceeds ending EDT offset %s",
        startInclusive.edtOffset().asInt(), endInclusive.edtOffset().asInt());
  }

  @Override
  public String toString() {
    return startInclusive + "-" + endInclusive;
{'fraction_non_alphanumeric': 0.08904847396768402, 'fraction_numerical': 0.0, 'mean_word_length': 4.804166666666666, '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': '7063716', 'n_tokens_mistral': 797, 'n_tokens_neox': 747, 'n_words': 177}