<commit_before>package jp.gr.java_conf.neko_daisuki.fsyscall.util;

import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;

public class NormalizedPath {

    public static class InvalidPathException extends Exception {

        public InvalidPathException(String message, String path) {
            super(String.format("%s: %s", message, path));
        }
    }

    private static final String SEPARATOR = "/";

    private String mPath;

    public NormalizedPath(NormalizedPath parent, String path) {
        if (path == null) {
            throw new NullPointerException("null given as path");
        }
        boolean isAbsolute = path.startsWith(SEPARATOR);
        String s = isAbsolute ? path
                              : String.format("%s%s%s",
                parent.toString(),
                SEPARATOR, path);
        mPath = normalize(s);
    }

    public NormalizedPath(String path) throws InvalidPathException {
        if (path == null) {
            throw new NullPointerException("null given as path");
        }
        if (path.startsWith(SEPARATOR)) {
            throw new InvalidPathException("path must be absolute", path);
        }
        mPath = normalize(path);
    }

    @Override
    public boolean equals(Object o) {
        NormalizedPath path;
        try {
            path = (NormalizedPath) o;
        }
        catch (ClassCastException unused) {
            return false;<commit_msg>Fixed the coding style.<commit_after>package jp.gr.java_conf.neko_daisuki.fsyscall.util;

import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;

public class NormalizedPath {

    public static class InvalidPathException extends Exception {

        public InvalidPathException(String message, String path) {
            super(String.format("%s: %s", message, path));
        }
    }

    private static final String SEPARATOR = "/";

    private String mPath;

    public NormalizedPath(NormalizedPath parent, String path) {
        if (path == null) {
            throw new NullPointerException("null given as path");
        }
        boolean isAbsolute = path.startsWith(SEPARATOR);
        String s = isAbsolute ? path : String.format("%s%s%s",
                                                     parent.toString(),
                                                     SEPARATOR,
                                                     path);
        mPath = normalize(s);
    }

    public NormalizedPath(String path) throws InvalidPathException {
        if (path == null) {
            throw new NullPointerException("null given as path");
        }
        if (path.startsWith(SEPARATOR)) {
            throw new InvalidPathException("path must be absolute", path);
        }
        mPath = normalize(path);
    }

    @Override
    public boolean equals(Object o) {
        NormalizedPath path;
        try {
            path = (NormalizedPath) o;
        }
        catch (ClassCastException unused) {
            return false;
{'fraction_non_alphanumeric': 0.08905685179099573, 'fraction_numerical': 0.0, 'mean_word_length': 1.9843137254901961, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6819702', 'n_tokens_mistral': 778, 'n_tokens_neox': 756, 'n_words': 206}