if (myExtraOutput || true) {
if (myExtraOutput) {
  protected void mergeNode (Node first, List nodes, Iterator nodeListIter) {	if (myExtraOutput || true) {	  String name  = first.getAttributes().getNamedItem ("name").getNodeValue();	  System.out.println (getName() + ".mergeNode - examining " + first.getNodeName () + " " + name);	}    if (nodes.size () == 1)      return; // if no others to compare against, it's not a duplicate    NodeList firstChildNodes  = first.getChildNodes ();	Map firstFieldToType = new HashMap ();	for (int k = 0; k < firstChildNodes.getLength (); k++) {	  String firstChildName = 		firstChildNodes.item (k).getAttributes().getNamedItem ("name").getNodeValue();	  String type  = 		firstChildNodes.item (k).getAttributes().getNamedItem ("datatype").getNodeValue();	  firstFieldToType.put (firstChildName, type);	}	    for (int i = 0; i < nodes.size (); i++) {      Node other = (Node) nodes.get (i);      if (first == other)		continue;  // ignore self to tell if duplicate      NodeList otherChildNodes = other.getChildNodes ();	  //	  if (firstChildNodes.getLength () > otherChildNodes.getLength ())	  //	  	continue; // can't be a subset if more fields	  // create name->type mapping for other node      Map otherFieldToType = new HashMap ();	  Map otherNameToNode  = new HashMap ();	  boolean hasTypeCollision = false;      for (int k = 0; k < otherChildNodes.getLength (); k++) {		String field = otherChildNodes.item (k).getAttributes().getNamedItem ("name").getNodeValue();		String type  = otherChildNodes.item (k).getAttributes().getNamedItem ("datatype").getNodeValue();		if (myExtraOutput || true)		  System.out.println (getName() + ".mergeNodes - other field " + field + " - type " + type);				if (firstFieldToType.containsKey(field) &&			!firstFieldToType.get(field).equals (type)) {		  if (myExtraOutput || true)			System.out.println (getName() + ".mergeNodes - found type collision at " + field + " - " + 								firstFieldToType.get(field) + " vs " + type);		  hasTypeCollision=true;		  break;		}				otherFieldToType.put (field, type);		otherNameToNode.put  (field, otherChildNodes.item (k));      }	  if (hasTypeCollision) continue; // can't merge	  Map namesInOther = new HashMap (otherFieldToType);	  namesInOther.entrySet().removeAll (firstFieldToType.entrySet());	  	  for (Iterator iter = namesInOther.keySet ().iterator(); iter.hasNext();) {		Object fieldName = iter.next();		Node otherNode = (Node) otherNameToNode.get (fieldName);		// add new fields		first.appendChild (otherNode);		firstFieldToType.put (fieldName, namesInOther.get(fieldName));	  }	  if (myExtraOutput || true) {		String name  = first.getAttributes().getNamedItem ("name").getNodeValue();		System.out.println (getName() + ".mergeNode - Found a mergable node " + first.getNodeName () + " " + name);	  }	  setResourceAttributes (first, other);			  nodeListIter.remove ();	  nodeListIter.next ();	}  }