code: public static final String getHostOrIP(boolean preferHostname, Tree info) {
  		String hostOrIP = null;
  		if (preferHostname) {
  			hostOrIP = getHost(info);
  			if (hostOrIP == null) {
  				hostOrIP = getIP(info);
  			}
  		} else {
  			hostOrIP = getIP(info);
  			if (hostOrIP == null) {
  				hostOrIP = getHost(info);
  			}
  		}
  		return hostOrIP;
  	}
docs: --- GET HOSTNAME OR IP FROM AN INFO STRUCTURE ---