Source:
<code>public PaasManagerUser authenticationFiware(String token, String tenantId) { String keystoneURL = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_URL); String adminUser = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_USER); String adminPass = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_PASS); String adminTenant = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_TENANT); String thresholdString = Configuration.VALIDATION_TIME_THRESHOLD; DefaultHttpClient httpClient = new DefaultHttpClient(); configureOpenStackAuthenticationToken(keystoneURL, adminUser, adminPass, adminTenant, thresholdString, httpClient); String[] credential = oSAuthToken.getCredentials(); log.debug("Keystone URL : " + keystoneURL); log.debug("adminToken : " + credential[0]); AuthenticateResponse authenticateResponse; try { authenticateResponse = adminTokenCache.getAuthenticateResponse(credential[0]); Response response; if (authenticateResponse == null) { WebTarget webResource = client.target(keystoneURL); WebTarget tokens = webResource.path("tokens").path(token); Invocation.Builder builder = tokens.request(); response = builder.accept(MediaType.APPLICATION_XML).header("X-Auth-Token", credential[0]).get(); authenticateResponse = response.readEntity(AuthenticateResponse.class); <START> if (response.getStatus() == 200) { <END> adminTokenCache.put(credential[0], authenticateResponse); } else { log.warn("response status:" + response.getStatus()); if ((response.getStatus() == CODE_403) || (response.getStatus() == CODE_404)) { throw new BadCredentialsException("Token not valid"); } throw new AuthenticationServiceException("Token not valid"); } } return validateUserToken(token, tenantId, authenticateResponse); } catch (Exception e) { throw new AuthenticationServiceException("Unknown problem", e); } }</code><technical_language>CODE_200</technical_language>

Target:
public PaasManagerUser authenticationFiware(String token, String tenantId) { String keystoneURL = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_URL); String adminUser = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_USER); String adminPass = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_PASS); String adminTenant = systemPropertiesProvider.getProperty(SystemPropertiesProvider.KEYSTONE_TENANT); String thresholdString = Configuration.VALIDATION_TIME_THRESHOLD; DefaultHttpClient httpClient = new DefaultHttpClient(); configureOpenStackAuthenticationToken(keystoneURL, adminUser, adminPass, adminTenant, thresholdString, httpClient); String[] credential = oSAuthToken.getCredentials(); log.debug("Keystone URL : " + keystoneURL); log.debug("adminToken : " + credential[0]); AuthenticateResponse authenticateResponse; try { authenticateResponse = adminTokenCache.getAuthenticateResponse(credential[0]); Response response; if (authenticateResponse == null) { WebTarget webResource = client.target(keystoneURL); WebTarget tokens = webResource.path("tokens").path(token); Invocation.Builder builder = tokens.request(); response = builder.accept(MediaType.APPLICATION_XML).header("X-Auth-Token", credential[0]).get(); authenticateResponse = response.readEntity(AuthenticateResponse.class); if (response.getStatus() == CODE_200) { adminTokenCache.put(credential[0], authenticateResponse); } else { log.warn("response status:" + response.getStatus()); if ((response.getStatus() == CODE_403) || (response.getStatus() == CODE_404)) { throw new BadCredentialsException("Token not valid"); } throw new AuthenticationServiceException("Token not valid"); } } return validateUserToken(token, tenantId, authenticateResponse); } catch (Exception e) { throw new AuthenticationServiceException("Unknown problem", e); } }