[Soot-list] How to combine two method into one

Marc Miltenberger Marc.Miltenberger at cased.de
Sun Aug 2 05:41:35 EDT 2015


Hi Chris,
  I am not sure why this exception is thrown in your application.
If you have the soot source code, you could add a break point in 
AbstractValueBox at the statement

	if(value==null) throw new IllegalArgumentException("value may not be 
null");

to see why value is null.
Alternatively, a small sample (code, which we can also execute and which 
triggers the bug) would help to understand what is going wrong there.

  Independent of the method you use to merge the bodies themselfes, you 
have to map the parameter locals, since both methods have different 
parameter locals.
  Also, if the methods are not static, they will of course have 
different this-locals (the this-locals have different types as well!).
  importBodyContentsFrom has no idea of the Jimple identity statements, 
but instead simply adds a copy of each statement to the merged body.



Good luck.
Marc


Am 02.08.2015 um 11:15 schrieb csytang:
> Hi,all
>      I want to combine two method (method1 and method2) into another
> method3,
>
>   * All these methods share same name, and parameters, but in different
>     classes.
>
>      I use method 'importBodyContentsFrom' to create method3's body
> using method1, but when I use this function to import method2's body to
> method3, it incurs problem "java.lang.IllegalArgumentException: value
> may not be null". Is that a right way of using it? Or, any other
> suggestions for my work?
>      Thanks in advance.
> Best
> Chris.
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>



More information about the Soot-list mailing list