1 package com.puppycrawl.tools.checkstyle.checks.indentation.commentsindentation;
2
3
4
5
6
7
8
9 public class InputCommentsIndentationCommentIsAtTheEndOfBlock {
10
11 public void foo1() {
12 foo2();
13
14 }
15
16 public void foo2() {
17 foo3();
18
19 }
20
21 public void foo3() {
22 foo2();
23
24 }
25
26 public void foo4() {
27 foooooooooooooooooooooooooooooooooooooooooo();
28
29 }
30
31 public void foooooooooooooooooooooooooooooooooooooooooo() { }
32
33
34
35 public void foo7() {
36 int a = 0;
37
38 }
39
40
41
42 public void foo8() {}
43
44 public class TestClass {
45 public void test() {
46 int a = 0;
47
48 }
49
50 }
51
52 public void foo9() {
53 this.foo1();
54
55 }
56
57
58
59
60
61 public void foo11() {
62 String
63 .valueOf(new Integer(0))
64 .trim()
65 .length();
66
67 }
68
69 public void foo12() {
70 String
71 .valueOf(new Integer(0))
72 .trim()
73 .length();
74
75 }
76
77 public void foo13() {
78 String.valueOf(new Integer(0))
79 .trim()
80 .length();
81
82 }
83
84 public void foo14() {
85 String.valueOf(new Integer(0))
86 .trim()
87 .length();
88
89 }
90
91 public void foo15() {
92 String
93 .valueOf(new Integer(0));
94
95 }
96
97 public void foo16() {
98 String
99 .valueOf(new Integer(0));
100
101 }
102
103 public void foo17() {
104 String
105 .valueOf(new Integer(0))
106 .trim()
107
108 .length();
109 }
110
111 public void foo18() {
112 String
113 .valueOf(new Integer(0))
114 .trim()
115
116 .length();
117 }
118
119 public void foo19() {
120 (new Thread(new Runnable() {
121 @Override
122 public void run() {
123
124 }
125 })).
126 run();
127
128 }
129
130 public void foo20() {
131 (new Thread(new Runnable() {
132 @Override
133 public void run() {
134
135 }
136 })).
137 run();
138
139 }
140
141 public void foo21() {
142 int[] array = new int[5];
143
144 java.util.List<String> expected = new java.util.ArrayList<>();
145 for (int i = 0; i < 5; i++) {
146 org.junit.Assert.assertEquals(expected.get(i), array[i]);
147 }
148 String s = String.format(java.util.Locale.ENGLISH, "The array element "
149 + "immediately following the end of the collection should be nulled",
150 array[1]);
151
152 }
153
154 public void foo22() {
155 int[] array = new int[5];
156
157 java.util.List<String> expected = new java.util.ArrayList<>();
158 for (int i = 0; i < 5; i++) {
159 org.junit.Assert.assertEquals(expected.get(i), array[i]);
160 }
161 String s = String.format(java.util.Locale.ENGLISH, "The array element "
162 + "immediately following the end of the collection should be nulled",
163 array[1]);
164
165 }
166
167 public void foo23() {
168 new Object();
169
170 }
171
172 public void foo24() {
173 new Object();
174
175 }
176
177 public String foo25() {
178 return String.format(java.util.Locale.ENGLISH, "%d",
179 1);
180
181 }
182
183 public String foo26() {
184 return String.format(java.util.Locale.ENGLISH, "%d",
185 1);
186
187 }
188
189 public void foo27() {
190
191
192 foo17();
193
194
195 }
196
197 public String foo28() {
198 int a = 5;
199 return String.format(java.util.Locale.ENGLISH, "%d",
200 1);
201
202 }
203
204 public String foo29() {
205 int a = 5;
206 return String.format(java.util.Locale.ENGLISH, "%d",
207 1);
208
209 }
210
211 public void foo30() {
212
213 int a = 5;
214
215 }
216
217 public void foo31() {
218 String s = new String ("A"
219 + "B"
220 + "C");
221
222 }
223
224 public void foo32() {
225 String s = new String ("A"
226 + "B"
227 + "C");
228
229 }
230
231 public void foo33() {
232
233 this.foo22();
234
235 }
236
237 public void foo34() throws Exception {
238 throw new Exception("",
239 new Exception()
240 );
241
242 }
243
244 public void foo35() throws Exception {
245 throw new Exception("",
246 new Exception()
247 );
248
249 }
250
251 public void foo36() throws Exception {
252 throw new Exception("",
253 new Exception()
254 );
255
256 }
257
258 public void foo37() throws Exception {
259 throw new Exception("", new Exception());
260
261 }
262
263 public void foo38() throws Exception {
264 throw new Exception("", new Exception());
265
266 }
267
268 public void foo39() throws Exception {
269 throw new Exception("",
270 new Exception());
271
272 }
273
274 public void foo40() throws Exception {
275 int a = 88;
276 throw new Exception("", new Exception());
277
278 }
279
280 public void foo41() throws Exception {
281 int a = 88;
282 throw new Exception("", new Exception());
283
284 }
285
286 public void foo42() {
287 int a = 5;
288 if (a == 5) {
289 int b;
290
291 } else if (a ==6) {
292
293 }
294 }
295
296 public void foo43() {
297 try {
298 int a;
299
300 } catch (Exception e) {
301
302 }
303 }
304
305 public void foo44() {
306 int ar = 5;
307
308 ar = 6;
309
310 }
311
312 public void foo45() {
313 int ar = 5;
314
315 ar = 6;
316
317 }
318
319 public void foo46() {
320
321
322
323 }
324
325 public void foo47() {
326 int a = 5;
327
328
329
330 }
331
332 public void foo48() {
333 int a = 5;
334
335
336
337 }
338
339 public void foo49() {
340
341
342
343 }
344
345 public void foo50() {
346 return;
347
348
349 }
350
351 public String foo51() {
352 return String
353 .valueOf("11"
354 );
355
356 }
357
358 public String foo52() {
359 return String
360 .valueOf("11"
361 );
362
363 }
364
365 void foo53() {
366
367 new Object()
368 .toString();
369
370 }
371
372 void foo54() {
373
374 new Object()
375 .toString();
376
377 }
378
379 void foo55() {
380
381 new Object()
382 .toString();
383
384 }
385
386 void foo56() {
387 new Object().toString();
388
389 }
390
391 void foo57() {
392 new Object().toString();
393
394 }
395
396 void foo58() {
397
398
399
400
401 foo1();
402
403 }
404
405 void foo59() {
406 foo1();
407
408
409
410 }
411
412
413 void foo61() {
414 foo1();
415
416
417
418
419
420
421 }
422
423 void foo62() {
424 if (true) {
425 String.CASE_INSENSITIVE_ORDER.equals("");
426 }
427 else {
428
429 }
430
431
432
433
434
435
436 }
437
438 void foo63() {
439 try {
440 String.CASE_INSENSITIVE_ORDER.equals("");
441 }
442 catch (Exception e){
443
444 }
445
446
447
448
449
450
451
452 }
453
454 void foo64() {
455 foo1();
456
457
458 }
459
460 void foo65() {
461 int i = 1
462 + 1
463 + 1;
464
465
466 }
467
468 void foo66() {
469 if (true) {
470 getClass();
471 }
472
473
474 }
475
476 void foo67() {
477 try {
478 getClass();
479 } finally {
480 hashCode();
481 }
482
483
484 }
485
486 void foo68() {
487 for (int i = 0; i < 0; i++) {
488 getClass();
489 }
490
491
492 }
493
494 void foo69() {
495 while (true) {
496 getClass();
497 }
498
499
500 }
501
502 void foo70() {
503 do {
504 getClass();
505 } while (true);
506
507
508 }
509
510 void foo71() {
511 switch("") {
512 case "!":
513 break;
514 default:
515 break;
516 }
517
518
519 }
520
521 void foo72() {
522 int u = 1;
523
524
525
526 }
527
528 void foo73() {
529 class Foo { }
530
531
532
533 }
534
535 interface Bar1 {
536 interface NestedBar { }
537
538
539 }
540
541 static class Bar2 {
542 enum Foo {
543 A;
544 }
545
546
547 }
548
549 static class Bar3 {
550 @interface Foo { }
551
552 }
553
554 void foo74() {
555 getClass();
556
557
558 }
559
560 void foo75() {
561 getClass();
562
563
564 }
565
566 void InputCommentsIndentationCommentIsAtTheEndOfBlock(String s) {
567 assert(s == null ||
568 s != null);
569
570
571 }
572
573 int foo76() {
574 return 0;
575
576
577
578 }
579
580 void foo77() {
581 try {
582 } catch(Exception e) {
583 }
584 }
585
586
587 }
588