MCPcopy Create free account
hub / github.com/LFYSec/MScan / testDefUse

Method testDefUse

src/test/java/pascal/taie/frontend/soot/IRTest.java:66–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64 }
65
66 @Test
67 void testDefUse() {
68 String main = "DefUse";
69 buildWorld(main);
70 JClass mainClass = World.get().getClassHierarchy().getClass(main);
71 mainClass.getDeclaredMethods().forEach(m -> {
72 System.out.println(m);
73 m.getIR().forEach(stmt ->
74 System.out.printf("%s, def: %s, uses: %s%n",
75 stmt, stmt.getDef(), stmt.getUses()));
76 System.out.println("--------------------");
77 });
78 }
79}

Callers

nothing calls this directly

Calls 9

buildWorldMethod · 0.95
getMethod · 0.95
getDeclaredMethodsMethod · 0.95
getClassHierarchyMethod · 0.80
getClassMethod · 0.65
forEachMethod · 0.65
getIRMethod · 0.65
getDefMethod · 0.65
getUsesMethod · 0.65

Tested by

no test coverage detected