Map properties = null;
Map properties = new Hashtable();  if (Settings.getInstance().getGlobalMacros() && substitutions!=null) { properties.putAll(substitutions); }  properties.putAll(templateData.getProperties());
public static Map prepareSubstitutions(VDBTemplateInstance templateData, Map substitutions, Map ports){	 // Note: 	 // the macro values given in an expand(){} statement should not be	 // automatically passed down into any templates that are expanded within the	 // lower level file unless they are explicitly named as macros there too. 	 Map properties = null;				 if (substitutions==null && ports==null)	 	properties = templateData.getProperties();	 else	 {	 	properties = (Map)templateData.getProperties().clone();				// update values	 	Iterator i = properties.keySet().iterator();	 	while (i.hasNext())	 	{	 		Object key = i.next();	 		String value = properties.get(key).toString();			if (substitutions != null) value = VDBTemplateInstance.applyProperties(value, substitutions);			if (ports != null) value = VDBTemplateInstance.applyPorts(value, ports);					 	properties.put(key, value);	 	}	 }	return properties;}