Source:
<code>public void sendRequest(final Exchange exchange, final Request request) { Request requestToSend = request; if (isBertEnabled) { Request firstRequest = request; if (isTransparentBlockwiseHandlingEnabled()) { BlockOption block2 = request.getOptions().getBlock2(); if (block2 != null && block2.getNum() > 0) { LOGGER.fine("outbound request contains block2 option, creating random-access blockwise status"); addRandomAccessBlock2Status(exchange, request); handleRandomBlockAccess(exchange, request, block2.getNum()); } else if (requiresBlockwise(request)) { ByteBuffer requestBuilder = ByteBuffer.allocate(bertStepSize * BERT_INT_BLOCK_SIZE); boolean hasNextBlock = true; KeyUri key = getKey(exchange, request); <START> firstRequest = startBlockwiseUpload(exchange, request); <END> requestBuilder.put(firstRequest.getPayload()); Block1BlockwiseStatus status = getBlock1Status(key); for (int i = 1; ((i < bertStepSize) && (hasNextBlock)); i++) { status.setCurrentNum(i); requestToSend = status.getNextRequestBlock(); requestBuilder.put(requestToSend.getPayload()); hasNextBlock = requestToSend.getOptions().getBlock1().isM(); } firstRequest.setPayload(getBody(requestBuilder)); firstRequest.getOptions().setBlock1(BERT_SZX, hasNextBlock, 0); exchange.setCurrentRequest(firstRequest); lower().sendRequest(exchange, firstRequest); } else { exchange.setCurrentRequest(requestToSend); lower().sendRequest(exchange, requestToSend); } } else { exchange.setCurrentRequest(requestToSend); lower().sendRequest(exchange, requestToSend); } } else { super.sendRequest(exchange, requestToSend); } }</code><technical_language>firstRequest is this scope, I consider move line 206 > Request firstRequest = request; this block</technical_language>

Target:
public void sendRequest(final Exchange exchange, final Request request) { Request requestToSend = request; if (isBertEnabled) { if (isTransparentBlockwiseHandlingEnabled()) { BlockOption block2 = request.getOptions().getBlock2(); if (block2 != null && block2.getNum() > 0) { LOGGER.fine("outbound request contains block2 option, creating random-access blockwise status"); addRandomAccessBlock2Status(exchange, request); handleRandomBlockAccess(exchange, request, block2.getNum()); } else if (requiresBlockwise(request)) { ByteBuffer requestBuilder = ByteBuffer.allocate(bertStepSize * BERT_INT_BLOCK_SIZE); boolean hasNextBlock = true; KeyUri key = getKey(exchange, request); Request firstRequest = startBlockwiseUpload(exchange, request); requestBuilder.put(firstRequest.getPayload()); Block1BlockwiseStatus status = getBlock1Status(key); for (int i = 1; ((i < bertStepSize) && (hasNextBlock)); i++) { status.setCurrentNum(i); requestToSend = status.getNextRequestBlock(); requestBuilder.put(requestToSend.getPayload()); hasNextBlock = requestToSend.getOptions().getBlock1().isM(); } firstRequest.setPayload(getBody(requestBuilder)); firstRequest.getOptions().setBlock1(BERT_SZX, hasNextBlock, 0); exchange.setCurrentRequest(firstRequest); lower().sendRequest(exchange, firstRequest); } else { exchange.setCurrentRequest(requestToSend); lower().sendRequest(exchange, requestToSend); } } else { exchange.setCurrentRequest(requestToSend); lower().sendRequest(exchange, requestToSend); } } else { super.sendRequest(exchange, requestToSend); } }