private int addJimpleLnTags(int lnNum, Unit stmt, int endLn) { if (endLn - lnNum <= 1) { stmt.addTag(new JimpleLineNumberTag(lnNum)); // G.v().out.println(stmt.getClass().toString()); lnNum++; return lnNum; } else { stmt.addTag(new JimpleLineNumberTag(lnNum, endLn)); // G.v().out.println("multi-line: "+stmt.getClass().toString()); endLn++; return endLn; } }
public void convertToBaf(JimpleToBafContext context, List out) { Unit u = Baf.v().newStaticGetInst(fieldRef); out.add(u); Iterator it = context.getCurrentUnit().getTags().iterator(); while (it.hasNext()) { u.addTag((Tag) it.next()); } }