@Override
    public Object clone() {
        if (!isTxMode) {
            // shallow copy for non-tx mode
            final TinkerEdge edge = new TinkerEdge(id, outVertex, label, inVertex, currentVersion);
            edge.properties = properties;
            return edge;
        }

        final TinkerEdge edge = new TinkerEdge(id, graph, outVertexId, label, inVertexId, currentVersion, true);

        if (properties != null) {
            final Map<String, Property> cloned = new ConcurrentHashMap<>(properties.size());
            properties.entrySet().stream().forEach(p -> cloned.put(p.getKey(), ((TinkerProperty) p.getValue()).copy(edge)));

            edge.properties = cloned;
        }

        return edge;
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerEdge.java