public boolean addEdge(Edge e){
  if (!edges.add(e))   return false;
  stream.add(e);
  Edge position=null;
  position=srcUnitToEdge.get(e.srcUnit());
  if (position == null) {
    srcUnitToEdge.put(e.srcUnit(),e);
    position=dummy;
  }
  e.insertAfterByUnit(position);
  position=srcMethodToEdge.get(e.getSrc());
  if (position == null) {
    srcMethodToEdge.put(e.getSrc(),e);
    position=dummy;
  }
  e.insertAfterBySrc(position);
  position=tgtToEdge.get(e.getTgt());
  if (position == null) {
    tgtToEdge.put(e.getTgt(),e);
    position=dummy;
  }
  e.insertAfterByTgt(position);
  return true;
}

public boolean addEdge ( Edge e ) { if ( ! edges . add ( e ) ) return false ; stream . add ( e ) ; Edge position = null ; position = srcUnitToEdge . get ( e . srcUnit ( ) ) ; if ( position == null ) { srcUnitToEdge . put ( e . srcUnit ( ) , e ) ; position = dummy ; } e . insertAfterByUnit ( position ) ; position = srcMethodToEdge . get ( e . getSrc ( ) ) ; if ( position == null ) { srcMethodToEdge . put ( e . getSrc ( ) , e ) ; position = dummy ; } e . insertAfterBySrc ( position ) ; position = tgtToEdge . get ( e . getTgt ( ) ) ; if ( position == null ) { tgtToEdge . put ( e . getTgt ( ) , e ) ; position = dummy ; } e . insertAfterByTgt ( position ) ; return true ; }
used to add an edge to the call graph . returns true iff the edge was not already present .
