private void scan(CallGraphNode node) throws CFGBuilderException {
  Method method=node.getMethod();
  CFG cfg=classContext.getCFG(method);
  if (method.isSynchronized()) {
    hasSynchronization=true;
  }
  Iterator<BasicBlock> i=cfg.blockIterator();
  while (i.hasNext()) {
    BasicBlock block=i.next();
    Iterator<InstructionHandle> j=block.instructionIterator();
    while (j.hasNext()) {
      InstructionHandle handle=j.next();
      Instruction ins=handle.getInstruction();
      if (ins instanceof InvokeInstruction) {
        InvokeInstruction inv=(InvokeInstruction)ins;
        Method called=isSelfCall(inv);
        if (called != null) {
          CallSite callSite=new CallSite(method,block,handle);
          callGraph.createEdge(node,callGraph.getNodeForMethod(called),callSite);
          calledMethodSet.add(called);
        }
      }
 else       if (ins instanceof MONITORENTER || ins instanceof MONITOREXIT) {
        hasSynchronization=true;
      }
    }
  }
}

private void scan ( CallGraphNode node ) throws CFGBuilderException { Method method = node . getMethod ( ) ; CFG cfg = classContext . getCFG ( method ) ; if ( method . isSynchronized ( ) ) { hasSynchronization = true ; } Iterator < BasicBlock > i = cfg . blockIterator ( ) ; while ( i . hasNext ( ) ) { BasicBlock block = i . next ( ) ; Iterator < InstructionHandle > j = block . instructionIterator ( ) ; while ( j . hasNext ( ) ) { InstructionHandle handle = j . next ( ) ; Instruction ins = handle . getInstruction ( ) ; if ( ins instanceof InvokeInstruction ) { InvokeInstruction inv = ( InvokeInstruction ) ins ; Method called = isSelfCall ( inv ) ; if ( called != null ) { CallSite callSite = new CallSite ( method , block , handle ) ; callGraph . createEdge ( node , callGraph . getNodeForMethod ( called ) , callSite ) ; calledMethodSet . add ( called ) ; } } else if ( ins instanceof MONITORENTER || ins instanceof MONITOREXIT ) { hasSynchronization = true ; } } } }
scan a method for self call sites .
