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

Method getIndex

src/main/java/pascal/taie/util/SimpleIndexer.java:75–86  ·  view source on GitHub ↗
(E o)

Source from the content-addressed store, hash-verified

73 }
74
75 @Override
76 public int getIndex(E o) {
77 Objects.requireNonNull(o, "null cannot be indexed");
78 Integer id = obj2index.get(o);
79 if (id == null) {
80 obj2index.put(o, counter);
81 index2obj.add(o);
82 return counter++;
83 } else {
84 return id;
85 }
86 }
87
88 @Override
89 public E getObject(int index) {

Callers 5

testInitMethod · 0.95
testGetMethod · 0.95
dumpICFGMethod · 0.95
dumpCallGraphMethod · 0.95
dumpDotFileMethod · 0.95

Calls 3

getMethod · 0.65
putMethod · 0.65
addMethod · 0.65

Tested by 2

testInitMethod · 0.76
testGetMethod · 0.76