<commit_before>package brooklyn.entity.basic;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

import brooklyn.config.BrooklynProperties;
import brooklyn.util.MutableMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import brooklyn.entity.Application;
import brooklyn.entity.basic.EntityReferences.SelfEntityReference;
import brooklyn.entity.trait.Startable;
import brooklyn.entity.trait.StartableMethods;
import brooklyn.location.Location;
import brooklyn.management.internal.AbstractManagementContext;
import brooklyn.management.internal.LocalManagementContext;

public abstract class AbstractApplication extends AbstractEntity implements Startable, Application {
    public static final Logger log = LoggerFactory.getLogger(AbstractApplication.class);
    private volatile AbstractManagementContext mgmt = null;
    private boolean deployed = false;

    BrooklynProperties brooklynProperties = null;

    public AbstractApplication(){
        this(new LinkedHashMap());
        log.warn("Using the AbstractApplication no arg constructor will rely on the properties defined in ~/.brooklyn/brooklyn.properties, " +
                       "potentially bypassing explicitly loaded properties");
    }

    public AbstractApplication(Map properties) {
        super(properties);
        this.application = new SelfEntityReference(this);

        if (properties.containsKey("mgmt")) {
            mgmt = (AbstractManagementContext) properties.remove("mgmt");
        }

        if(properties.containsKey("brooklyn.properties")){
            brooklynProperties = (BrooklynProperties) properties.remove("brooklyn.properties");
        }else{
            brooklynProperties = BrooklynProperties.Factory.newDefault();
        }

        setAttribute(SERVICE_UP, false);
    }

    /**
     * Default start will start all Startable children (child.start(Collection<? extends Location>)),
     * calling preStart(locations) first and postStart(locations) afterwards.
     */
    public void start(Collection<? extends Location> locations) {
        this.getLocations().addAll(locations);

        preStart(locations);
        StartableMethods.start(this, locations);
        postStart(locations);<commit_msg>remove warning in app startup<commit_after>package brooklyn.entity.basic;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;

import brooklyn.config.BrooklynProperties;
import brooklyn.util.MutableMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import brooklyn.entity.Application;
import brooklyn.entity.basic.EntityReferences.SelfEntityReference;
import brooklyn.entity.trait.Startable;
import brooklyn.entity.trait.StartableMethods;
import brooklyn.location.Location;
import brooklyn.management.internal.AbstractManagementContext;
import brooklyn.management.internal.LocalManagementContext;

public abstract class AbstractApplication extends AbstractEntity implements Startable, Application {
    public static final Logger log = LoggerFactory.getLogger(AbstractApplication.class);
    private volatile AbstractManagementContext mgmt = null;
    private boolean deployed = false;

    BrooklynProperties brooklynProperties = null;

    public AbstractApplication(){
        this(new LinkedHashMap());
        log.debug("Using the AbstractApplication no arg constructor will rely on the properties defined in ~/.brooklyn/brooklyn.properties, " +
                       "potentially bypassing explicitly loaded properties");
    }

    public AbstractApplication(Map properties) {
        super(properties);
        this.application = new SelfEntityReference(this);

        if (properties.containsKey("mgmt")) {
            mgmt = (AbstractManagementContext) properties.remove("mgmt");
        }

        if(properties.containsKey("brooklyn.properties")){
            brooklynProperties = (BrooklynProperties) properties.remove("brooklyn.properties");
        }else{
            brooklynProperties = BrooklynProperties.Factory.newDefault();
        }

        setAttribute(SERVICE_UP, false);
    }

    /**
     * Default start will start all Startable children (child.start(Collection<? extends Location>)),
     * calling preStart(locations) first and postStart(locations) afterwards.
     */
    public void start(Collection<? extends Location> locations) {
        this.getLocations().addAll(locations);

        preStart(locations);
        StartableMethods.start(this, locations);
        postStart(locations);
{'fraction_non_alphanumeric': 0.08815060908084164, 'fraction_numerical': 0.0008859357696566999, 'mean_word_length': 4.034559643255295, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5527154', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1104, 'n_words': 259}