if( a!=null && b!= null ) includeNodes( a, b ); double penalty = Math.max(0.0,1.0-((double) total)/((double) C)); double distance= penalty+(1.0-penalty)*((double) (mismatched))/ ((double) total); resetDistance(); return totalMismatch ? 1.0 : distance;
try { if( a!=null && b!= null ) includeNodes( a, b ); double penalty = Math.max(0.0,1.0-((double) total)/((double) C)); double distance= penalty+(1.0-penalty)*((double) (mismatched))/ ((double) total); return totalMismatch ? 1.0 : distance; } finally { resetDistance(); }
  public double getDistance(Node a, Node b ) {    if( a!=null && b!= null )      includeNodes( a, b );    double penalty = Math.max(0.0,1.0-((double) total)/((double) C));    double distance= penalty+(1.0-penalty)*((double) (mismatched))/                      ((double) total);    resetDistance();    return totalMismatch ? 1.0 : distance;  }