code: @Override
    public boolean addFlowEdge(FlowEdge edge) {
      try {
        rwLock.writeLock().lock();
        String srcNode = edge.getSrc();
        String dstNode = edge.getDest();
        if (!dataNodeMap.containsKey(srcNode) || !dataNodeMap.containsKey(dstNode)) {
          return false;
        }
        DataNode dataNode = getNode(srcNode);
        if (dataNode == null) {
          return false;
        }
        Set<FlowEdge> adjacentEdges = this.nodesToEdges.get(dataNode);
        if (!adjacentEdges.add(edge)) {
          adjacentEdges.remove(edge);
          adjacentEdges.add(edge);
        }
        this.nodesToEdges.put(dataNode, adjacentEdges);
        String edgeId = edge.getId();
        this.flowEdgeMap.put(edgeId, edge);
        return true;
      } finally {
        rwLock.writeLock().unlock();
      }
    }
docs: Add a {@link FlowEdge} to the {@link FlowGraph}. Addition of edge succeeds only if both the end points of the
  edge are already nodes in the FlowGraph. If a {@link FlowEdge} already exists, the old FlowEdge is removed and
  the new one added in its place.
  @param edge
  @return true if addition of {@FlowEdge} is successful.