Buggy code:
public class KeystoneAuthentication extends HTTPAuthentication { private static final Logger LOGGER = LoggerFactory . getLogger ( KeystoneAuthentication . class ) ; public static final String IDENTIFIER = "OCCIKeystoneAuthentication" ; private static final String HEADER_AUTH = "Www-Authenticate" ; private static final String HEADER_X_AUTH_TOKEN = "X-Auth-Token" ; private static final String GROUP_URI = "uri" ; private static final String REGEXP_KEYSTONE_URI = ( "^(?:Keystone|snf-auth)<seq2seq4repair_space>uri='(?<" + ( KeystoneAuthentication . GROUP_URI ) ) + ">.+)'$" ; private static final Pattern PATTERN_KEYSTONE_URI = Pattern . compile ( KeystoneAuthentication . REGEXP_KEYSTONE_URI ) ; private static final String PATH_DEFAULT = "//v2.0" ; private final HTTPAuthentication originalAuthentication ; private CloseableHttpResponse originalResponse = null ; private String authToken = null ; public KeystoneAuthentication ( HTTPAuthentication originalAuthentication ) { } public CloseableHttpResponse getOriginalResponse ( ) { } public void setOriginalResponse ( CloseableHttpResponse response ) { } @ Override public String getIdentifier ( ) { } @ Override public Authentication getFallback ( ) { } private void checkResponse ( ) throws AuthenticationException { } @ Override public void authenticate ( ) throws CommunicationException { checkResponse ( ) ; Matcher matcher = KeystoneAuthentication . PATTERN_KEYSTONE_URI . matcher ( originalResponse . getFirstHeader ( KeystoneAuthentication . HEADER_AUTH ) . getValue ( ) ) ; if ( ! ( matcher . find ( ) ) ) { throw new AuthenticationException ( ( ( "incorrect<seq2seq4repair_space>" + ( KeystoneAuthentication . HEADER_AUTH ) ) + "<seq2seq4repair_space>content" ) ) ; } URI keystoneURI = URI . create ( matcher . group ( KeystoneAuthentication . GROUP_URI ) ) ; HttpHost target = new HttpHost ( keystoneURI . getHost ( ) , keystoneURI . getPort ( ) , keystoneURI . getScheme ( ) ) ; String path = keystoneURI . getPath ( ) ; <START_BUG> if ( ( path == null ) || ( path . equals ( "//" ) ) ) { <END_BUG> path = KeystoneAuthentication . PATH_DEFAULT ; } HTTPConnection connection = originalAuthentication . getConnection ( ) ; CloseableHttpClient client = connection . getClient ( ) ; HttpContext context = connection . getContext ( ) ; String response = authenticateAgainstKeystone ( target , path , client , context , null ) ; authToken = parseId ( response ) ; response = getTenants ( target , path , client , context ) ; tryTenants ( response , target , path , client , context ) ; KeystoneAuthentication . LOGGER . debug ( ( "Scoped<seq2seq4repair_space>token:<seq2seq4repair_space>" + ( authToken ) ) ) ; connection . addHeader ( new BasicHeader ( KeystoneAuthentication . HEADER_X_AUTH_TOKEN , authToken ) ) ; } private String authenticateAgainstKeystone ( HttpHost target , String path , CloseableHttpClient client , HttpContext context , String tenant ) throws CommunicationException { } private String getTenants ( HttpHost target , String path , CloseableHttpClient client , HttpContext context ) throws CommunicationException { } private void tryTenants ( String json , HttpHost target , String path , CloseableHttpClient client , HttpContext context ) throws AuthenticationException { } private String getRequestBody ( String tenant ) throws AuthenticationException { } private String parseId ( String json ) { } private Header [ ] getHeaders ( ) { } }

Fix:
if ( ( ( path == null ) || ( path . isEmpty ( ) ) ) || ( path . equals ( "//" ) ) ) {