alextsil / JCuttleFish

Thesis : Java based obfuscation tool for Java programs
2 stars 0 forks source link

Thisifier thisifies all arguments of method calls instead of class member variables only #35

Closed alextsil closed 9 years ago

alextsil commented 9 years ago

ex.

public void addEffect(ITextEffect effect) {
    this.j.add(this.effect); //effect shouldn't be thisified
}

ex 2.

Rect tmp = new Rect();
//tmp shouldn't be thisified. "this.b" should be "text"
this.a.getTextBounds(this.b, 0, text.length(), this.tmp);

ex 3. original :

public Text(String text, Position position, RectF padding, Paint paint) {
        this.text = text;
        this.position = position;
        this.padding = padding;
        this.paint = paint;

        initBounds(text);
}

obfuscated :

public Text(String text, Position position, RectF padding, Paint paint) {
        this.b = text;
        this.e = position;
        this.f = padding;
        this.a = paint;

        initBounds(this.b); // "this.b" should be "text"
}