I got a wrong local name
Hello, when I try to get a local name of a variable, the wala did not give me the right name. I write a program like this:
public void testString() {
String phoneModel = "aaaaa";
switch (phoneModel){
case "wwwww":
break;
}
}
Then I want to get the local name of variable phoneModel. However, the wala returns 3=[phoneModel, null].
The IR like this:

A value number in WALA IR may correspond to more than one source-level local variable; see here:
https://github.com/wala/WALA/wiki/Mapping-to-source-code#mapping-value-numbers-back-to-local-names
In this case, getting a null value is a bit weird, but otherwise the result looks correct. Are you able to just ignore null values and use the results?
It seems that there is a bug in wala. Is it possible to fix it in the future?
Is the bug the null value? Or are you seeing something else that is incorrect? If it's the null value I can try to look, but not sure how easy it will be to fix.
Yes. When I change the code to
public void testString() {
String phoneModel = "aaaaa";
System.out.println(phoneModel.hashCode());
}
The local name is correct:

So, I guess there are something when dealing with switch...case...
Ok, thanks for the details! We appreciate the report. I will try to look into this, though it may not be very soon.