I am toying with the SymbolicListener with structural symbolic data. I
got the following exception thrown by JPF for a program with
LinkedList. The symbolic method is : Test.test(sym)
The program is:
import java.util.LinkedList;
public class Test {
public static void main(String[] args) {
LinkedList<Integer> ll = new LinkedList<Integer>();
test(ll);
}
public static void test(LinkedList<Integer> ll) {
if (ll != null) {
int size = ll.size();
if (size > 10){
ll.get(0);
}
}
}
}
The exception is:
====================================================== error #1
gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.get(LinkedList.java:315)
at NodeTest.test(NodeTest.java:21)
at NodeTest.main(NodeTest.java:14)
Is it a bug or I am getting thing wrongly?
Thanks!