int amismatch = stringDist( v1,v2 );
int amismatch = stringDist( v1,v2,1.0 );
  private void includeNodes( Node a, Node b ) {    if( a== null || b== null || totalMismatch)      return;    XMLNode ca = a.getContent(), cb = b.getContent();    if( ca instanceof XMLElementNode && cb instanceof XMLElementNode ) {      XMLElementNode ea = (XMLElementNode) ca,eb=(XMLElementNode) cb;      total+=ELEMENT_NAME_INFO;      mismatched += ea.getQName().equals(eb.getQName()) ? 0 : ELEMENT_NAME_INFO;      Attributes aa =  ea.getAttributes(), ab = eb.getAttributes();      for( int i=0;i<aa.getLength();i++)  {        int index = ab.getIndex(aa.getQName(i));        if( index != -1 ) {          String v1 =  aa.getValue(i), v2 = ab.getValue(index);          int amismatch = stringDist( v1,v2 );          int info = (v1.length() > ATTR_VALUE_THRESHOLD ? v1.length() : 1 ) +                     (v2.length() > ATTR_VALUE_THRESHOLD ? v2.length() : 1 );          mismatched += amismatch > info ? info : amismatch;          total+=info;        } else {          mismatched += ATTR_INFO;          total += ATTR_INFO;        }      }      // Scan for deleted from b      for( int i=0;i<ab.getLength();i++) {        if( aa.getIndex(ab.getQName(i)) == -1 ) {          mismatched += ATTR_INFO;          total += ATTR_INFO;        }      }    } else if ( ca instanceof XMLTextNode && cb instanceof XMLTextNode ) {      int info = ca.getInfoSize() + cb.getInfoSize() / 2,        amismatch = stringDist( ((XMLTextNode) ca).getText(), ((XMLTextNode) cb).getText() ) / 2;      mismatched += amismatch > info  ? info : amismatch;      total+=info;    } else      totalMismatch = true;  }