Source:
<code>public short readHeader(Transport transport, HeaderParams params) { short magic = transport.readByte(); final Log localLog = getLog(); <START> boolean isTrace = localLog.isTraceEnabled(); <END> if (magic != HotRodConstants.RESPONSE_MAGIC) { String message = "Invalid magic number. Expected %#x and received %#x"; localLog.invalidMagicNumber(HotRodConstants.RESPONSE_MAGIC, magic); if (isTrace) localLog.tracef("Socket dump: %s", hexDump(transport.dumpStream())); throw new InvalidResponseException(String.format(message, HotRodConstants.RESPONSE_MAGIC, magic)); } long receivedMessageId = transport.readVLong(); if (receivedMessageId != params.messageId && receivedMessageId != 0) { String message = "Invalid message id. Expected %d and received %d"; localLog.invalidMessageId(params.messageId, receivedMessageId); if (isTrace) localLog.tracef("Socket dump: %s", hexDump(transport.dumpStream())); throw new InvalidResponseException(String.format(message, params.messageId, receivedMessageId)); } localLog.tracef("Received response for message id: %d", receivedMessageId); short receivedOpCode = transport.readByte(); short status = transport.readByte(); readNewTopologyIfPresent(transport, params); if (receivedOpCode != params.opRespCode) { if (receivedOpCode == HotRodConstants.ERROR_RESPONSE) { checkForErrorsInResponseStatus(transport, params, status); } throw new InvalidResponseException(String.format( "Invalid response operation. Expected %#x and received %#x", params.opRespCode, receivedOpCode)); } localLog.tracef("Received operation code is: %#04x", receivedOpCode); return status; }</code><technical_language>instance variable</technical_language>

Target:
public short readHeader(Transport transport, HeaderParams params) { short magic = transport.readByte(); final Log localLog = getLog(); if (magic != HotRodConstants.RESPONSE_MAGIC) { String message = "Invalid magic number. Expected %#x and received %#x"; localLog.invalidMagicNumber(HotRodConstants.RESPONSE_MAGIC, magic); if (trace) localLog.tracef("Socket dump: %s", hexDump(transport.dumpStream())); throw new InvalidResponseException(String.format(message, HotRodConstants.RESPONSE_MAGIC, magic)); } long receivedMessageId = transport.readVLong(); if (receivedMessageId != params.messageId && receivedMessageId != 0) { String message = "Invalid message id. Expected %d and received %d"; localLog.invalidMessageId(params.messageId, receivedMessageId); if (trace) localLog.tracef("Socket dump: %s", hexDump(transport.dumpStream())); throw new InvalidResponseException(String.format(message, params.messageId, receivedMessageId)); } if (trace) localLog.tracef("Received response for message id: %d", receivedMessageId); short receivedOpCode = transport.readByte(); short status = transport.readByte(); readNewTopologyIfPresent(transport, params); if (receivedOpCode != params.opRespCode) { if (receivedOpCode == HotRodConstants.ERROR_RESPONSE) { checkForErrorsInResponseStatus(transport, params, status); } throw new InvalidResponseException(String.format( "Invalid response operation. Expected %#x and received %#x", params.opRespCode, receivedOpCode)); } if (trace) localLog.tracef("Received operation code is: %#04x", receivedOpCode); return status; }