public void addToPAG(Context varNodeParameter){
  if (!hasBeenBuilt)   throw new RuntimeException();
  if (varNodeParameter == null) {
    if (hasBeenAdded)     return;
    hasBeenAdded=true;
  }
 else {
    if (addedContexts == null)     addedContexts=new HashSet<Context>();
    if (!addedContexts.add(varNodeParameter))     return;
  }
  QueueReader<Node> reader=internalReader.clone();
  while (reader.hasNext()) {
    Node src=(Node)reader.next();
    src=parameterize(src,varNodeParameter);
    Node dst=(Node)reader.next();
    dst=parameterize(dst,varNodeParameter);
    pag.addEdge(src,dst);
  }
  reader=inReader.clone();
  while (reader.hasNext()) {
    Node src=(Node)reader.next();
    Node dst=(Node)reader.next();
    dst=parameterize(dst,varNodeParameter);
    pag.addEdge(src,dst);
  }
  reader=outReader.clone();
  while (reader.hasNext()) {
    Node src=(Node)reader.next();
    src=parameterize(src,varNodeParameter);
    Node dst=(Node)reader.next();
    pag.addEdge(src,dst);
  }
}

public void addToPAG ( Context varNodeParameter ) { if ( ! hasBeenBuilt ) throw new RuntimeException ( ) ; if ( varNodeParameter == null ) { if ( hasBeenAdded ) return ; hasBeenAdded = true ; } else { if ( addedContexts == null ) addedContexts = new HashSet < Context > ( ) ; if ( ! addedContexts . add ( varNodeParameter ) ) return ; } QueueReader < Node > reader = internalReader . clone ( ) ; while ( reader . hasNext ( ) ) { Node src = ( Node ) reader . next ( ) ; src = parameterize ( src , varNodeParameter ) ; Node dst = ( Node ) reader . next ( ) ; dst = parameterize ( dst , varNodeParameter ) ; pag . addEdge ( src , dst ) ; } reader = inReader . clone ( ) ; while ( reader . hasNext ( ) ) { Node src = ( Node ) reader . next ( ) ; Node dst = ( Node ) reader . next ( ) ; dst = parameterize ( dst , varNodeParameter ) ; pag . addEdge ( src , dst ) ; } reader = outReader . clone ( ) ; while ( reader . hasNext ( ) ) { Node src = ( Node ) reader . next ( ) ; src = parameterize ( src , varNodeParameter ) ; Node dst = ( Node ) reader . next ( ) ; pag . addEdge ( src , dst ) ; } }
adds this method to the main pag , with all varnodes parameterized by varnodeparameter .
