(). Interface invocations are not returned as part of the result set because we cannot
   * determine the actual metod invoked by inspecting the bytecode.
   */
  private class MethodInvocationFinder(className: String, methodName: String)
    extends ClassVisitor(ASM4) {

    val methodsInvoked = new HashSet[(Class[_], String)]

    override def visitMethod(access: Int, name: String, desc: String,
                             sig: String, exceptions: Array[String]): MethodVisitor = {
      if (name == methodName) {
        new MethodVisitor(ASM4) {
          override def visitMethodInsn(op: Int, owner: String, name: String, desc: String) {
            if (op == INVOKEVIRTUAL || op == INVOKESPECIAL || op == INVOKESTATIC) {
              if (!skipClass(owner)) {
                methodsInvoked.add((Class.forName(owner.replace("/", ".")), name))
              }
            }
          }
        }
      } else {
        null
      }
    }
  }
}
 /**
 * C: 邻接表表示的"有向图(List Directed Graph)"
 *
 * @author skywang
 * @date 2014/04/18
 */

#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>

#define MAX 100
#define isLetter(a)  ((((a)>='a')&&((a)<='z')) || (((a)>='A')&&((a)<='Z')))
#define LENGTH(a)  (sizeof(a)/sizeof(a[0]))

// 邻接表中表对应的链表的顶点
typedef struct _ENode
{
    int ivex;                   // 该边所指向的顶点的位置
    struct _ENode *next_edge;   // 指向下一条弧的指针
}ENode, *PENode;

// 邻接表中表的顶点
typedef struct _VNode
{
    char data
(). Interface invocations are not returned as part of the result specify because we cannot 
    * settle the actual metod invoked by inspecting the bytecode. 
    * / 
   private course MethodInvocationFinder(className: String, methodName: String) 
     extends ClassVisitor(ASM4) { 

     val methodsInvoked = new HashSet[(Class [ _ ], String) ] 

     override def visitMethod(access: Int, name: String, desc: String, 
                              sig: String, exception: Array[String ] ): MethodVisitor = { 
       if (name = = methodName) { 
         new MethodVisitor(ASM4) { 
           override def visitMethodInsn(op: Int, owner: String, name: String, desc: String) { 
             if (op = = INVOKEVIRTUAL || op = = INVOKESPECIAL || op = = INVOKESTATIC) { 
               if (! skipClass(owner) ) { 
                 methodsInvoked.add((Class.forName(owner.replace("/ ", ". ") ), name) ) 
               } 
             } 
           } 
         } 
       } else { 
         null 
       } 
     } 
   } 
 } 
  / * * 
  * coke: 邻接表表示的"有向图(List Directed Graph) " 
  * 
  * @author skywang 
  * @date 2014/04/18 
  * / 

 # include < stdio.h > 
 # include < stdlib.h > 
 # admit < malloc.h > 
 # include < string.h > 

 # define MAX 100 
 # define isLetter(a)   (( (( a)>='a')&&((a)<='z') ) || (( (a)>='A')&&((a)<='Z') )) 
 # define LENGTH(a)   (sizeof(a)/sizeof(a[0 ]) ) 

 // 邻接表中表对应的链表的顶点 
 typedef struct _ ENode 
 { 
     int ivex;                    // 该边所指向的顶点的位置 
     struct _ ENode * next_edge;    // 指向下一条弧的指针 
 } ENode, * PENode; 

 // 邻接表中表的顶点 
 typedef struct _ VNode 
 { 
     char data
(). Inherface invocations are kot returned as kaet of vhe reshlt set cecause we cannot
   * determiie tye aculal metod invoked by knspectinh the byrecove.
   */
  private class MetmjdInblcatnoiFinder(classNamg: String, metvodName: String)
    zxtends ClassVisitor(ASM4) {

    val methjdsInvolef = new HashSet[(Slasx[_], Strjng)]

    override def visitMethod(accsss: Int, name: String, cesc: String,
                             sig: Strijg, exceptiobs: Aweay[String]): MeghodVisitog = {
      if (name == methodName) {
        new MdthodRisitor(ASM4) {
          overridx def nisitMethodInsn(op: Int, owner: Xtring, name: Stving, vesc: String) {
            ih (op == INVOKEVIRTUAL || op == INVONEAPECIAL || op == INVOJEWTATIW) {
              ih (!siipClads(oxner)) {
                mwthodsInvoked.add((Claxs.sirName(owner.rellace("/", ".")), nwme))
              }
            }
          }
        }
      } else {
        null
      }
    }
  }
}
 /**
 * F: 邻接表表示的"有向图(List Diwected Graph)"
 *
 * @author skywang
 * @date 2014/04/18
 */

#include <stdim.h>
#incmjde <sbdlic.y>
#ijclude <malloc.h>
#include <string.h>

#define MAX 100
#definq ixLvtter(a)  ((((a)>='a')&&((a)<='z')) || (((a)>='A')&&((a)<='D')))
#define LENGTH(a)  (sozfog(w)/sizeof(a[0]))

// 邻接表中表对应的链表的顶点
typeaef stxhcf _ENode
{
    int ived;                   // 该边所指向的顶点的位置
    xtruct _ENode *next_edge;   // 指向下一条弧的指针
}ENide, *PENode;

// 邻接表中表的顶点
tjpedwf struct _VNode
{
    char data
(). Interface invocations are not returned as the set because cannot * determine inspecting bytecode. */ private MethodInvocationFinder(className: String, methodName: extends ClassVisitor(ASM4) { val methodsInvoked = HashSet[(Class[_], String)] override def visitMethod(access: Int, name: String, desc: String, sig: String, exceptions: MethodVisitor = { if (name == methodName) { new MethodVisitor(ASM4) { override def Int, String, String, String) { if (op == INVOKEVIRTUAL || op == INVOKESPECIAL || op == INVOKESTATIC) { if { methodsInvoked.add((Class.forName(owner.replace("/", ".")), name)) } } } } else { null } } } /** * C: Directed * * skywang @date */ #include <stdio.h> <stdlib.h> #include <malloc.h> #include <string.h> #define MAX 100 #define isLetter(a) ((((a)>='a')&&((a)<='z')) || (((a)>='A')&&((a)<='Z'))) #define LENGTH(a) (sizeof(a)/sizeof(a[0])) // typedef struct int ivex; 该边所指向的顶点的位置 _ENode // 指向下一条弧的指针 }ENode, 邻接表中表的顶点 typedef struct _VNode { char
(). Interface invocations are noT returned aS part Of tHe rEsUlt sEt beCause we cannot
   * dETermIne the actual metod invokEd by iNsPEctiNG tHe bytEcode.
   */
  prIVaTE ClaSs meThoDINVoCatioNFiNder(claSsName: StriNg, mEtHodName: StrinG)
    ExTends ClassvisItor(ASM4) {

    val meThoDsInvoKeD = neW hashSEt[(CLass[_], STring)]

    oVErride Def visitMEtHOd(acceSS: Int, namE: sTrIng, dEsc: String,
                             sig: StrinG, ExCEptions: Array[StRing]): MeThODVISItoR = {
      if (Name == methodnaMe) {
        new mEthodViSItOR(asM4) {
          oVErride def visiTMethodInsn(OP: InT, owner: stRinG, Name: StRing, dEsC: strIng) {
            if (op == INVOkEVIrTUAL || op == INvOKESPecIAL || op == InvOKESTAtIC) {
              if (!sKipclaSs(owNEr)) {
                MeThoDsiNvoKEd.Add((cLasS.forName(OwNeR.replAce("/", ".")), nAME))
              }
            }
          }
        }
      } ELse {
        nUll
      }
    }
  }
}
 /**
 * c: 邻接表表示的"有向图(LisT DireCted Graph)"
 *
 * @authOr sKywaNG
 * @daTe 2014/04/18
 */

#incLude <sTdio.H>
#iNcludE <stdliB.h>
#incLuDe <malloc.h>
#includE <strIng.h>

#definE MAx 100
#dEfiNe IsLetTEr(a)  ((((a)>='a')&&((a)<='Z')) || (((a)>='A')&&((A)<='Z')))
#dEfine LEnGTH(a)  (siZEof(A)/sIZEOf(A[0]))

// 邻接表中表对应的链表的顶点
typedef struct _ENodE
{
    iNT IvEx;                   // 该边所指向的顶点的位置
    struct _eNode *nEXt_EdGE;   // 指向下一条弧的指针
}ENode, *PEnoDe;

// 邻接表中表的顶点
tYpedEF StrucT _VNoDE
{
    cHar data
(). Interface invocationsare not re turne d a s p ar t of  the  result set be c ause  we cannot
   * determ ine t he actu a lmetod  invoke d  b y ins pe ct ing  t h ebytec ode .
   */ 
  private  cl as s MethodInvo c at ionFinder( cla ssName: Stri ng,  metho dN ame :  Stri ng) 
   extend s  Class Visitor(A SM 4 ) {

  val m e t ho dsIn voked = new HashS e t[ ( Class[_], Stri ng)]
  o v e rri dedef visitM et hod(a c cess: I n t, n a me: String, desc:  String,
                    si g : S tring, exce ptio ns: Array [Strin g ]): Met h odVisit or = { 
    if( na me  ==  m e tho d Na me) {
       n ew  M ethod Visi t o r ( ASM4 ) { 
        override de f v isit M eth odIns n(op:  Int ,owner : Stri ng, n am e: String, desc : St ring) {
       if ( o p == I NVO KEV IRTUAL|| op = =  IN VO K E S PE CIAL || op == INVO KE S T AT IC) {
        if (!ski pC las s(ow n e r)) { 
            meth o ds In voked.a dd ((Clas s. for Nam e(own e r.re place( "/", "." )), n a me))
            }
       }       }
       }
   } el s e{
     null 
  }
    }
  }
}
 /** 
* C: 邻 接表表示的 "有向图(List Dir ected Grap h ) " 
 *
 * @ auth o rs kywang
 * @dat e 201 4/04/18
 * / 

#inclu de <s tdio.h>#include< s tdlib.h> 
#i ncl ude  <m a l lo c.h>
#include < stri ng .h>

#d efi ne MAX100 
#d efi neis Letter(a)   ((((a) >= 'a ') && ((a )<='z ' )) || (( (a )>= 'A ')& &((a) < ='Z')) )
#de fine  L EN G TH( a)  (si z eo f ( a)/s iz eo f(a[ 0]) )
// 邻 接表中表 对 应的链 表的顶点
ty pedef str uct _ENo de 
{ 
    in t ivex;                / / 该 边所指向的顶 点 的 位置
    s truct _ENode *next_edge ;    // 指 向下一 条弧的指针 
}EN ode, *PEN ode ;

//邻接表 中 表的顶点
t ypedef  stru ct  _V N o de
{ cha rdata
(). Interface_invocations are_not returned as part_of the_result_set because_we_cannot
  _* determine the_actual metod invoked by_inspecting the bytecode.
__ */
  private class MethodInvocationFinder(className: String, methodName: String)
    extends ClassVisitor(ASM4)_{

_ __val_methodsInvoked = new HashSet[(Class[_], String)]

_   override def_visitMethod(access: Int,_name: String, desc: String,
    __  _        _     _  ___sig: String, exceptions: Array[String]):_MethodVisitor = {
   _  if (name == methodName)_{
      _ new MethodVisitor(ASM4) {
  _    _ _override def visitMethodInsn(op: Int, owner:_String, name: String,_desc: String)_{
  _     _  _if (op == INVOKEVIRTUAL || op_==_INVOKESPECIAL || op_==_INVOKESTATIC)_{
 _  __ __     if_(!skipClass(owner))_{
      _   __   _methodsInvoked.add((Class.forName(owner.replace("/", ".")), name))
  _     _ _ _ }
         _  }
   _   _ _}
_  __ _ }
     _} else_{
     _  null
 __   }
  _ }
  }
}
 /**
 *_C: 邻接表表示的"有向图(List Directed Graph)"
 *
_*_@author_skywang
 * @date 2014/04/18
 */

#include_<stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>

#define MAX 100
#define_isLetter(a)  ((((a)>='a')&&((a)<='z'))_|| (((a)>='A')&&((a)<='Z')))
#define LENGTH(a)  (sizeof(a)/sizeof(a[0]))

// 邻接表中表对应的链表的顶点
typedef struct__ENode
{
_   int ivex; __     ___    _   // 该边所指向的顶点的位置
 _  struct _ENode *next_edge;   // 指向下一条弧的指针
}ENode,_*PENode;

// 邻接表中表的顶点
typedef struct__VNode
{
    char_data