<commit_before>package io.fabric8.maven.docker.config;


import java.io.Serializable;

import org.apache.maven.plugin.assembly.model.Assembly;
import org.apache.maven.plugins.annotations.Parameter;

public class AssemblyConfiguration implements Serializable {

    private static final String DEFAULT_BASE_DIR = "/maven";

    /**
     * @parameter
     */
    @Deprecated
    private String basedir;

    /**
     * New replacement for base directory which better reflects its
     * purpose
     */
    private String targetDir;

    /**
     * @parameter
     */
    private String descriptor;

    /**
     * @parameter
     */
    private Assembly inline;

    /**
     * @parameter
     */
    private String descriptorRef;

    /**
     * @parameter
     * @deprecated Use {@link BuildImageConfiguration#dockerFileDir} instead
     */
    private String dockerFileDir;

    @Deprecated
    private Boolean exportBasedir;

    /**
     * Whether the target directory should be
     * exported.
     *
     */
    @Parameter
    private Boolean exportTargetDir;

    /**
     * @paramter default-value="false"
     * @deprecated use permissionMode == ignore instead.
     */
    private Boolean ignorePermissions;

    /**
     * @parameter
     */
    private AssemblyMode mode;

    /**
     * @parameter
     */
    private String user;

    /**
     * @parameter
     */
    private String tarLongFileMode;

    public Boolean exportTargetDir() {
        return
            exportBasedir != null ? exportBasedir :
                (exportTargetDir != null ? exportTargetDir : Boolean.TRUE);
    }

    /**
     * @parameter default-value="keep"
     */
    private PermissionMode permissions;

    public String getTargetDir() {
        return
            basedir != null ? basedir :
                (targetDir != null ? targetDir : DEFAULT_BASE_DIR);
    }

    public Assembly getInline() {
        return inline;
    }

    public String getDescriptor() {
        return descriptor;
    }

    public String getDescriptorRef() {
        return descriptorRef;
    }

    public String getDockerFileDir() {
        return dockerFileDir;
    }

    public String getUser() {
        return user;
    }

    public AssemblyMode getMode() {
        return mode != null ? mode : AssemblyMode.dir;
    }

    public String getTarLongFileMode() {
        return tarLongFileMode;
    }

    public Boolean isIgnorePermissions() {
        // New permission mode has precedence
        if (permissions != null) {
            return permissions == PermissionMode.ignore;
        }
        return (ignorePermissions != null) ? ignorePermissions : Boolean.FALSE;
    }

    public PermissionMode getPermissions() {
        return permissions != null ? permissions : PermissionMode.keep;
    }

    public static class Builder {

        private final AssemblyConfiguration config = new AssemblyConfiguration();
        private boolean isEmpty = true;

        public AssemblyConfiguration build() {
            return isEmpty ? null : config;
        }

        public Builder basedir(String baseDir) {
            config.basedir = set(baseDir);
            return this;
        }

        public Builder assemblyDef(Assembly descriptor) {
            config.inline = set(descriptor);
            return this;
        }

        public Builder descriptor(String descriptorFile) {
            config.descriptor = set(descriptorFile);
            return this;
        }

        public Builder descriptorRef(String descriptorRef) {
            config.descriptorRef = set(descriptorRef);
            return this;
        }

        public Builder dockerFileDir(String dockerFileDir) {
            config.dockerFileDir = set(dockerFileDir);
            return this;
        }

        public Builder exportBasedir(Boolean export) {
            config.exportBasedir = set(export);
            return this;
        }

        @Deprecated
        public Builder ignorePermissions(Boolean ignorePermissions) {
            config.ignorePermissions = set(ignorePermissions);
            return this;
        }

        public Builder permissions(String permissions) {
            if (permissions != null) {
                config.permissions = PermissionMode.valueOf(permissions.toLowerCase());
            }
            return this;
        }

        public Builder user(String user) {
            config.user = set(user);
            return this;
        }

        public Builder mode(String mode) {
            if (mode != null) {
                config.mode = AssemblyMode.valueOf(mode.toLowerCase());
                isEmpty = false;
            }
            return this;
        }

        public Builder tarLongFileMode(String tarLongFileMode) {
            config.tarLongFileMode = set(tarLongFileMode);
            return this;
        }

         private <T> T set(T prop) {
            if (prop != null) {
                isEmpty = false;
            }
            return prop;
        }
    }

    public enum PermissionMode {

        /**
         * Auto detect permission mode
         */
        auto,

        /**
         * Make everything executable
         */
        exec,

        /**
         * Leave all as it is
         */
        keep,

        /**
         * Ignore permission when using an assembly mode of "dir"
         */
        ignore
        }
}
<commit_msg>Minor update of getTargetDir<commit_after>package io.fabric8.maven.docker.config;


import java.io.Serializable;

import org.apache.maven.plugin.assembly.model.Assembly;
import org.apache.maven.plugins.annotations.Parameter;

public class AssemblyConfiguration implements Serializable {

    private static final String DEFAULT_BASE_DIR = "/maven";

    /**
     * @parameter
     */
    @Deprecated
    private String basedir;

    /**
     * New replacement for base directory which better reflects its
     * purpose
     */
    private String targetDir;

    /**
     * @parameter
     */
    private String descriptor;

    /**
     * @parameter
     */
    private Assembly inline;

    /**
     * @parameter
     */
    private String descriptorRef;

    /**
     * @parameter
     * @deprecated Use {@link BuildImageConfiguration#dockerFileDir} instead
     */
    private String dockerFileDir;

    @Deprecated
    private Boolean exportBasedir;

    /**
     * Whether the target directory should be
     * exported.
     *
     */
    @Parameter
    private Boolean exportTargetDir;

    /**
     * @paramter default-value="false"
     * @deprecated use permissionMode == ignore instead.
     */
    private Boolean ignorePermissions;

    /**
     * @parameter
     */
    private AssemblyMode mode;

    /**
     * @parameter
     */
    private String user;

    /**
     * @parameter
     */
    private String tarLongFileMode;

    public Boolean exportTargetDir() {
        if (exportTargetDir != null) {
            return exportTargetDir;
        } else if (exportBasedir != null) {
            return exportBasedir;
        } else {
            return Boolean.TRUE;
        }
    }

    public String getTargetDir() {
        if (targetDir != null) {
            return targetDir;
        } else if (basedir != null) {
            return basedir;
        } else {
            return DEFAULT_BASE_DIR;
        }
    }

    /**
     * @parameter default-value="keep"
     */
    private PermissionMode permissions;

    public Assembly getInline() {
        return inline;
    }

    public String getDescriptor() {
        return descriptor;
    }

    public String getDescriptorRef() {
        return descriptorRef;
    }

    public String getDockerFileDir() {
        return dockerFileDir;
    }

    public String getUser() {
        return user;
    }

    public AssemblyMode getMode() {
        return mode != null ? mode : AssemblyMode.dir;
    }

    public String getTarLongFileMode() {
        return tarLongFileMode;
    }

    public Boolean isIgnorePermissions() {
        // New permission mode has precedence
        if (permissions != null) {
            return permissions == PermissionMode.ignore;
        }
        return (ignorePermissions != null) ? ignorePermissions : Boolean.FALSE;
    }

    public PermissionMode getPermissions() {
        return permissions != null ? permissions : PermissionMode.keep;
    }

    public static class Builder {

        private final AssemblyConfiguration config = new AssemblyConfiguration();
        private boolean isEmpty = true;

        public AssemblyConfiguration build() {
            return isEmpty ? null : config;
        }

        public Builder basedir(String baseDir) {
            config.basedir = set(baseDir);
            return this;
        }

        public Builder assemblyDef(Assembly descriptor) {
            config.inline = set(descriptor);
            return this;
        }

        public Builder descriptor(String descriptorFile) {
            config.descriptor = set(descriptorFile);
            return this;
        }

        public Builder descriptorRef(String descriptorRef) {
            config.descriptorRef = set(descriptorRef);
            return this;
        }

        public Builder dockerFileDir(String dockerFileDir) {
            config.dockerFileDir = set(dockerFileDir);
            return this;
        }

        public Builder exportBasedir(Boolean export) {
            config.exportBasedir = set(export);
            return this;
        }

        @Deprecated
        public Builder ignorePermissions(Boolean ignorePermissions) {
            config.ignorePermissions = set(ignorePermissions);
            return this;
        }

        public Builder permissions(String permissions) {
            if (permissions != null) {
                config.permissions = PermissionMode.valueOf(permissions.toLowerCase());
            }
            return this;
        }

        public Builder user(String user) {
            config.user = set(user);
            return this;
        }

        public Builder mode(String mode) {
            if (mode != null) {
                config.mode = AssemblyMode.valueOf(mode.toLowerCase());
                isEmpty = false;
            }
            return this;
        }

        public Builder tarLongFileMode(String tarLongFileMode) {
            config.tarLongFileMode = set(tarLongFileMode);
            return this;
        }

         private <T> T set(T prop) {
            if (prop != null) {
                isEmpty = false;
            }
            return prop;
        }
    }

    public enum PermissionMode {

        /**
         * Auto detect permission mode
         */
        auto,

        /**
         * Make everything executable
         */
        exec,

        /**
         * Leave all as it is
         */
        keep,

        /**
         * Ignore permission when using an assembly mode of "dir"
         */
        ignore
        }
}

{'fraction_non_alphanumeric': 0.08369196959985349, 'fraction_numerical': 0.0001831334126911455, 'mean_word_length': 1.7428427925665495, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6001600', 'n_tokens_mistral': 2743, 'n_tokens_neox': 2618, 'n_words': 705}