code: public static Map<String,String> expandProperties( Instance scopedInstance, Map<String,String> targetProperties ) {
  
  		Logger logger = Logger.getLogger( TargetHelpers.class.getName());
  		String ipAddress = scopedInstance.data.get( Instance.IP_ADDRESS );
  		if( ipAddress == null )
  			ipAddress = InstanceHelpers.findRootInstance( scopedInstance ).data.get( Instance.IP_ADDRESS );
  
  		if( ipAddress == null )
  			ipAddress = "";
  
  		Properties params = new Properties();
  		params.setProperty( Constants.SPECIFIC_VARIABLE_IP, ipAddress );
  
  		Map<String,String> newTargetProperties = new HashMap<>( targetProperties.size());
  		for( Map.Entry<String,String> entry : targetProperties.entrySet()) {
  			String p = Utils.expandTemplate( entry.getValue(), params );
  			newTargetProperties.put( entry.getKey(), p );
  
  			if( ! p.equals( entry.getValue()))
  				logger.fine( "Target property '" + entry.getKey() + "' was expanded to " + p );
  		}
  
  		return newTargetProperties;
  	}
docs: Expands the properties.
  <p>
  Property values that contain {{ ip }} will be updated.
  {{ ip }} will be replaced by the IP address of the root instance
  (which may - or not) be the same than the scoped instance).
  </p>
  
  @param scopedInstance the scoped instance (not null)
  @param targetProperties the target properties (not null)
  @return a new map equivalent to the input but with expanded properties)