<commit_before>package org.metaborg.spoofax.generator.project;

import java.io.File;

public class ProjectSettings {
    
    public enum Format {
        ctree,
        jar
    }

    private final String name;
    private final File basedir;

    public ProjectSettings(String name, File basedir) throws ProjectException {
        if ( !NameUtil.isValidName(name) ) {
            throw new ProjectException("Invalid name: "+name);
        }
        this.name = name;
        this.basedir = basedir;
    }

    public String name() {
        return name;
    }

    public File getBaseDir() {
        return basedir;
    }

    ////////////////////////////////////////////////////////////////

    private String id;

    public String id() {
        return id != null && !id.isEmpty() ?
                id : name().toLowerCase();
    }

    public void setId(String id) throws ProjectException {
        if ( !NameUtil.isValidId(id) ) {
            throw new ProjectException("Invalid id: "+id);
        }
        this.id = id;
    }

    ////////////////////////////////////////////////////////////////

    private Format format;

    public Format format() {
        return format != null ?
                format : Format.ctree;
    }

    public void setFormat(Format format) {
        this.format = format;
    }

    ////////////////////////////////////////////////////////////////

    public String strategoName() {
        return NameUtil.toJavaId(name().toLowerCase());
    }

    public String packageName() {
        return NameUtil.toJavaId(id());
    }

    public String packagePath() {
        return packageName().replace('.', '/');
    }

    ////////////////////////////////////////////////////////////////

    public File getGeneratedSourceDirectory() {
        return new File(basedir, "src-gen");
    }

    public File getOutputDirectory() {
        return new File(basedir, "include");
    }

    public File getIconsDirectory() {
        return new File(basedir, "icons");
    }

    public File getLibDirectory() {
        return new File(basedir, "lib");
    }

    public File getSyntaxDirectory() {
        return new File(basedir, "syntax");
    }

    public File getEditorDirectory() {
        return new File(basedir, "editor");
    }

    public File getEditorJavaDirectory() {
        return new File(getEditorDirectory(), "java");
    }

    public File getJavaTransDirectory() {
        return new File(getEditorJavaDirectory(), "trans");
    }

    public File getGeneratedSyntaxDirectory() {
        return new File(getGeneratedSourceDirectory(), "syntax");
    }

    public File getTransDirectory() {
        return new File(basedir, "trans");
    }

    public File getCacheDirectory() {
        return new File(basedir, ".cache");
    }

}
<commit_msg>Cleaner method name.<commit_after>package org.metaborg.spoofax.generator.project;

import java.io.File;

public class ProjectSettings {
    
    public enum Format {
        ctree,
        jar
    }

    private final String name;
    private final File basedir;

    public ProjectSettings(String name, File basedir) throws ProjectException {
        if ( !NameUtil.isValidName(name) ) {
            throw new ProjectException("Invalid name: "+name);
        }
        this.name = name;
        this.basedir = basedir;
    }

    public String name() {
        return name;
    }

    public File getBaseDir() {
        return basedir;
    }

    ////////////////////////////////////////////////////////////////

    private String id;

    public String id() {
        return id != null && !id.isEmpty() ?
                id : name().toLowerCase();
    }

    public void setId(String id) throws ProjectException {
        if ( !NameUtil.isValidId(id) ) {
            throw new ProjectException("Invalid id: "+id);
        }
        this.id = id;
    }

    ////////////////////////////////////////////////////////////////

    private Format format;

    public Format format() {
        return format != null ?
                format : Format.ctree;
    }

    public void setFormat(Format format) {
        this.format = format;
    }

    ////////////////////////////////////////////////////////////////

    public String strategoName() {
        return NameUtil.toJavaId(name().toLowerCase());
    }

    public String packageName() {
        return NameUtil.toJavaId(id());
    }

    public String packagePath() {
        return packageName().replace('.', '/');
    }

    ////////////////////////////////////////////////////////////////

    public File getGeneratedSourceDirectory() {
        return new File(basedir, "src-gen");
    }

    public File getOutputDirectory() {
        return new File(basedir, "include");
    }

    public File getIconsDirectory() {
        return new File(basedir, "icons");
    }

    public File getLibDirectory() {
        return new File(basedir, "lib");
    }

    public File getSyntaxDirectory() {
        return new File(basedir, "syntax");
    }

    public File getEditorDirectory() {
        return new File(basedir, "editor");
    }

    public File getJavaDirectory() {
        return new File(getEditorDirectory(), "java");
    }

    public File getJavaTransDirectory() {
        return new File(getJavaDirectory(), "trans");
    }

    public File getGeneratedSyntaxDirectory() {
        return new File(getGeneratedSourceDirectory(), "syntax");
    }

    public File getTransDirectory() {
        return new File(basedir, "trans");
    }

    public File getCacheDirectory() {
        return new File(basedir, ".cache");
    }

}

{'fraction_non_alphanumeric': 0.18934382263543714, 'fraction_numerical': 0.0, 'mean_word_length': 1.6411709159584513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2898837', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1383, 'n_words': 370}