@@ -0,0 +1,445 @@
+package deref;%0A%0Aimport java.util.Set;%0A%0Apublic class UnconditionalDereferenceInLoop %7B%0A%09%0A%09Set%3CString%3E accumulate(Set%3CString%3E accumulator, String %5B%5D args) %7B%0A%09%09if (accumulator == null)%0A%09%09%09%09System.out.println(%22Accumulator shouldn't be null%22);%0A%09%09%0A%09%09// TODO: We should probably generate a warning here%0A%09%09// even though the NPE only occurs on a path that might be infeasible%0A%09%09%0A%09%09for(String s : args) %0A%09%09%09accumulator.add(s);%0A%09%09return accumulator;%0A%09%7D%0A%0A%7D%0A

test case