<commit_before>package com.tinkerpop.gremlin.structure.util.detached;

import com.tinkerpop.gremlin.process.Path;
import com.tinkerpop.gremlin.structure.Edge;
import com.tinkerpop.gremlin.structure.Graph;
import com.tinkerpop.gremlin.structure.Property;
import com.tinkerpop.gremlin.structure.Vertex;

/**
 * @author <NAME> (http://markorodriguez.com)
 */
public class DetachedPath extends Path {

    public DetachedPath() {

    }

    private DetachedPath(final Path path) {
        path.forEach((as, object) -> {
            if (object instanceof DetachedElement || object instanceof DetachedProperty) {
                this.add(as, object);
            } else if (object instanceof Vertex) {
                this.add(as, DetachedVertex.detach((Vertex) object));
            } else if (object instanceof Edge) {
                this.add(as, DetachedEdge.detach((Edge) object));
            } else if (object instanceof Property) {
                this.add(as, DetachedProperty.detach((Property) object));
            } else {
                this.add(as, object);
            }
        });
    }

    public Path attach(final Graph graph) {
        final Path path = new Path();
        this.forEach((as, object) -> {
            if (object instanceof DetachedVertex) {
                path.add(as, ((DetachedVertex) object).attach(graph));
            } else if (object instanceof DetachedEdge) {
                path.add(as, ((DetachedEdge) object).attach(graph));
            } else if (object instanceof DetachedProperty) {
                path.add(as, ((DetachedProperty) object).attach(graph));
            } else {
                path.add(as, object);
            }
        });
        return path;
    }

    public static DetachedPath detach(final Path path) {
        return new DetachedPath(path);
    }
}<commit_msg>Add DetachedMetaProperty procesing to DetachedPath<commit_after>package com.tinkerpop.gremlin.structure.util.detached;

import com.tinkerpop.gremlin.process.Path;
import com.tinkerpop.gremlin.structure.Edge;
import com.tinkerpop.gremlin.structure.Graph;
import com.tinkerpop.gremlin.structure.MetaProperty;
import com.tinkerpop.gremlin.structure.Property;
import com.tinkerpop.gremlin.structure.Vertex;

/**
 * @author <NAME> (http://markorodriguez.com)
 */
public class DetachedPath extends Path {

    public DetachedPath() {

    }

    private DetachedPath(final Path path) {
        path.forEach((as, object) -> {
            if (object instanceof DetachedElement || object instanceof DetachedProperty) {
                this.add(as, object);
            } else if (object instanceof Vertex) {
                this.add(as, DetachedVertex.detach((Vertex) object));
            } else if (object instanceof Edge) {
                this.add(as, DetachedEdge.detach((Edge) object));
            } else if (object instanceof MetaProperty) {
                this.add(as, DetachedMetaProperty.detach((MetaProperty) object));
            } else if (object instanceof Property) {
                this.add(as, DetachedProperty.detach((Property) object));
            } else {
                this.add(as, object);
            }
        });
    }

    public Path attach(final Graph graph) {
        final Path path = new Path();
        this.forEach((as, object) -> {
            if (object instanceof DetachedVertex) {
                path.add(as, ((DetachedVertex) object).attach(graph));
            } else if (object instanceof DetachedEdge) {
                path.add(as, ((DetachedEdge) object).attach(graph));
            } else if (object instanceof DetachedMetaProperty) {
                path.add(as, ((DetachedMetaProperty) object).attach(graph));
            } else if (object instanceof DetachedProperty) {
                path.add(as, ((DetachedProperty) object).attach(graph));
            } else {
                path.add(as, object);
            }
        });
        return path;
    }

    public static DetachedPath detach(final Path path) {
        return new DetachedPath(path);
    }
}
{'fraction_non_alphanumeric': 0.11369829081000743, 'fraction_numerical': 0.0, 'mean_word_length': 2.2643492320129344, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '6039125', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1080, 'n_words': 248}