<commit_before>package de.fraunhofer.iosb.ilt.sta.model.builder.api;

import com.fasterxml.jackson.annotation.JsonValue;
import de.fraunhofer.iosb.ilt.sta.model.MultiDatastream;
import de.fraunhofer.iosb.ilt.sta.model.Observation;
import de.fraunhofer.iosb.ilt.sta.model.ObservedProperty;
import de.fraunhofer.iosb.ilt.sta.model.Sensor;
import de.fraunhofer.iosb.ilt.sta.model.Thing;
import de.fraunhofer.iosb.ilt.sta.model.ext.UnitOfMeasurement;
import org.geojson.Polygon;
import org.threeten.extra.Interval;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Base class for any {@link AbstractEntityBuilder} of {@link MultiDatastream}
 *
 * @param <U> the type of the concrete class that extends this {@link AbstractMultiDatastreamBuilder}
 * @author <NAME>
 */
public abstract class AbstractMultiDatastreamBuilder<U extends AbstractMultiDatastreamBuilder<U>> extends AbstractEntityBuilder<MultiDatastream, U> {

    @Override
    protected MultiDatastream newBuildingInstance() {
        return new MultiDatastream();
    }

    @Override
    public MultiDatastream build() {
        // A MultiDatastream is always set by the ValueCode#OM_ComplexObservation observation type
        getBuildingInstance().setObservationType(ValueCode.OM_ComplexObservation.getValue());
        return super.build();
    }

    @Override
    protected MultiDatastream getBuildingInstance() {
        return new MultiDatastream();<commit_msg>fix(builder): AbstractMultiDatastreamBuilder#getBuildingInstance returned a new instance each time it was called<commit_after>package de.fraunhofer.iosb.ilt.sta.model.builder.api;

import com.fasterxml.jackson.annotation.JsonValue;
import de.fraunhofer.iosb.ilt.sta.model.MultiDatastream;
import de.fraunhofer.iosb.ilt.sta.model.Observation;
import de.fraunhofer.iosb.ilt.sta.model.ObservedProperty;
import de.fraunhofer.iosb.ilt.sta.model.Sensor;
import de.fraunhofer.iosb.ilt.sta.model.Thing;
import de.fraunhofer.iosb.ilt.sta.model.ext.UnitOfMeasurement;
import org.geojson.Polygon;
import org.threeten.extra.Interval;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Base class for any {@link AbstractEntityBuilder} of {@link MultiDatastream}
 *
 * @param <U> the type of the concrete class that extends this {@link AbstractMultiDatastreamBuilder}
 * @author <NAME>
 */
public abstract class AbstractMultiDatastreamBuilder<U extends AbstractMultiDatastreamBuilder<U>> extends AbstractEntityBuilder<MultiDatastream, U> {

    @Override
    protected MultiDatastream newBuildingInstance() {
        return new MultiDatastream();
    }

    @Override
    public MultiDatastream build() {
        // A MultiDatastream is always set by the ValueCode#OM_ComplexObservation observation type
        getBuildingInstance().setObservationType(ValueCode.OM_ComplexObservation.getValue());
        return super.build();
{'fraction_non_alphanumeric': 0.09761092150170649, 'fraction_numerical': 0.0, 'mean_word_length': 5.018480492813142, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '539049', 'n_tokens_mistral': 908, 'n_tokens_neox': 878, 'n_words': 182}