I'm currently writing a feature for my Java deobfuscator which uses the BLOAT bytecode library.
The feature I'm writing is the ability to remove unused parameters from a methods signature and have it update all references to that method.
Example:
public class Main {
public void cya() {
helloworld(1, 2, 3, 5);
}
public void helloworld(int a, int b, int c, int d) {
a += 1;
c += 3;
}
}
As you can see parameter b and d in helloworld are never used within the method. Therefore, they should be removed as they are useless.
My question is, using BLOAT how do I remove a parameter and have it update all the other references to that method (like when you remove parameter when changing method signature in eclipse).
So that the outcome of that would be this:
public class Main {
public void cya() {
helloworld(1, 3);
}
public void helloworld(int a, int c) {
a += 1;
c += 3;
}
}
Thanks for your help!