Buggy code:
public class RemoveFailedNodeMessageClass extends ZWaveCommandProcessor { private static final Logger logger = LoggerFactory . getLogger ( RemoveFailedNodeMessageClass . class ) ; private final int FAILED_NODE_REMOVE_STARTED = 0 ; private final int FAILED_NODE_NOT_PRIMARY_CONTROLLER = 2 ; private final int FAILED_NODE_NO_CALLBACK_FUNCTION = 4 ; private final int FAILED_NODE_NOT_FOUND = 8 ; private final int FAILED_NODE_REMOVE_PROCESS_BUSY = 16 ; private final int FAILED_NODE_REMOVE_FAIL = 32 ; private final int FAILED_NODE_OK = 0 ; private final int FAILED_NODE_REMOVED = 1 ; private final int FAILED_NODE_NOT_REMOVED = 2 ; public SerialMessage doRequest ( int nodeId ) { } @ Override public boolean handleResponse ( ZWaveController zController , SerialMessage lastSentMessage , SerialMessage incomingMessage ) { RemoveFailedNodeMessageClass . logger . debug ( "Got<seq2seq4repair_space>RemoveFailedNode<seq2seq4repair_space>response." ) ; int nodeId = lastSentMessage . getMessagePayloadByte ( 0 ) ; <START_BUG> switch ( incomingMessage . getMessagePayloadByte ( 1 ) ) { <END_BUG> case FAILED_NODE_REMOVE_STARTED : RemoveFailedNodeMessageClass . logger . debug ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>successfully<seq2seq4repair_space>placed<seq2seq4repair_space>on<seq2seq4repair_space>stack." , nodeId ) ; break ; case FAILED_NODE_NOT_PRIMARY_CONTROLLER : RemoveFailedNodeMessageClass . logger . error ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>failed<seq2seq4repair_space>as<seq2seq4repair_space>not<seq2seq4repair_space>Primary<seq2seq4repair_space>Controller<seq2seq4repair_space>for<seq2seq4repair_space>node!" , nodeId ) ; transactionComplete = true ; break ; case FAILED_NODE_NO_CALLBACK_FUNCTION : RemoveFailedNodeMessageClass . logger . error ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>failed<seq2seq4repair_space>as<seq2seq4repair_space>no<seq2seq4repair_space>callback<seq2seq4repair_space>function!" , nodeId ) ; transactionComplete = true ; break ; case FAILED_NODE_NOT_FOUND : RemoveFailedNodeMessageClass . logger . error ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>failed<seq2seq4repair_space>as<seq2seq4repair_space>node<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>on<seq2seq4repair_space>controllers<seq2seq4repair_space>failed<seq2seq4repair_space>list!" , nodeId ) ; transactionComplete = true ; break ; case FAILED_NODE_REMOVE_PROCESS_BUSY : RemoveFailedNodeMessageClass . logger . error ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>failed<seq2seq4repair_space>as<seq2seq4repair_space>Controller<seq2seq4repair_space>Busy!" , nodeId ) ; transactionComplete = true ; break ; case FAILED_NODE_REMOVE_FAIL : RemoveFailedNodeMessageClass . logger . error ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>failed!" , nodeId ) ; transactionComplete = true ; break ; default : RemoveFailedNodeMessageClass . logger . error ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Remove<seq2seq4repair_space>failed<seq2seq4repair_space>node<seq2seq4repair_space>not<seq2seq4repair_space>placed<seq2seq4repair_space>on<seq2seq4repair_space>stack<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>error<seq2seq4repair_space>0x{}." , nodeId , Integer . toHexString ( incomingMessage . getMessagePayloadByte ( 0 ) ) ) ; transactionComplete = true ; break ; } return true ; } @ Override public boolean handleRequest ( ZWaveController zController , SerialMessage lastSentMessage , SerialMessage incomingMessage ) { } }

Fix:
switch ( incomingMessage . getMessagePayloadByte ( 0 ) ) {