@Override
    public String perform(String[] args, String data, Map<String, Map<String, String>> replacementsMap) {
      if (data == null) {
        return null;
      }
      final int semicolonIndex = data.indexOf(":");
      return semicolonIndex == -1 ? data : data.substring(0, semicolonIndex);
    }
Strips out the port (if any) from a URL assuming the following input data layout
<code>host[:port]</code>
ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelper.java