@Override
	public AttributedEdge addEdge(AttributedVertex source, AttributedVertex target) {
		ensureInGraph(source);
		ensureInGraph(target);

		if (collapseDuplicateEdges) {
			AttributedEdge edge = getEdge(source, target);
			if (edge != null) {
				incrementWeightProperty(edge);
				return edge;
			}
		}
		return super.addEdge(source, target);
	}
Creates and adds a new directed edge between the given source and
target vertices. If the graph is set to collapse duplicate edges and an edge for that
source and target exists, then the existing edge will be return with its "Weight" attribute
set to the total number of edges that have been added between the source and target vertices.

@param source the source vertex of the directed edge to be created.
@param target the target vertex of the directed edge to be created.
@return a new edge between the source and target if it is the first one or the graph is
not collapsing edges.  Otherwise, an existing edge with its "Weight" attribute set accordingly.
Ghidra/Framework/Graph/src/main/java/ghidra/service/graph/AttributedGraph.java