<commit_before>package com.actram.math;

import java.util.Random;

/**
 * Immutable {@code double} range with chainable methods.
 *
 * @author <NAME>
 */
public class DoubleRange extends AbstractCountableRange<Double> {
	public DoubleRange() {
		this(0);
	}

	public DoubleRange(double value) {
		super(value);
	}

	public DoubleRange(double from, double to) {
		super(from, to);
	}

	@Override
	protected Double add(Double value1, Double value2) {
		return (value1 + value2);
	}

	@Override
	public AbstractCountableRange<Double> center() {
		Double value = (from + distance() / 2);
		return (AbstractCountableRange<Double>) this.set(value, value);
	}

	@Override
	protected Double half(Double value) {
		return (value / 2);
	}

	@Override
	protected boolean isNegative(Double value) {
		return (value < 0);
	}

	@Override
	protected Double random(Random random) {
		return random.nextDouble() * (to - from) + from;
	}

	@Override
	public AbstractRange<Double> set(Double from, Double to) {
		return new DoubleRange(from, to);
	}

	@Override
	protected Double subtract(Double value1, Double value2) {
		return (value1 - value2);
	}
}<commit_msg>Use another setter<commit_after>package com.actram.math;

import java.util.Random;

/**
 * Immutable {@code double} range with chainable methods.
 *
 * @author <NAME>
 */
public class DoubleRange extends AbstractCountableRange<Double> {
	public DoubleRange() {
		this(0);
	}

	public DoubleRange(double value) {
		super(value);
	}

	public DoubleRange(double from, double to) {
		super(from, to);
	}

	@Override
	protected Double add(Double value1, Double value2) {
		return (value1 + value2);
	}

	@Override
	public AbstractCountableRange<Double> center() {
		return (AbstractCountableRange<Double>) this.set(from + distance() / 2);
	}

	@Override
	protected Double half(Double value) {
		return (value / 2);
	}

	@Override
	protected boolean isNegative(Double value) {
		return (value < 0);
	}

	@Override
	protected Double random(Random random) {
		return random.nextDouble() * (to - from) + from;
	}

	@Override
	public AbstractRange<Double> set(Double from, Double to) {
		return new DoubleRange(from, to);
	}

	@Override
	protected Double subtract(Double value1, Double value2) {
		return (value1 - value2);
	}
}
{'fraction_non_alphanumeric': 0.12058303886925795, 'fraction_numerical': 0.01060070671378092, 'mean_word_length': 4.316901408450704, 'pattern_counts': {'":': 0, '<': 15, '<?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': '3129944', 'n_tokens_mistral': 771, 'n_tokens_neox': 720, 'n_words': 202}