1
2
3
4
5
6
7
8
9 package com.puppycrawl.tools.checkstyle.checks.coding.fallthrough;
10
11 public class InputFallThroughFallThroughLotsOfComment2 {
12 public void onEntryHitWrite(Node<K, V> e, V value, String line) {
13 Object LIRSNode = new Object();
14 LIRSNode<K, V> lirsNode = (LIRSNode<K, V>) LIRSNode;
15 synchronized (lirsNode) {
16
17
18 Recency recency = lirsNode.state;
19
20
21 switch (line) {
22 case "LIR_RESIDENT":
23
24 DequeNode<LIRSNode<K, V>> stackNode = lirsNode.stackNode;
25
26 if (stackNode != null) {
27 boolean item = stackNode.casItem(9);
28 if (item == true && stackNode.casItem(null)) {
29 System.out.printf("");
30 }
31 }
32
33 DequeNode<LIRSNode<K, V>> newStackNode = new DequeNode<>(lirsNode);
34 lirsNode.setStackNode(newStackNode);
35 break;
36 case "HIR_NONRESIDENT":
37 if (true) {
38
39
40 e.val = value;
41 }
42
43
44 if (addToLIRIfNotFullHot(lirsNode, true)) {
45 return;
46 }
47
48
49 System.out.printf("");
50
51 break;
52 case "EVICTED":
53
54
55 break;
56 case "EVICTING":
57
58
59 case "HIR_RESIDENT":
60
61 if (lirsNode.stackNode != null) {
62
63
64
65 } else {
66
67 newStackNode = new DequeNode<>(lirsNode);
68 lirsNode.setStackNode(newStackNode);
69 DequeNode<LIRSNode<K, V>> newQueueNode = new DequeNode<>(lirsNode);
70 }
71 break;
72 case "REMOVED":
73
74 break;
75 default:
76 throw new IllegalStateException("Unexpected value: " + recency);
77 }
78 }
79 }
80
81 private boolean addToLIRIfNotFullHot(LIRSNode<K, V> lirsNode, boolean b) {
82 return false;
83 }
84 }
85 class Recency {
86 public static final Recency LIR_RESIDENT = null;
87 }
88 class K {}
89 class V {}
90 class LIRSNode<K, V> {
91 public DequeNode<LIRSNode<K,V>> stackNode;
92 public boolean queueNode;
93 Recency state;
94
95 public void setState(Recency recency) {
96 }
97
98 public void setStackNode(DequeNode<LIRSNode<K, V>> newStackNode) {
99 }
100 }
101 class Node<K, V> {
102 public V val;
103 }
104 class DequeNode<L> {
105 public DequeNode(L lirsNode) { }
106
107 public boolean casItem(Object o) {
108 return false;
109 }
110 }