public default boolean popEquals(final Pop pop, final Object other) {
        if (!(other instanceof Path))
            return false;
        final Path otherPath = (Path) other;
        return this.labels().stream().
                flatMap(Set::stream).
                noneMatch(label -> {
                    if (!otherPath.hasLabel(label)) return true;
                    final Object o1 = otherPath.get(pop, label);
                    final Object o2 = this.get(pop, label);
                    return !((null == o1 && null == o2) || (o1 != null && o1.equals(o2)));
                });
    }
Determines whether the path is a simple or not. A simple path has no cycles and thus, no repeated objects.

@return Whether the path is simple or not
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Path.java