<commit_before>package siren;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;

/**
 * A sub-entity containing an href value. One difference is that a
 * sub-entity MUST contain a rel attribute to describe its relationship
 * to the parent entity.
 * @author jonfreer
 * @since 8/13/17
 */
public class EmbeddedLinkSubEntity extends EntityBase {

    /**
     * Constructs an instance of {@link EmbeddedLinkSubEntity.Builder}.
     */
    public static class Builder implements siren.Builder<EmbeddedLinkSubEntity>{

        private List<Relation> rel;
        private URI href;
        private String type;
        private List<String> klass;
        private String title;

        /**
         * Constructs an instance of {@link EmbeddedLinkSubEntity.Builder}.
         */
        public Builder(){}

        /**
         * Adds the class provided to the current state of the builder.
         * @param klass Describes the nature of an entity's content based on the current representation.
         *              Possible values are implementation-dependent and should be documented.
         * @return The builder this method is called on.
         */
        public Builder klass(String className){
            if(this.klass == null){
                this.klass = new ArrayList<>();
            }
            this.klass.add(klass);
            return this;
        }

        /**
         * Adds the classes provided to the current state of the builder.
         * @param klasses Descriptions of the nature of an entity's content based on the current representation.
         *                Possible values are implementation-dependent and should be documented.
         * @return The builder this method is called on.
         */
        public Builder klasses(String... klasses){
            for(String klass : klasses){
                this.klass(klass);
            }
            return this;
        }

        /**
         * Adds the title provided to the current state of the builder.
         * @param title Descriptive text about the entity.
         * @return The builder this method is called on.
         */
        public Builder title(String title){
            this.title = title;<commit_msg>Rename parameter for klass method in EmbeddedLinkSubEntity.Builder, as well as add null check.<commit_after>package siren;

import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.List;

/**
 * A sub-entity containing an href value. One difference is that a
 * sub-entity MUST contain a rel attribute to describe its relationship
 * to the parent entity.
 * @author jonfreer
 * @since 8/13/17
 */
public class EmbeddedLinkSubEntity extends EntityBase {

    /**
     * Constructs an instance of {@link EmbeddedLinkSubEntity.Builder}.
     */
    public static class Builder implements siren.Builder<EmbeddedLinkSubEntity>{

        private List<Relation> rel;
        private URI href;
        private String type;
        private List<String> klass;
        private String title;

        /**
         * Constructs an instance of {@link EmbeddedLinkSubEntity.Builder}.
         */
        public Builder(){}

        /**
         * Adds the class provided to the current state of the builder.
         * @param klass Describes the nature of an entity's content based on the current representation.
         *              Possible values are implementation-dependent and should be documented.
         * @return The builder this method is called on.
         */
        public Builder klass(String klass){
            if(klass == null){
                throw new IllegalArgumentException("'klass' cannot be null.");
            }
            if(this.klass == null){
                this.klass = new ArrayList<>();
            }
            this.klass.add(klass);
            return this;
        }

        /**
         * Adds the classes provided to the current state of the builder.
         * @param klasses Descriptions of the nature of an entity's content based on the current representation.
         *                Possible values are implementation-dependent and should be documented.
         * @return The builder this method is called on.
         */
        public Builder klasses(String... klasses){
            for(String klass : klasses){
                this.klass(klass);
            }
            return this;
        }

        /**
         * Adds the title provided to the current state of the builder.
         * @param title Descriptive text about the entity.
         * @return The builder this method is called on.
         */
        public Builder title(String title){
            this.title = title;
{'fraction_non_alphanumeric': 0.07433143819751527, 'fraction_numerical': 0.0021057064645188463, 'mean_word_length': 1.9987373737373737, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '406265', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1137, 'n_words': 452}