| 1 |
public class StateMatch { |
| 2 |
private int num_elts = 0; |
| 3 |
|
| 4 |
@SuppressWarnings("nullness") |
| 5 |
private double[][] elts = null; |
| 6 |
|
| 7 |
@SuppressWarnings({ |
| 8 |
"Interning", |
| 9 |
"index" |
| 10 |
}) // This code is inherently unsafe for the index checker, but adding index annotations |
| 11 |
// produces warnings for other checkers (fenum) |
| 12 |
public boolean state_match(Object state) { |
| 13 |
if (!(state instanceof double[][])) { |
| 14 |
System.out.println(""); |
| 15 |
} |
| 16 |
|
| 17 |
double[][] e = (double[][]) state; |
| 18 |
boolean match = false; |
| 19 |
if (elts[0] == e[0]) { |
| 20 |
// When analyzing this statement, we get an exception about taking |
| 21 |
// the LUB of ATMs with empty sets of qualifiers. |
| 22 |
match = true; |
| 23 |
} |
| 24 |
return (true); |
| 25 |
} |
| 26 |
} |