if (sm.isConcrete()) {
for (Unit unit : sm.getActiveBody().getUnits()) {
Stmt stmt = (Stmt) unit;
if (stmt.containsInvokeExpr()) {
InvokeExpr expr = stmt.getInvokeExpr();
if (expr.getMethod().getSignature().equals("<dk.brics.string.runtime.Strings: java.lang.String analyze(java.lang.String,java.lang.String)>")) {
ValueBox spot = expr.getArgBox(0);
Automaton expected = getRegExp(expr).toAutomaton(bindings);
hotspots.add(new RuntimeHotspot(spot, expected, HotspotKind.ANALYZE));
} else
if (expr.getMethod().getSignature().equals("<dk.brics.string.runtime.Strings: java.lang.String analyze(java.lang.String,java.net.URL)>")) {
ValueBox spot = expr.getArgBox(0);
Automaton expected = bindings.getFromURL(bindings.getConstantURL(expr.getArg(1)));
hotspots.add(new RuntimeHotspot(spot, expected, HotspotKind.ANALYZE));
} else
if (expr.getMethod().getSignature().equals("<dk.brics.string.runtime.Strings: java.lang.String check(java.lang.String,java.lang.String)>")) {
ValueBox spot = expr.getArgBox(0);
Automaton expected = getRegExp(expr).toAutomaton(bindings);
hotspots.add(new RuntimeHotspot(spot, expected, HotspotKind.CHECK));
} else
if (expr.getMethod().getSignature().equals("<dk.brics.string.runtime.Strings: java.lang.String check(java.lang.String,java.net.URL)>")) {
ValueBox spot = expr.getArgBox(0);
Automaton expected = bindings.getFromURL(bindings.getConstantURL(expr.getArg(1)));
hotspots.add(new RuntimeHotspot(spot, expected, HotspotKind.CHECK));
}
}
}
}