Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variables names in jimple (from Bytecode) with duplicate entries #30

Open
faustocarva opened this issue Nov 12, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@faustocarva
Copy link
Contributor

There is a bug in the Decompiler module that is creating duplicated variables names in some method bodies.
Sample Code:

package samples;
public class LongValueSample {
	public static void addLongValues() throws Exception {
		long x = 10L; 
		long y = 20L; 
		System.out.println(x + y);
	}
}

The Decompiler generates the code bellow:

    public static void addLongValues() throws java.lang.Exception
    {
        long $i2;
        long $i1;
        java.io.PrintStream $i2;
        long $i3;
     
        $i1 = 10L;
        $i2 = 20L;
        $i2 = <java.lang.System: java.io.PrintStream out>;
        $i3 = $i1 + $i2;
        virtualinvoke $i2.<java.io.PrintStream: void println(long)>($i3);
     
        return; 
    }

You can see the repeated usage of variable name $i2 (for a long and for java.io.PrintStream) .

@faustocarva faustocarva added the bug Something isn't working label Nov 12, 2020
rbonifacio added a commit that referenced this issue Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant