You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NullPointerOnGets.java 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  1. import org.aspectj.testing.*;
  2. public class NullPointerOnGets {
  3. public static void main(String[] args) {
  4. Strings.add();
  5. C.go();
  6. Ints.add();
  7. Tester.checkAllEventsIgnoreDups();
  8. }
  9. static {
  10. Tester.expectEvent("static");
  11. }
  12. }
  13. class C {
  14. public String str0 = "str0";
  15. String str1 = "str1";
  16. protected String str2 = "str2";
  17. private String str3 = "str3";
  18. public static String sstr0 = "sstr0";
  19. static String sstr1 = "sstr1";
  20. protected static String sstr2 = "sstr2";
  21. private static String sstr3 = "sstr3";
  22. public int int0 = 1;
  23. int int1 = 2;
  24. protected int int2 = 3;
  25. private int int3 = 4;
  26. public static int sint0 = -1;
  27. static int sint1 = -2;
  28. protected static int sint2 = -3;
  29. private static int sint3 = -4;
  30. static void go() {
  31. Tester.event("static");
  32. C c = new C();
  33. eq(c.str0, "str0"); c.str0 = "str00"; eq(c.str0, "str00");
  34. eq(c.str1, "str1"); c.str1 = "str11"; eq(c.str1, "str11");
  35. eq(c.str2, "str2"); c.str2 = "str22"; eq(c.str2, "str22");
  36. eq(c.str3, "str3"); c.str3 = "str33"; eq(c.str3, "str33");
  37. eq(C.sstr0, "sstr0"); C.sstr0 = "sstr00"; eq(C.sstr0, "sstr00");
  38. eq(C.sstr1, "sstr1"); C.sstr1 = "sstr11"; eq(C.sstr1, "sstr11");
  39. eq(C.sstr2, "sstr2"); C.sstr2 = "sstr22"; eq(C.sstr2, "sstr22");
  40. eq(C.sstr3, "sstr3"); C.sstr3 = "sstr33"; eq(C.sstr3, "sstr33");
  41. eq(c.int0, 1); c.int0 = 100; eq(c.int0, 100);
  42. eq(c.int1, 2); c.int1 = 111; eq(c.int1, 111);
  43. eq(c.int2, 3); c.int2 = 122; eq(c.int2, 122);
  44. eq(c.int3, 4); c.int3 = 133; eq(c.int3, 133);
  45. eq(C.sint0, -1); C.sint0 = 200; eq(C.sint0, 200);
  46. eq(C.sint1, -2); C.sint1 = 211; eq(C.sint1, 211);
  47. eq(C.sint2, -3); C.sint2 = 222; eq(C.sint2, 222);
  48. eq(C.sint3, -4); C.sint3 = 233; eq(C.sint3, 233);
  49. }
  50. private static void eq(int i0, int i1) {Tester.checkEqual(i0,i1);}
  51. private static void eq(String s0, String s1) {Tester.checkEqual(s0,s1);}
  52. }
  53. aspect StringAspect {
  54. static void a(String s) { Tester.event(s); }
  55. //pointcuts
  56. pointcut gets_String_str0(): get(String C.str0);//[s];
  57. pointcut gets_String_str1(): get(String C.str1); //[s];
  58. pointcut gets_String_str2(): get(String C.str2); //[s];
  59. pointcut gets_String_str3(): get(String C.str3); //[s];
  60. pointcut gets_String_str0b(): get(String C.str0); //[];
  61. pointcut gets_String_str1b(): get(String C.str1); //[];
  62. pointcut gets_String_str2b(): get(String C.str2); //[];
  63. pointcut gets_String_str3b(): get(String C.str3); //[];
  64. pointcut sets_String_str0(): set(String C.str0); //[s][];
  65. pointcut sets_String_str1(): set(String C.str1); //[s][];
  66. pointcut sets_String_str2(): set(String C.str2); //[s][];
  67. pointcut sets_String_str3(): set(String C.str3); //[s][];
  68. pointcut sets_String_str0b(): set(String C.str0); //[][s];
  69. pointcut sets_String_str1b(): set(String C.str1); //[][s];
  70. pointcut sets_String_str2b(): set(String C.str2); //[][s];
  71. pointcut sets_String_str3b(): set(String C.str3); //[][s];
  72. pointcut sets_String_str0c(): set(String C.str0); //[o][s];
  73. pointcut sets_String_str1c(): set(String C.str1); //[o][s];
  74. pointcut sets_String_str2c(): set(String C.str2); //[o][s];
  75. pointcut sets_String_str3c(): set(String C.str3); //[o][s];
  76. pointcut gets_String_sstr0(): get(String C.str0); //[s];
  77. pointcut gets_String_sstr1(): get(String C.str1); //[s];
  78. pointcut gets_String_sstr2(): get(String C.str2); //[s];
  79. pointcut gets_String_sstr3(): get(String C.str3); //[s];
  80. pointcut gets_String_sstr0b(): get(String C.str0); //[];
  81. pointcut gets_String_sstr1b(): get(String C.str1); //[];
  82. pointcut gets_String_sstr2b(): get(String C.str2); //[];
  83. pointcut gets_String_sstr3b(): get(String C.str3); //[];
  84. pointcut sets_String_sstr0(): set(String C.str0); //[s][];
  85. pointcut sets_String_sstr1(): set(String C.str1); //[s][];
  86. pointcut sets_String_sstr2(): set(String C.str2); //[s][];
  87. pointcut sets_String_sstr3(): set(String C.str3); //[s][];
  88. pointcut sets_String_sstr0b(): set(String C.str0); //[][s];
  89. pointcut sets_String_sstr1b(): set(String C.str1); //[][s];
  90. pointcut sets_String_sstr2b(): set(String C.str2); //[][s];
  91. pointcut sets_String_sstr3b(): set(String C.str3); //[][s];
  92. pointcut sets_String_sstr0c(): set(String C.str0); //[o][s];
  93. pointcut sets_String_sstr1c(): set(String C.str1); //[o][s];
  94. pointcut sets_String_sstr2c(): set(String C.str2); //[o][s];
  95. pointcut sets_String_sstr3c(): set(String C.str3); //[o][s];
  96. //befores
  97. before(): gets_String_str0() { a("b gets_String_str0"); }
  98. before(): gets_String_str1() { a("b gets_String_str1"); }
  99. before(): gets_String_str2() { a("b gets_String_str2"); }
  100. before(): gets_String_str3() { a("b gets_String_str3"); }
  101. before(): gets_String_str0b() { a("b gets_String_str0b"); }
  102. before(): gets_String_str1b() { a("b gets_String_str1b"); }
  103. before(): gets_String_str2b() { a("b gets_String_str2b"); }
  104. before(): gets_String_str3b() { a("b gets_String_str3b"); }
  105. before(): sets_String_str0() { a("b sets_String_str0"); }
  106. before(): sets_String_str1() { a("b sets_String_str1"); }
  107. before(): sets_String_str2() { a("b sets_String_str2"); }
  108. before(): sets_String_str3() { a("b sets_String_str3"); }
  109. before(): sets_String_str0b() { a("b sets_String_str0b"); }
  110. before(): sets_String_str1b() { a("b sets_String_str1b"); }
  111. before(): sets_String_str2b() { a("b sets_String_str2b"); }
  112. before(): sets_String_str3b() { a("b sets_String_str3b"); }
  113. before(): sets_String_str0c() { a("b sets_String_str0c"); }
  114. before(): sets_String_str1c() { a("b sets_String_str1c"); }
  115. before(): sets_String_str2c() { a("b sets_String_str2c"); }
  116. before(): sets_String_str3c() { a("b sets_String_str3c"); }
  117. before(): gets_String_sstr0() { a("b gets_String_sstr0"); }
  118. before(): gets_String_sstr1() { a("b gets_String_sstr1"); }
  119. before(): gets_String_sstr2() { a("b gets_String_sstr2"); }
  120. before(): gets_String_sstr3() { a("b gets_String_sstr3"); }
  121. before(): gets_String_sstr0b() { a("b gets_String_sstr0b"); }
  122. before(): gets_String_sstr1b() { a("b gets_String_sstr1b"); }
  123. before(): gets_String_sstr2b() { a("b gets_String_sstr2b"); }
  124. before(): gets_String_sstr3b() { a("b gets_String_sstr3b"); }
  125. before(): sets_String_sstr0() { a("b sets_String_sstr0"); }
  126. before(): sets_String_sstr1() { a("b sets_String_sstr1"); }
  127. before(): sets_String_sstr2() { a("b sets_String_sstr2"); }
  128. before(): sets_String_sstr3() { a("b sets_String_sstr3"); }
  129. before(): sets_String_sstr0b() { a("b sets_String_sstr0b"); }
  130. before(): sets_String_sstr1b() { a("b sets_String_sstr1b"); }
  131. before(): sets_String_sstr2b() { a("b sets_String_sstr2b"); }
  132. before(): sets_String_sstr3b() { a("b sets_String_sstr3b"); }
  133. before(): sets_String_sstr0c() { a("b sets_String_sstr0c"); }
  134. before(): sets_String_sstr1c() { a("b sets_String_sstr1c"); }
  135. before(): sets_String_sstr2c() { a("b sets_String_sstr2c"); }
  136. before(): sets_String_sstr3c() { a("b sets_String_sstr3c"); }
  137. //end-befores
  138. //arounds
  139. Object around(): gets_String_str0() { a("a gets_String_str0"); return proceed(); }
  140. Object around(): gets_String_str1() { a("a gets_String_str1"); return proceed(); }
  141. Object around(): gets_String_str2() { a("a gets_String_str2"); return proceed(); }
  142. Object around(): gets_String_str3() { a("a gets_String_str3"); return proceed(); }
  143. Object around(): gets_String_str0b() { a("a gets_String_str0b"); return proceed(); }
  144. Object around(): gets_String_str1b() { a("a gets_String_str1b"); return proceed(); }
  145. Object around(): gets_String_str2b() { a("a gets_String_str2b"); return proceed(); }
  146. Object around(): gets_String_str3b() { a("a gets_String_str3b"); return proceed(); }
  147. Object around(): sets_String_str0() { a("a sets_String_str0"); return proceed(); }
  148. Object around(): sets_String_str1() { a("a sets_String_str1"); return proceed(); }
  149. Object around(): sets_String_str2() { a("a sets_String_str2"); return proceed(); }
  150. Object around(): sets_String_str3() { a("a sets_String_str3"); return proceed(); }
  151. Object around(): sets_String_str0b() { a("a sets_String_str0b"); return proceed(); }
  152. Object around(): sets_String_str1b() { a("a sets_String_str1b"); return proceed(); }
  153. Object around(): sets_String_str2b() { a("a sets_String_str2b"); return proceed(); }
  154. Object around(): sets_String_str3b() { a("a sets_String_str3b"); return proceed(); }
  155. Object around(): sets_String_str0c() { a("a sets_String_str0c"); return proceed(); }
  156. Object around(): sets_String_str1c() { a("a sets_String_str1c"); return proceed(); }
  157. Object around(): sets_String_str2c() { a("a sets_String_str2c"); return proceed(); }
  158. Object around(): sets_String_str3c() { a("a sets_String_str3c"); return proceed(); }
  159. Object around(): gets_String_sstr0() { a("a gets_String_sstr0"); return proceed(); }
  160. Object around(): gets_String_sstr1() { a("a gets_String_sstr1"); return proceed(); }
  161. Object around(): gets_String_sstr2() { a("a gets_String_sstr2"); return proceed(); }
  162. Object around(): gets_String_sstr3() { a("a gets_String_sstr3"); return proceed(); }
  163. Object around(): gets_String_sstr0b() { a("a gets_String_sstr0b"); return proceed(); }
  164. Object around(): gets_String_sstr1b() { a("a gets_String_sstr1b"); return proceed(); }
  165. Object around(): gets_String_sstr2b() { a("a gets_String_sstr2b"); return proceed(); }
  166. Object around(): gets_String_sstr3b() { a("a gets_String_sstr3b"); return proceed(); }
  167. Object around(): sets_String_sstr0() { a("a sets_String_sstr0"); return proceed(); }
  168. Object around(): sets_String_sstr1() { a("a sets_String_sstr1"); return proceed(); }
  169. Object around(): sets_String_sstr2() { a("a sets_String_sstr2"); return proceed(); }
  170. Object around(): sets_String_sstr3() { a("a sets_String_sstr3"); return proceed(); }
  171. Object around(): sets_String_sstr0b() { a("a sets_String_sstr0b"); return proceed(); }
  172. Object around(): sets_String_sstr1b() { a("a sets_String_sstr1b"); return proceed(); }
  173. Object around(): sets_String_sstr2b() { a("a sets_String_sstr2b"); return proceed(); }
  174. Object around(): sets_String_sstr3b() { a("a sets_String_sstr3b"); return proceed(); }
  175. Object around(): sets_String_sstr0c() { a("a sets_String_sstr0c"); return proceed(); }
  176. Object around(): sets_String_sstr1c() { a("a sets_String_sstr1c"); return proceed(); }
  177. Object around(): sets_String_sstr2c() { a("a sets_String_sstr2c"); return proceed(); }
  178. Object around(): sets_String_sstr3c() { a("a sets_String_sstr3c"); return proceed(); }
  179. //end-arounds
  180. //afters
  181. after(): gets_String_str0() { a("f gets_String_str0"); }
  182. after(): gets_String_str1() { a("f gets_String_str1"); }
  183. after(): gets_String_str2() { a("f gets_String_str2"); }
  184. after(): gets_String_str3() { a("f gets_String_str3"); }
  185. after(): gets_String_str0b() { a("f gets_String_str0b"); }
  186. after(): gets_String_str1b() { a("f gets_String_str1b"); }
  187. after(): gets_String_str2b() { a("f gets_String_str2b"); }
  188. after(): gets_String_str3b() { a("f gets_String_str3b"); }
  189. after(): sets_String_str0() { a("f sets_String_str0"); }
  190. after(): sets_String_str1() { a("f sets_String_str1"); }
  191. after(): sets_String_str2() { a("f sets_String_str2"); }
  192. after(): sets_String_str3() { a("f sets_String_str3"); }
  193. after(): sets_String_str0b() { a("f sets_String_str0b"); }
  194. after(): sets_String_str1b() { a("f sets_String_str1b"); }
  195. after(): sets_String_str2b() { a("f sets_String_str2b"); }
  196. after(): sets_String_str3b() { a("f sets_String_str3b"); }
  197. after(): sets_String_str0c() { a("f sets_String_str0c"); }
  198. after(): sets_String_str1c() { a("f sets_String_str1c"); }
  199. after(): sets_String_str2c() { a("f sets_String_str2c"); }
  200. after(): sets_String_str3c() { a("f sets_String_str3c"); }
  201. after(): gets_String_sstr0() { a("f gets_String_sstr0"); }
  202. after(): gets_String_sstr1() { a("f gets_String_sstr1"); }
  203. after(): gets_String_sstr2() { a("f gets_String_sstr2"); }
  204. after(): gets_String_sstr3() { a("f gets_String_sstr3"); }
  205. after(): gets_String_sstr0b() { a("f gets_String_sstr0b"); }
  206. after(): gets_String_sstr1b() { a("f gets_String_sstr1b"); }
  207. after(): gets_String_sstr2b() { a("f gets_String_sstr2b"); }
  208. after(): gets_String_sstr3b() { a("f gets_String_sstr3b"); }
  209. after(): sets_String_sstr0() { a("f sets_String_sstr0"); }
  210. after(): sets_String_sstr1() { a("f sets_String_sstr1"); }
  211. after(): sets_String_sstr2() { a("f sets_String_sstr2"); }
  212. after(): sets_String_sstr3() { a("f sets_String_sstr3"); }
  213. after(): sets_String_sstr0b() { a("f sets_String_sstr0b"); }
  214. after(): sets_String_sstr1b() { a("f sets_String_sstr1b"); }
  215. after(): sets_String_sstr2b() { a("f sets_String_sstr2b"); }
  216. after(): sets_String_sstr3b() { a("f sets_String_sstr3b"); }
  217. after(): sets_String_sstr0c() { a("f sets_String_sstr0c"); }
  218. after(): sets_String_sstr1c() { a("f sets_String_sstr1c"); }
  219. after(): sets_String_sstr2c() { a("f sets_String_sstr2c"); }
  220. after(): sets_String_sstr3c() { a("f sets_String_sstr3c"); }
  221. //end-afters
  222. }
  223. class Strings {
  224. static void m(String s) { Tester.expectEvent(s); }
  225. static void add() {
  226. m("b gets_String_str0"); m("f gets_String_str0"); m("a gets_String_str0");
  227. m("b gets_String_str1"); m("f gets_String_str1"); m("a gets_String_str1");
  228. m("b gets_String_str2"); m("f gets_String_str2"); m("a gets_String_str2");
  229. m("b gets_String_str3"); m("f gets_String_str3"); m("a gets_String_str3");
  230. m("b gets_String_str0b"); m("f gets_String_str0b"); m("a gets_String_str0b");
  231. m("b gets_String_str1b"); m("f gets_String_str1b"); m("a gets_String_str1b");
  232. m("b gets_String_str2b"); m("f gets_String_str2b"); m("a gets_String_str2b");
  233. m("b gets_String_str3b"); m("f gets_String_str3b"); m("a gets_String_str3b");
  234. m("b sets_String_str0"); m("f sets_String_str0"); m("a sets_String_str0");
  235. m("b sets_String_str1"); m("f sets_String_str1"); m("a sets_String_str1");
  236. m("b sets_String_str2"); m("f sets_String_str2"); m("a sets_String_str2");
  237. m("b sets_String_str3"); m("f sets_String_str3"); m("a sets_String_str3");
  238. m("b sets_String_str0b"); m("f sets_String_str0b"); m("a sets_String_str0b");
  239. m("b sets_String_str1b"); m("f sets_String_str1b"); m("a sets_String_str1b");
  240. m("b sets_String_str2b"); m("f sets_String_str2b"); m("a sets_String_str2b");
  241. m("b sets_String_str3b"); m("f sets_String_str3b"); m("a sets_String_str3b");
  242. m("b sets_String_str0c"); m("f sets_String_str0c"); m("a sets_String_str0c");
  243. m("b sets_String_str1c"); m("f sets_String_str1c"); m("a sets_String_str1c");
  244. m("b sets_String_str2c"); m("f sets_String_str2c"); m("a sets_String_str2c");
  245. m("b sets_String_str3c"); m("f sets_String_str3c"); m("a sets_String_str3c");
  246. m("b gets_String_sstr0"); m("f gets_String_sstr0"); m("a gets_String_sstr0");
  247. m("b gets_String_sstr1"); m("f gets_String_sstr1"); m("a gets_String_sstr1");
  248. m("b gets_String_sstr2"); m("f gets_String_sstr2"); m("a gets_String_sstr2");
  249. m("b gets_String_sstr3"); m("f gets_String_sstr3"); m("a gets_String_sstr3");
  250. m("b gets_String_sstr0b"); m("f gets_String_sstr0b"); m("a gets_String_sstr0b");
  251. m("b gets_String_sstr1b"); m("f gets_String_sstr1b"); m("a gets_String_sstr1b");
  252. m("b gets_String_sstr2b"); m("f gets_String_sstr2b"); m("a gets_String_sstr2b");
  253. m("b gets_String_sstr3b"); m("f gets_String_sstr3b"); m("a gets_String_sstr3b");
  254. m("b sets_String_sstr0"); m("f sets_String_sstr0"); m("a sets_String_sstr0");
  255. m("b sets_String_sstr1"); m("f sets_String_sstr1"); m("a sets_String_sstr1");
  256. m("b sets_String_sstr2"); m("f sets_String_sstr2"); m("a sets_String_sstr2");
  257. m("b sets_String_sstr3"); m("f sets_String_sstr3"); m("a sets_String_sstr3");
  258. m("b sets_String_sstr0b"); m("f sets_String_sstr0b"); m("a sets_String_sstr0b");
  259. m("b sets_String_sstr1b"); m("f sets_String_sstr1b"); m("a sets_String_sstr1b");
  260. m("b sets_String_sstr2b"); m("f sets_String_sstr2b"); m("a sets_String_sstr2b");
  261. m("b sets_String_sstr3b"); m("f sets_String_sstr3b"); m("a sets_String_sstr3b");
  262. m("b sets_String_sstr0c"); m("f sets_String_sstr0c"); m("a sets_String_sstr0c");
  263. m("b sets_String_sstr1c"); m("f sets_String_sstr1c"); m("a sets_String_sstr1c");
  264. m("b sets_String_sstr2c"); m("f sets_String_sstr2c"); m("a sets_String_sstr2c");
  265. m("b sets_String_sstr3c"); m("f sets_String_sstr3c"); m("a sets_String_sstr3c");
  266. }
  267. }
  268. aspect IntAspect {
  269. static void a(String s) { Tester.event(s); }
  270. // start-non-static
  271. pointcut gets_int_int0(): get(int C.int0); //[s];
  272. pointcut gets_int_int1(): get(int C.int1); //[s];
  273. pointcut gets_int_int2(): get(int C.int2); //[s];
  274. pointcut gets_int_int3(): get(int C.int3); //[s];
  275. pointcut gets_int_int0b(): get(int C.int0); //[];
  276. pointcut gets_int_int1b(): get(int C.int1); //[];
  277. pointcut gets_int_int2b(): get(int C.int2); //[];
  278. pointcut gets_int_int3b(): get(int C.int3); //[];
  279. pointcut sets_int_int0(): set(int C.int0); //[s][];
  280. pointcut sets_int_int1(): set(int C.int1); //[s][];
  281. pointcut sets_int_int2(): set(int C.int2); //[s][];
  282. pointcut sets_int_int3(): set(int C.int3); //[s][];
  283. pointcut sets_int_int0b(): set(int C.int0); //[][s];
  284. pointcut sets_int_int1b(): set(int C.int1); //[][s];
  285. pointcut sets_int_int2b(): set(int C.int2); //[][s];
  286. pointcut sets_int_int3b(): set(int C.int3); //[][s];
  287. pointcut sets_int_int0c(): set(int C.int0); //[o][s];
  288. pointcut sets_int_int1c(): set(int C.int1); //[o][s];
  289. pointcut sets_int_int2c(): set(int C.int2); //[o][s];
  290. pointcut sets_int_int3c(): set(int C.int3); //[o][s];
  291. pointcut gets_int_sint0(): get(int C.int0); //[s];
  292. pointcut gets_int_sint1(): get(int C.int1); //[s];
  293. pointcut gets_int_sint2(): get(int C.int2); //[s];
  294. pointcut gets_int_sint3(): get(int C.int3); //[s];
  295. pointcut gets_int_sint0b(): get(int C.int0); //[];
  296. pointcut gets_int_sint1b(): get(int C.int1); //[];
  297. pointcut gets_int_sint2b(): get(int C.int2); //[];
  298. pointcut gets_int_sint3b(): get(int C.int3); //[];
  299. pointcut sets_int_sint0(): set(int C.int0); //[s][];
  300. pointcut sets_int_sint1(): set(int C.int1); //[s][];
  301. pointcut sets_int_sint2(): set(int C.int2); //[s][];
  302. pointcut sets_int_sint3(): set(int C.int3); //[s][];
  303. pointcut sets_int_sint0b(): set(int C.int0); //[][s];
  304. pointcut sets_int_sint1b(): set(int C.int1); //[][s];
  305. pointcut sets_int_sint2b(): set(int C.int2); //[][s];
  306. pointcut sets_int_sint3b(): set(int C.int3); //[][s];
  307. pointcut sets_int_sint0c(): set(int C.int0); //[o][s];
  308. pointcut sets_int_sint1c(): set(int C.int1); //[o][s];
  309. pointcut sets_int_sint2c(): set(int C.int2); //[o][s];
  310. pointcut sets_int_sint3c(): set(int C.int3); //[o][s];
  311. //end-pointcuts
  312. before(): gets_int_int0() { a("b gets_int_int0"); }
  313. before(): gets_int_int1() { a("b gets_int_int1"); }
  314. before(): gets_int_int2() { a("b gets_int_int2"); }
  315. before(): gets_int_int3() { a("b gets_int_int3"); }
  316. before(): gets_int_int0b() { a("b gets_int_int0b"); }
  317. before(): gets_int_int1b() { a("b gets_int_int1b"); }
  318. before(): gets_int_int2b() { a("b gets_int_int2b"); }
  319. before(): gets_int_int3b() { a("b gets_int_int3b"); }
  320. before(): sets_int_int0() { a("b sets_int_int0"); }
  321. before(): sets_int_int1() { a("b sets_int_int1"); }
  322. before(): sets_int_int2() { a("b sets_int_int2"); }
  323. before(): sets_int_int3() { a("b sets_int_int3"); }
  324. before(): sets_int_int0b() { a("b sets_int_int0b"); }
  325. before(): sets_int_int1b() { a("b sets_int_int1b"); }
  326. before(): sets_int_int2b() { a("b sets_int_int2b"); }
  327. before(): sets_int_int3b() { a("b sets_int_int3b"); }
  328. before(): sets_int_int0c() { a("b sets_int_int0c"); }
  329. before(): sets_int_int1c() { a("b sets_int_int1c"); }
  330. before(): sets_int_int2c() { a("b sets_int_int2c"); }
  331. before(): sets_int_int3c() { a("b sets_int_int3c"); }
  332. before(): gets_int_sint0() { a("b gets_int_sint0"); }
  333. before(): gets_int_sint1() { a("b gets_int_sint1"); }
  334. before(): gets_int_sint2() { a("b gets_int_sint2"); }
  335. before(): gets_int_sint3() { a("b gets_int_sint3"); }
  336. before(): gets_int_sint0b() { a("b gets_int_sint0b"); }
  337. before(): gets_int_sint1b() { a("b gets_int_sint1b"); }
  338. before(): gets_int_sint2b() { a("b gets_int_sint2b"); }
  339. before(): gets_int_sint3b() { a("b gets_int_sint3b"); }
  340. before(): sets_int_sint0() { a("b sets_int_sint0"); }
  341. before(): sets_int_sint1() { a("b sets_int_sint1"); }
  342. before(): sets_int_sint2() { a("b sets_int_sint2"); }
  343. before(): sets_int_sint3() { a("b sets_int_sint3"); }
  344. before(): sets_int_sint0b() { a("b sets_int_sint0b"); }
  345. before(): sets_int_sint1b() { a("b sets_int_sint1b"); }
  346. before(): sets_int_sint2b() { a("b sets_int_sint2b"); }
  347. before(): sets_int_sint3b() { a("b sets_int_sint3b"); }
  348. before(): sets_int_sint0c() { a("b sets_int_sint0c"); }
  349. before(): sets_int_sint1c() { a("b sets_int_sint1c"); }
  350. before(): sets_int_sint2c() { a("b sets_int_sint2c"); }
  351. before(): sets_int_sint3c() { a("b sets_int_sint3c"); }
  352. //end-befores
  353. Object around(): gets_int_int0() { a("a gets_int_int0"); return proceed(); }
  354. Object around(): gets_int_int1() { a("a gets_int_int1"); return proceed(); }
  355. Object around(): gets_int_int2() { a("a gets_int_int2"); return proceed(); }
  356. Object around(): gets_int_int3() { a("a gets_int_int3"); return proceed(); }
  357. Object around(): gets_int_int0b() { a("a gets_int_int0b"); return proceed(); }
  358. Object around(): gets_int_int1b() { a("a gets_int_int1b"); return proceed(); }
  359. Object around(): gets_int_int2b() { a("a gets_int_int2b"); return proceed(); }
  360. Object around(): gets_int_int3b() { a("a gets_int_int3b"); return proceed(); }
  361. Object around(): sets_int_int0() { a("a sets_int_int0"); return proceed(); }
  362. Object around(): sets_int_int1() { a("a sets_int_int1"); return proceed(); }
  363. Object around(): sets_int_int2() { a("a sets_int_int2"); return proceed(); }
  364. Object around(): sets_int_int3() { a("a sets_int_int3"); return proceed(); }
  365. Object around(): sets_int_int0b() { a("a sets_int_int0b"); return proceed(); }
  366. Object around(): sets_int_int1b() { a("a sets_int_int1b"); return proceed(); }
  367. Object around(): sets_int_int2b() { a("a sets_int_int2b"); return proceed(); }
  368. Object around(): sets_int_int3b() { a("a sets_int_int3b"); return proceed(); }
  369. Object around(): sets_int_int0c() { a("a sets_int_int0c"); return proceed(); }
  370. Object around(): sets_int_int1c() { a("a sets_int_int1c"); return proceed(); }
  371. Object around(): sets_int_int2c() { a("a sets_int_int2c"); return proceed(); }
  372. Object around(): sets_int_int3c() { a("a sets_int_int3c"); return proceed(); }
  373. Object around(): gets_int_sint0() { a("a gets_int_sint0"); return proceed(); }
  374. Object around(): gets_int_sint1() { a("a gets_int_sint1"); return proceed(); }
  375. Object around(): gets_int_sint2() { a("a gets_int_sint2"); return proceed(); }
  376. Object around(): gets_int_sint3() { a("a gets_int_sint3"); return proceed(); }
  377. Object around(): gets_int_sint0b() { a("a gets_int_sint0b"); return proceed(); }
  378. Object around(): gets_int_sint1b() { a("a gets_int_sint1b"); return proceed(); }
  379. Object around(): gets_int_sint2b() { a("a gets_int_sint2b"); return proceed(); }
  380. Object around(): gets_int_sint3b() { a("a gets_int_sint3b"); return proceed(); }
  381. Object around(): sets_int_sint0() { a("a sets_int_sint0"); return proceed(); }
  382. Object around(): sets_int_sint1() { a("a sets_int_sint1"); return proceed(); }
  383. Object around(): sets_int_sint2() { a("a sets_int_sint2"); return proceed(); }
  384. Object around(): sets_int_sint3() { a("a sets_int_sint3"); return proceed(); }
  385. Object around(): sets_int_sint0b() { a("a sets_int_sint0b"); return proceed(); }
  386. Object around(): sets_int_sint1b() { a("a sets_int_sint1b"); return proceed(); }
  387. Object around(): sets_int_sint2b() { a("a sets_int_sint2b"); return proceed(); }
  388. Object around(): sets_int_sint3b() { a("a sets_int_sint3b"); return proceed(); }
  389. Object around(): sets_int_sint0c() { a("a sets_int_sint0c"); return proceed(); }
  390. Object around(): sets_int_sint1c() { a("a sets_int_sint1c"); return proceed(); }
  391. Object around(): sets_int_sint2c() { a("a sets_int_sint2c"); return proceed(); }
  392. Object around(): sets_int_sint3c() { a("a sets_int_sint3c"); return proceed(); }
  393. //end-arounds
  394. after(): gets_int_int0() { a("f gets_int_int0"); }
  395. after(): gets_int_int1() { a("f gets_int_int1"); }
  396. after(): gets_int_int2() { a("f gets_int_int2"); }
  397. after(): gets_int_int3() { a("f gets_int_int3"); }
  398. after(): gets_int_int0b() { a("f gets_int_int0b"); }
  399. after(): gets_int_int1b() { a("f gets_int_int1b"); }
  400. after(): gets_int_int2b() { a("f gets_int_int2b"); }
  401. after(): gets_int_int3b() { a("f gets_int_int3b"); }
  402. after(): sets_int_int0() { a("f sets_int_int0"); }
  403. after(): sets_int_int1() { a("f sets_int_int1"); }
  404. after(): sets_int_int2() { a("f sets_int_int2"); }
  405. after(): sets_int_int3() { a("f sets_int_int3"); }
  406. after(): sets_int_int0b() { a("f sets_int_int0b"); }
  407. after(): sets_int_int1b() { a("f sets_int_int1b"); }
  408. after(): sets_int_int2b() { a("f sets_int_int2b"); }
  409. after(): sets_int_int3b() { a("f sets_int_int3b"); }
  410. after(): sets_int_int0c() { a("f sets_int_int0c"); }
  411. after(): sets_int_int1c() { a("f sets_int_int1c"); }
  412. after(): sets_int_int2c() { a("f sets_int_int2c"); }
  413. after(): sets_int_int3c() { a("f sets_int_int3c"); }
  414. after(): gets_int_sint0() { a("f gets_int_sint0"); }
  415. after(): gets_int_sint1() { a("f gets_int_sint1"); }
  416. after(): gets_int_sint2() { a("f gets_int_sint2"); }
  417. after(): gets_int_sint3() { a("f gets_int_sint3"); }
  418. after(): gets_int_sint0b() { a("f gets_int_sint0b"); }
  419. after(): gets_int_sint1b() { a("f gets_int_sint1b"); }
  420. after(): gets_int_sint2b() { a("f gets_int_sint2b"); }
  421. after(): gets_int_sint3b() { a("f gets_int_sint3b"); }
  422. after(): sets_int_sint0() { a("f sets_int_sint0"); }
  423. after(): sets_int_sint1() { a("f sets_int_sint1"); }
  424. after(): sets_int_sint2() { a("f sets_int_sint2"); }
  425. after(): sets_int_sint3() { a("f sets_int_sint3"); }
  426. after(): sets_int_sint0b() { a("f sets_int_sint0b"); }
  427. after(): sets_int_sint1b() { a("f sets_int_sint1b"); }
  428. after(): sets_int_sint2b() { a("f sets_int_sint2b"); }
  429. after(): sets_int_sint3b() { a("f sets_int_sint3b"); }
  430. after(): sets_int_sint0c() { a("f sets_int_sint0c"); }
  431. after(): sets_int_sint1c() { a("f sets_int_sint1c"); }
  432. after(): sets_int_sint2c() { a("f sets_int_sint2c"); }
  433. after(): sets_int_sint3c() { a("f sets_int_sint3c"); }
  434. //end-afters
  435. }
  436. class Ints {
  437. static void m(String s) { Tester.expectEvent(s); }
  438. static void add() {
  439. m("b gets_int_int0"); m("f gets_int_int0"); m("a gets_int_int0");
  440. m("b gets_int_int1"); m("f gets_int_int1"); m("a gets_int_int1");
  441. m("b gets_int_int2"); m("f gets_int_int2"); m("a gets_int_int2");
  442. m("b gets_int_int3"); m("f gets_int_int3"); m("a gets_int_int3");
  443. m("b gets_int_int0b"); m("f gets_int_int0b"); m("a gets_int_int0b");
  444. m("b gets_int_int1b"); m("f gets_int_int1b"); m("a gets_int_int1b");
  445. m("b gets_int_int2b"); m("f gets_int_int2b"); m("a gets_int_int2b");
  446. m("b gets_int_int3b"); m("f gets_int_int3b"); m("a gets_int_int3b");
  447. m("b sets_int_int0"); m("f sets_int_int0"); m("a sets_int_int0");
  448. m("b sets_int_int1"); m("f sets_int_int1"); m("a sets_int_int1");
  449. m("b sets_int_int2"); m("f sets_int_int2"); m("a sets_int_int2");
  450. m("b sets_int_int3"); m("f sets_int_int3"); m("a sets_int_int3");
  451. m("b sets_int_int0b"); m("f sets_int_int0b"); m("a sets_int_int0b");
  452. m("b sets_int_int1b"); m("f sets_int_int1b"); m("a sets_int_int1b");
  453. m("b sets_int_int2b"); m("f sets_int_int2b"); m("a sets_int_int2b");
  454. m("b sets_int_int3b"); m("f sets_int_int3b"); m("a sets_int_int3b");
  455. m("b sets_int_int0c"); m("f sets_int_int0c"); m("a sets_int_int0c");
  456. m("b sets_int_int1c"); m("f sets_int_int1c"); m("a sets_int_int1c");
  457. m("b sets_int_int2c"); m("f sets_int_int2c"); m("a sets_int_int2c");
  458. m("b sets_int_int3c"); m("f sets_int_int3c"); m("a sets_int_int3c");
  459. m("b gets_int_sint0"); m("f gets_int_sint0"); m("a gets_int_sint0");
  460. m("b gets_int_sint1"); m("f gets_int_sint1"); m("a gets_int_sint1");
  461. m("b gets_int_sint2"); m("f gets_int_sint2"); m("a gets_int_sint2");
  462. m("b gets_int_sint3"); m("f gets_int_sint3"); m("a gets_int_sint3");
  463. m("b gets_int_sint0b"); m("f gets_int_sint0b"); m("a gets_int_sint0b");
  464. m("b gets_int_sint1b"); m("f gets_int_sint1b"); m("a gets_int_sint1b");
  465. m("b gets_int_sint2b"); m("f gets_int_sint2b"); m("a gets_int_sint2b");
  466. m("b gets_int_sint3b"); m("f gets_int_sint3b"); m("a gets_int_sint3b");
  467. m("b sets_int_sint0"); m("f sets_int_sint0"); m("a sets_int_sint0");
  468. m("b sets_int_sint1"); m("f sets_int_sint1"); m("a sets_int_sint1");
  469. m("b sets_int_sint2"); m("f sets_int_sint2"); m("a sets_int_sint2");
  470. m("b sets_int_sint3"); m("f sets_int_sint3"); m("a sets_int_sint3");
  471. m("b sets_int_sint0b"); m("f sets_int_sint0b"); m("a sets_int_sint0b");
  472. m("b sets_int_sint1b"); m("f sets_int_sint1b"); m("a sets_int_sint1b");
  473. m("b sets_int_sint2b"); m("f sets_int_sint2b"); m("a sets_int_sint2b");
  474. m("b sets_int_sint3b"); m("f sets_int_sint3b"); m("a sets_int_sint3b");
  475. m("b sets_int_sint0c"); m("f sets_int_sint0c"); m("a sets_int_sint0c");
  476. m("b sets_int_sint1c"); m("f sets_int_sint1c"); m("a sets_int_sint1c");
  477. m("b sets_int_sint2c"); m("f sets_int_sint2c"); m("a sets_int_sint2c");
  478. m("b sets_int_sint3c"); m("f sets_int_sint3c"); m("a sets_int_sint3c");
  479. }
  480. }