String (@NotNull String shortName, @NotNull String address) { String pureAddress = address; int i = pureAddress.lastIndexOf("//"); if (i > 0 && i < pureAddress.length() - 2) { pureAddress = pureAddress.substring(i + 2); } return (pureAddress.equals(shortName) || !pureAddress.endsWith(shortName)) ? null : pureAddress; }