class Node {

        private Id[] parents;
        private int pathCount;
        private final int distance;

        public Node(Node parentNode) {
            this(0, parentNode.distance + 1);
        }

        public Node(int pathCount, int distance) {
            this.pathCount = pathCount;
            this.distance = distance;
            this.parents = new Id[0];
        }

        public int distance() {
            return this.distance;
        }

        public Id[] parents() {
            return this.parents;
        }

        public void addParent(Id parentId) {<FILL_FUNCTION_BODY>}

        public void addParentNode(Node node, Id parentId) {
            this.pathCount += node.pathCount;
            this.addParent(parentId);
        }

        protected int pathCount() {
            return this.pathCount;
        }
    }

            // TODO: test if need to allocate more memory in advance
            Id[] newParents = new Id[this.parents.length + 1];
            System.arraycopy(this.parents, 0, newParents, 0,
                             this.parents.length);
            newParents[newParents.length - 1] = parentId;
            this.parents = newParents;
        
<methods>public void <init>(UserJob<java.lang.Object>) ,public void close() ,public org.apache.hugegraph.backend.id.Id jobId() ,public void updateProgress(long) <variables>protected final non-sealed java.util.concurrent.ExecutorService executor,private final non-sealed UserJob<java.lang.Object> job,protected long progress