String (@NotNull String urlArgument) { try { final URI proxyUri = new URI(urlArgument); final String credentials = proxyUri.getUserInfo(); if (credentials != null) { final int colonIndex = credentials.indexOf(":"); if (colonIndex >= 0) { final String login = credentials.substring(0, colonIndex); final String password = credentials.substring(colonIndex + 1); final String maskedPassword = StringUtil.repeatSymbol('*', password.length()); final String maskedCredentials = login + ":" + maskedPassword; if (urlArgument.contains(credentials)) { return urlArgument.replaceFirst(Pattern.quote(credentials), maskedCredentials); } else { final String encodedCredentials = PyPackageRepositoryUtil.encodeCredentialsForUrl(login, password); return urlArgument.replaceFirst(Pattern.quote(encodedCredentials), maskedCredentials); } } } } catch (URISyntaxException ignored) { } return urlArgument; }