<commit_before>package org.jboss.msc.registry;

import java.util.ArrayList;
import java.util.List;
import org.jboss.msc.service.Location;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.value.Value;

import java.util.Collection;

/**
 * Class representing the definition of a services prior to the service being installed.
 *
 * @author <NAME>
 * @author <NAME>
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public final class ServiceDefinition {
    private final ServiceName name;
    private final List<String> dependencies;
    private final ServiceController.Mode initialMode;
    private final Location location;
    private final Value<Service> service;

    private ServiceDefinition(ServiceName name, ServiceController.Mode initialMode, Location location, Value<Service> service, List<String> dependencies) {
        if (name == null) {
            throw new IllegalArgumentException("Name can not be null");
        }
        this.name = name;
        this.dependencies = dependencies;
        this.initialMode = initialMode;
        this.location = location;
        this.service = service;
    }
    
    public static Builder build(final String name, final Value<Service> service) {
        return new Builder(name, service);
    }
    
    public static final class Builder {
        private final String name;
        private final Value<Service> service;
        private List<String> dependencies = new ArrayList<String>();
        private ServiceController.Mode initialMode = ServiceController.Mode.AUTOMATIC;
        private Location location;


        private Builder(final String name, final Value<Service> service) {
            if(name == null) throw new IllegalArgumentException("Name is required");
            if(service == null) throw new IllegalArgumentException("Service is required");
            this.name = name;
            this.service = service;

        }
        
        public Builder addDependency(String dependency) {
            if (dependency == null)
                throw new IllegalArgumentException("Dependency can not be null");
            
            dependencies.add(dependency);
            
            return this;
        }
        
        public Builder addDependencies(Collection<String> dependencies)
        {
            if (dependencies == null)<commit_msg>Slight memory improvement<commit_after>package org.jboss.msc.registry;

import java.util.ArrayList;
import java.util.List;
import org.jboss.msc.service.Location;
import org.jboss.msc.service.Service;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.value.Value;

import java.util.Collection;

/**
 * Class representing the definition of a services prior to the service being installed.
 *
 * @author <NAME>
 * @author <NAME>
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 */
public final class ServiceDefinition {
    private final ServiceName name;
    private final List<String> dependencies;
    private final ServiceController.Mode initialMode;
    private final Location location;
    private final Value<Service> service;

    private ServiceDefinition(ServiceName name, ServiceController.Mode initialMode, Location location, Value<Service> service, List<String> dependencies) {
        if (name == null) {
            throw new IllegalArgumentException("Name can not be null");
        }
        this.name = name;
        this.dependencies = dependencies;
        this.initialMode = initialMode;
        this.location = location;
        this.service = service;
    }
    
    public static Builder build(final String name, final Value<Service> service) {
        return new Builder(name, service);
    }
    
    public static final class Builder {
        private final String name;
        private final Value<Service> service;
        private List<String> dependencies = new ArrayList<String>(0);
        private ServiceController.Mode initialMode = ServiceController.Mode.AUTOMATIC;
        private Location location;


        private Builder(final String name, final Value<Service> service) {
            if(name == null) throw new IllegalArgumentException("Name is required");
            if(service == null) throw new IllegalArgumentException("Service is required");
            this.name = name;
            this.service = service;

        }
        
        public Builder addDependency(String dependency) {
            if (dependency == null)
                throw new IllegalArgumentException("Dependency can not be null");
            
            dependencies.add(dependency);
            
            return this;
        }
        
        public Builder addDependencies(Collection<String> dependencies)
        {
            if (dependencies == null)
{'fraction_non_alphanumeric': 0.08575611796695252, 'fraction_numerical': 0.00020916126333403055, 'mean_word_length': 2.7505882352941176, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '4439473', 'n_tokens_mistral': 1168, 'n_tokens_neox': 1136, 'n_words': 357}