Source:
<code>private String getPatentMetadata(ImportedPatent patent, String securityToken, int retryCount) throws Exception { if (retryCount > maxRetriesCount) { throw new PatentServiceException("number of maximum retries exceeded: " + maxRetriesCount); } HttpRequest httpRequest = buildPatentMetaRequest(patent, securityToken, opsUriRoot); HttpResponse httpResponse = httpClient.execute(opsHost, httpRequest); int statusCode = httpResponse.getStatusLine().getStatusCode(); switch (statusCode) { case 200: { HttpEntity entity = httpResponse.getEntity(); if (entity != null) { return EntityUtils.toString(entity); <START> } else { <END> throw new PatentServiceException("got empty response, full status: " + httpResponse.getStatusLine() + ", server response: " + EntityUtils.toString(httpResponse.getEntity())); } } case 400: { return getPatentMetadata(patent, reauthenticate(), ++retryCount); } case 403: { log.warn("got 403 HTTP code in response, potential reason: endpoint rate limit reached. Delaying for " + throttleSleepTime + " ms, server response: " + EntityUtils.toString(httpResponse.getEntity())); Thread.sleep(throttleSleepTime); return getPatentMetadata(patent, securityToken, ++retryCount); } case 404: { throw new NoSuchElementException("unable to find element at: " + httpRequest.getRequestLine()); } default: { String errMessage = "got unhandled HTTP status code when accessing endpoint: " + statusCode + ", full status: " + httpResponse.getStatusLine() + ", server response: " + EntityUtils.toString(httpResponse.getEntity()); throw new PatentServiceException(errMessage); } } }</code><technical_language>Else condition is necessary here</technical_language>

Target:
private String getPatentMetadata(ImportedPatent patent, String securityToken, int retryCount) throws Exception { if (retryCount > maxRetriesCount) { throw new PatentServiceException("number of maximum retries exceeded: " + maxRetriesCount); } HttpRequest httpRequest = buildPatentMetaRequest(patent, securityToken, opsUriRoot); HttpResponse httpResponse = httpClient.execute(opsHost, httpRequest); int statusCode = httpResponse.getStatusLine().getStatusCode(); switch (statusCode) { case 200: { HttpEntity entity = httpResponse.getEntity(); if (entity == null) { throw new PatentServiceException( "got empty entity in response, full status: " + httpResponse.getStatusLine()); } return EntityUtils.toString(entity); } case 400: { log.info("got 400 HTTP code in response, potential reason: access token invalid or expired"); return getPatentMetadata(patent, reauthenticate(), ++retryCount); } case 403: { log.warn("got 403 HTTP code in response, potential reason: endpoint rate limit reached. Delaying for " + throttleSleepTime + " ms, server response: " + EntityUtils.toString(httpResponse.getEntity())); Thread.sleep(throttleSleepTime); return getPatentMetadata(patent, securityToken, ++retryCount); } case 404: { throw new NoSuchElementException("unable to find element at: " + httpRequest.getRequestLine()); } default: { throw new PatentServiceException(String.format( "got unhandled HTTP status code when accessing endpoint: %d, full status: %s, server response: %s", statusCode, httpResponse.getStatusLine(), EntityUtils.toString(httpResponse.getEntity()))); } } }