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.

InsertLocalVariable.java 956B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. package test5;
  2. public class InsertLocalVariable {
  3. int k;
  4. public InsertLocalVariable() {
  5. k = 1;
  6. }
  7. public int test() {
  8. foo(0, 0, 0);
  9. return k;
  10. }
  11. public void foo(int i /* 0 */, int j /* 1 */, int k /* 2 */) {
  12. boolean bI = false; /* 0 */
  13. int l = 0; /* 3 */
  14. if (l == 0) {
  15. this.k = -1;
  16. return;
  17. }
  18. try {
  19. boolean bJ = true; /* 1 */
  20. if (!bJ) {
  21. throw new Exception();
  22. }
  23. } catch (Exception e /* 0 */) {
  24. int m = 0; /* 4 */
  25. l += m;
  26. if (bI) {
  27. int n = 0; /* 5 */
  28. l += n;
  29. }
  30. for (boolean bK = false /* 2 */; l == 3;) {
  31. if (bK) {
  32. int o = 0; /* 6 */
  33. l += o;
  34. }
  35. }
  36. while (l == 4) {
  37. int p = 0; /* 7 */
  38. l += p;
  39. }
  40. do {
  41. int q = 0; /* 8 */
  42. l += q;
  43. } while (false);
  44. switch (l) {
  45. case 6:
  46. int r = 0; /* 9 */
  47. l += r;
  48. }
  49. }
  50. int s = 0; /* 10 */
  51. this.k += i;
  52. this.k += j;
  53. this.k += k;
  54. this.k += l;
  55. this.k += s;
  56. }
  57. }