+ mr = convert(mr);
+ ie.setMethodRef(mr);
+ for(int i=0; i<ie.getArgCount(); i++) {
+ ValueBox b = ie.getArgBox(i);
+ Value val = b.getValue();
+ if (mr.parameterType(i) instanceof RefType && val.getType() instanceof PrimType) {
+ SootClass intClass = Scene.v().getSootClass("java.lang.Integer");
+ List typelist = new LinkedList();
+ typelist.add(IntType.v());
+ SootMethod intMethod = intClass.getMethod("<init>", typelist);
+ Local loc = viaLocal(Jimple.v().newNewExpr(RefType.v(intClass)), body, s);
+ List list = new LinkedList();
+ list.add(val);
+ units.insertBefore(Jimple.v().newInvokeStmt(Jimple.v().newSpecialInvokeExpr(loc,
+ intMethod.makeRef(),
+ list)),
+ s);
+ b.setValue(loc);
+ }
+ if (val != null && val.getType() instanceof NullType && mr.parameterType(i) instanceof IntType) {
+ b.setValue(IntConstant.v(-1));
+ }
+ }