1 package com.puppycrawl.tools.checkstyle.checks.sizes.executablestatementcount;
2
3 public class InputExecutableStatementCount {
4 public void foo() {
5 while (true) {
6 Runnable runnable = new Runnable() {
7 public void run() {
8 while (true) {
9 }
10 }
11 };
12
13 new Thread(runnable).start();
14 }
15 }
16
17 public void bar() {
18 if (System.currentTimeMillis() == 0) {
19 if (System.currentTimeMillis() == 0 && System.currentTimeMillis() == 0) {
20 }
21
22 if (System.currentTimeMillis() == 0 || System.currentTimeMillis() == 0) {
23 }
24 }
25 }
26
27 public void simpleElseIf() {
28 if (System.currentTimeMillis() == 0) {
29 } else if (System.currentTimeMillis() == 0) {
30 } else {
31 }
32 }
33
34 public void stupidElseIf() {
35 if (System.currentTimeMillis() == 0) {
36 } else {
37 if (System.currentTimeMillis() == 0) {
38 } else {
39 if (System.currentTimeMillis() == 0) {
40 }
41 }
42
43 if (System.currentTimeMillis() == 0) {
44 }
45 }
46 }
47
48 public InputExecutableStatementCount()
49 {
50 int i = 1;
51 if (System.currentTimeMillis() == 0) {
52 } else if (System.currentTimeMillis() == 0) {
53 } else {
54 }
55 }
56
57
58 static {
59 int i = 1;
60 if (System.currentTimeMillis() == 0) {
61 } else if (System.currentTimeMillis() == 0) {
62 } else {
63 }
64 }
65
66
67 {
68 int i = 1;
69 if (System.currentTimeMillis() == 0) {
70 } else if (System.currentTimeMillis() == 0) {
71 } else {
72 }
73 }
74
75
76 public InputExecutableStatementCount(int aParam)
77 {
78 Runnable runnable = new Runnable() {
79 public void run() {
80 while (true) {
81 }
82 }
83 };
84 new Thread(runnable).start();
85 }
86
87
88 public InputExecutableStatementCount(String someString) {}
89
90 static Runnable r1 = () -> {
91 String.valueOf("Hello world one!");
92 };
93 }