commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ki...@apache.org
Subject svn commit: r947984 [25/36] - in /websites/production/commons/content/sandbox/commons-text: ./ apidocs/ apidocs/org/apache/commons/text/diff/ apidocs/org/apache/commons/text/diff/class-use/ apidocs/org/apache/commons/text/names/ apidocs/org/apache/comm...
Date Fri, 17 Apr 2015 06:46:32 GMT
Modified: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/JaroWrinklerDistance.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/JaroWrinklerDistance.java.html (original)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/JaroWrinklerDistance.java.html Fri Apr 17 06:46:28 2015
@@ -34,10 +34,16 @@ package org.apache.commons.text.similari
  * <p>
  * This code has been adapted from Apache Commons Lang 3.3.
  * </p>
+ *
+ * @since 1.0
  */
-<span class="fc" id="L38">public class JaroWrinklerDistance implements StringMetric&lt;Double&gt; {</span>
+<span class="fc" id="L40">public class JaroWrinklerDistance implements EditDistance&lt;Double&gt; {</span>
 
     /**
+     * The default prefix length limit set to four.
+     */
+    private static final int PREFIX_LENGTH_LIMIT = 4;
+    /**
      * Represents a failed index search.
      */
     public static final int INDEX_NOT_FOUND = -1;
@@ -47,20 +53,20 @@ package org.apache.commons.text.similari
      * between two CharSequences.
      *
      * &lt;pre&gt;
-     * distance.compare(null, null)          = IllegalArgumentException
-     * distance.compare(&quot;&quot;,&quot;&quot;)               = 0.0
-     * distance.compare(&quot;&quot;,&quot;a&quot;)              = 0.0
-     * distance.compare(&quot;aaapppp&quot;, &quot;&quot;)       = 0.0
-     * distance.compare(&quot;frog&quot;, &quot;fog&quot;)       = 0.93
-     * distance.compare(&quot;fly&quot;, &quot;ant&quot;)        = 0.0
-     * distance.compare(&quot;elephant&quot;, &quot;hippo&quot;) = 0.44
-     * distance.compare(&quot;hippo&quot;, &quot;elephant&quot;) = 0.44
-     * distance.compare(&quot;hippo&quot;, &quot;zzzzzzzz&quot;) = 0.0
-     * distance.compare(&quot;hello&quot;, &quot;hallo&quot;)    = 0.88
-     * distance.compare(&quot;ABC Corporation&quot;, &quot;ABC Corp&quot;) = 0.91
-     * distance.compare(&quot;D N H Enterprises Inc&quot;, &quot;D &amp;amp; H Enterprises, Inc.&quot;) = 0.93
-     * distance.compare(&quot;My Gym Children's Fitness Center&quot;, &quot;My Gym. Childrens Fitness&quot;) = 0.94
-     * distance.compare(&quot;PENNSYLVANIA&quot;, &quot;PENNCISYLVNIA&quot;)    = 0.9
+     * distance.apply(null, null)          = IllegalArgumentException
+     * distance.apply(&quot;&quot;,&quot;&quot;)               = 0.0
+     * distance.apply(&quot;&quot;,&quot;a&quot;)              = 0.0
+     * distance.apply(&quot;aaapppp&quot;, &quot;&quot;)       = 0.0
+     * distance.apply(&quot;frog&quot;, &quot;fog&quot;)       = 0.93
+     * distance.apply(&quot;fly&quot;, &quot;ant&quot;)        = 0.0
+     * distance.apply(&quot;elephant&quot;, &quot;hippo&quot;) = 0.44
+     * distance.apply(&quot;hippo&quot;, &quot;elephant&quot;) = 0.44
+     * distance.apply(&quot;hippo&quot;, &quot;zzzzzzzz&quot;) = 0.0
+     * distance.apply(&quot;hello&quot;, &quot;hallo&quot;)    = 0.88
+     * distance.apply(&quot;ABC Corporation&quot;, &quot;ABC Corp&quot;) = 0.91
+     * distance.apply(&quot;D N H Enterprises Inc&quot;, &quot;D &amp;amp; H Enterprises, Inc.&quot;) = 0.93
+     * distance.apply(&quot;My Gym Children's Fitness Center&quot;, &quot;My Gym. Childrens Fitness&quot;) = 0.94
+     * distance.apply(&quot;PENNSYLVANIA&quot;, &quot;PENNCISYLVNIA&quot;)    = 0.9
      * &lt;/pre&gt;
      *
      * @param left the first String, must not be null
@@ -69,19 +75,20 @@ package org.apache.commons.text.similari
      * @throws IllegalArgumentException if either String input {@code null}
      */
     @Override
-    public Double compare(CharSequence left, CharSequence right) {
-<span class="fc" id="L73">        final double DEFAULT_SCALING_FACTOR = 0.1;</span>
+    public Double apply(CharSequence left, CharSequence right) {
+<span class="fc" id="L79">        final double defaultScalingFactor = 0.1;</span>
+<span class="fc" id="L80">        final double percentageRoundValue = 100.0;</span>
 
-<span class="fc bfc" id="L75" title="All 4 branches covered.">        if (left == null || right == null) {</span>
-<span class="fc" id="L76">            throw new IllegalArgumentException(&quot;Strings must not be null&quot;);</span>
+<span class="fc bfc" id="L82" title="All 4 branches covered.">        if (left == null || right == null) {</span>
+<span class="fc" id="L83">            throw new IllegalArgumentException(&quot;Strings must not be null&quot;);</span>
         }
 
-<span class="fc" id="L79">        final double jaro = score(left, right);</span>
-<span class="fc" id="L80">        final int cl = commonPrefixLength(left, right);</span>
-<span class="fc" id="L81">        final double matchScore = Math.round((jaro + (DEFAULT_SCALING_FACTOR</span>
-                * cl * (1.0 - jaro))) *100.0)/100.0;
+<span class="fc" id="L86">        final double jaro = score(left, right);</span>
+<span class="fc" id="L87">        final int cl = commonPrefixLength(left, right);</span>
+<span class="fc" id="L88">        final double matchScore = Math.round((jaro + defaultScalingFactor</span>
+                * cl * (1.0 - jaro)) * percentageRoundValue) / percentageRoundValue;
 
-<span class="fc" id="L84">        return matchScore;</span>
+<span class="fc" id="L91">        return matchScore;</span>
     }
 
     /**
@@ -94,11 +101,11 @@ package org.apache.commons.text.similari
      */
     private static int commonPrefixLength(final CharSequence first,
             final CharSequence second) {
-<span class="fc" id="L97">        final int result = getCommonPrefix(first.toString(), second.toString())</span>
-                .length();
+<span class="fc" id="L104">        final int result = getCommonPrefix(first.toString(), second.toString())</span>
+<span class="fc" id="L105">                .length();</span>
 
         // Limit the result to 4.
-<span class="fc bfc" id="L101" title="All 2 branches covered.">        return result &gt; 4 ? 4 : result;</span>
+<span class="fc bfc" id="L108" title="All 2 branches covered.">        return result &gt; PREFIX_LENGTH_LIMIT ? PREFIX_LENGTH_LIMIT : result;</span>
     }
 
     /**
@@ -136,22 +143,22 @@ package org.apache.commons.text.similari
      *         all null or if there is no common prefix.
      */
     public static String getCommonPrefix(final String... strs) {
-<span class="pc bpc" id="L139" title="2 of 4 branches missed.">        if (strs == null || strs.length == 0) {</span>
-<span class="nc" id="L140">            return &quot;&quot;;</span>
+<span class="pc bpc" id="L146" title="2 of 4 branches missed.">        if (strs == null || strs.length == 0) {</span>
+<span class="nc" id="L147">            return &quot;&quot;;</span>
         }
-<span class="fc" id="L142">        final int smallestIndexOfDiff = indexOfDifference(strs);</span>
-<span class="pc bpc" id="L143" title="1 of 2 branches missed.">        if (smallestIndexOfDiff == INDEX_NOT_FOUND) {</span>
+<span class="fc" id="L149">        final int smallestIndexOfDiff = indexOfDifference(strs);</span>
+<span class="pc bpc" id="L150" title="1 of 2 branches missed.">        if (smallestIndexOfDiff == INDEX_NOT_FOUND) {</span>
             // all strings were identical
-<span class="nc bnc" id="L145" title="All 2 branches missed.">            if (strs[0] == null) {</span>
-<span class="nc" id="L146">                return &quot;&quot;;</span>
+<span class="nc bnc" id="L152" title="All 2 branches missed.">            if (strs[0] == null) {</span>
+<span class="nc" id="L153">                return &quot;&quot;;</span>
             }
-<span class="nc" id="L148">            return strs[0];</span>
-<span class="fc bfc" id="L149" title="All 2 branches covered.">        } else if (smallestIndexOfDiff == 0) {</span>
+<span class="nc" id="L155">            return strs[0];</span>
+<span class="fc bfc" id="L156" title="All 2 branches covered.">        } else if (smallestIndexOfDiff == 0) {</span>
             // there were no common initial characters
-<span class="fc" id="L151">            return &quot;&quot;;</span>
+<span class="fc" id="L158">            return &quot;&quot;;</span>
         } else {
             // we found a common initial character sequence
-<span class="fc" id="L154">            return strs[0].substring(0, smallestIndexOfDiff);</span>
+<span class="fc" id="L161">            return strs[0].substring(0, smallestIndexOfDiff);</span>
         }
     }
 
@@ -168,47 +175,49 @@ package org.apache.commons.text.similari
         String longer;
 
         // Determine which String is longer.
-<span class="fc bfc" id="L171" title="All 2 branches covered.">        if (first.length() &gt; second.length()) {</span>
-<span class="fc" id="L172">            longer = first.toString().toLowerCase();</span>
-<span class="fc" id="L173">            shorter = second.toString().toLowerCase();</span>
+<span class="fc bfc" id="L178" title="All 2 branches covered.">        if (first.length() &gt; second.length()) {</span>
+<span class="fc" id="L179">            longer = first.toString().toLowerCase();</span>
+<span class="fc" id="L180">            shorter = second.toString().toLowerCase();</span>
         } else {
-<span class="fc" id="L175">            longer = second.toString().toLowerCase();</span>
-<span class="fc" id="L176">            shorter = first.toString().toLowerCase();</span>
+<span class="fc" id="L182">            longer = second.toString().toLowerCase();</span>
+<span class="fc" id="L183">            shorter = first.toString().toLowerCase();</span>
         }
 
         // Calculate the half length() distance of the shorter String.
-<span class="fc" id="L180">        final int halflength = shorter.length() / 2 + 1;</span>
+<span class="fc" id="L187">        final int halflength = shorter.length() / 2 + 1;</span>
 
         // Find the set of matching characters between the shorter and longer
         // strings. Note that
         // the set of matching characters may be different depending on the
         // order of the strings.
-<span class="fc" id="L186">        final String m1 = getSetOfMatchingCharacterWithin(shorter, longer,</span>
+<span class="fc" id="L193">        final String m1 = getSetOfMatchingCharacterWithin(shorter, longer,</span>
                 halflength);
-<span class="fc" id="L188">        final String m2 = getSetOfMatchingCharacterWithin(longer, shorter,</span>
+<span class="fc" id="L195">        final String m2 = getSetOfMatchingCharacterWithin(longer, shorter,</span>
                 halflength);
 
         // If one or both of the sets of common characters is empty, then
         // there is no similarity between the two strings.
-<span class="pc bpc" id="L193" title="1 of 4 branches missed.">        if (m1.length() == 0 || m2.length() == 0) {</span>
-<span class="fc" id="L194">            return 0.0;</span>
+<span class="pc bpc" id="L200" title="1 of 4 branches missed.">        if (m1.length() == 0 || m2.length() == 0) {</span>
+<span class="fc" id="L201">            return 0.0;</span>
         }
 
         // If the set of common characters is not the same size, then
         // there is no similarity between the two strings, either.
-<span class="pc bpc" id="L199" title="1 of 2 branches missed.">        if (m1.length() != m2.length()) {</span>
-<span class="nc" id="L200">            return 0.0;</span>
+<span class="pc bpc" id="L206" title="1 of 2 branches missed.">        if (m1.length() != m2.length()) {</span>
+<span class="nc" id="L207">            return 0.0;</span>
         }
 
         // Calculate the number of transposition between the two sets
         // of common characters.
-<span class="fc" id="L205">        final int transpositions = transpositions(m1, m2);</span>
+<span class="fc" id="L212">        final int transpositions = transpositions(m1, m2);</span>
+
+<span class="fc" id="L214">        final double defaultDenominator = 3.0;</span>
 
         // Calculate the distance.
-<span class="fc" id="L208">        final double dist = (m1.length() / ((double) shorter.length())</span>
-                + m2.length() / ((double) longer.length()) + (m1.length() - transpositions)
-                / ((double) m1.length())) / 3.0;
-<span class="fc" id="L211">        return dist;</span>
+<span class="fc" id="L217">        final double dist = (m1.length() / ((double) shorter.length())</span>
+<span class="fc" id="L218">                + m2.length() / ((double) longer.length()) + (m1.length() - transpositions)</span>
+<span class="fc" id="L219">                / ((double) m1.length())) / defaultDenominator;</span>
+<span class="fc" id="L220">        return dist;</span>
     }
 
     /**
@@ -220,13 +229,13 @@ package org.apache.commons.text.similari
      */
     protected static int transpositions(final CharSequence first,
             final CharSequence second) {
-<span class="fc" id="L223">        int transpositions = 0;</span>
-<span class="fc bfc" id="L224" title="All 2 branches covered.">        for (int i = 0; i &lt; first.length(); i++) {</span>
-<span class="fc bfc" id="L225" title="All 2 branches covered.">            if (first.charAt(i) != second.charAt(i)) {</span>
-<span class="fc" id="L226">                transpositions++;</span>
+<span class="fc" id="L232">        int transpositions = 0;</span>
+<span class="fc bfc" id="L233" title="All 2 branches covered.">        for (int i = 0; i &lt; first.length(); i++) {</span>
+<span class="fc bfc" id="L234" title="All 2 branches covered.">            if (first.charAt(i) != second.charAt(i)) {</span>
+<span class="fc" id="L235">                transpositions++;</span>
             }
         }
-<span class="fc" id="L229">        return transpositions / 2;</span>
+<span class="fc" id="L238">        return transpositions / 2;</span>
     }
 
     /**
@@ -263,61 +272,61 @@ package org.apache.commons.text.similari
      *         equal
      */
     protected static int indexOfDifference(final CharSequence... css) {
-<span class="pc bpc" id="L266" title="2 of 4 branches missed.">        if (css == null || css.length &lt;= 1) {</span>
-<span class="nc" id="L267">            return INDEX_NOT_FOUND;</span>
+<span class="pc bpc" id="L275" title="2 of 4 branches missed.">        if (css == null || css.length &lt;= 1) {</span>
+<span class="nc" id="L276">            return INDEX_NOT_FOUND;</span>
         }
-<span class="fc" id="L269">        boolean anyStringNull = false;</span>
-<span class="fc" id="L270">        boolean allStringsNull = true;</span>
-<span class="fc" id="L271">        final int arrayLen = css.length;</span>
-<span class="fc" id="L272">        int shortestStrLen = Integer.MAX_VALUE;</span>
-<span class="fc" id="L273">        int longestStrLen = 0;</span>
+<span class="fc" id="L278">        boolean anyStringNull = false;</span>
+<span class="fc" id="L279">        boolean allStringsNull = true;</span>
+<span class="fc" id="L280">        final int arrayLen = css.length;</span>
+<span class="fc" id="L281">        int shortestStrLen = Integer.MAX_VALUE;</span>
+<span class="fc" id="L282">        int longestStrLen = 0;</span>
 
         // find the min and max string lengths; this avoids checking to make
         // sure we are not exceeding the length of the string each time through
         // the bottom loop.
-<span class="fc bfc" id="L278" title="All 2 branches covered.">        for (int i = 0; i &lt; arrayLen; i++) {</span>
-<span class="pc bpc" id="L279" title="1 of 2 branches missed.">            if (css[i] == null) {</span>
-<span class="nc" id="L280">                anyStringNull = true;</span>
-<span class="nc" id="L281">                shortestStrLen = 0;</span>
+<span class="fc bfc" id="L287" title="All 2 branches covered.">        for (int i = 0; i &lt; arrayLen; i++) {</span>
+<span class="pc bpc" id="L288" title="1 of 2 branches missed.">            if (css[i] == null) {</span>
+<span class="nc" id="L289">                anyStringNull = true;</span>
+<span class="nc" id="L290">                shortestStrLen = 0;</span>
             } else {
-<span class="fc" id="L283">                allStringsNull = false;</span>
-<span class="fc" id="L284">                shortestStrLen = Math.min(css[i].length(), shortestStrLen);</span>
-<span class="fc" id="L285">                longestStrLen = Math.max(css[i].length(), longestStrLen);</span>
+<span class="fc" id="L292">                allStringsNull = false;</span>
+<span class="fc" id="L293">                shortestStrLen = Math.min(css[i].length(), shortestStrLen);</span>
+<span class="fc" id="L294">                longestStrLen = Math.max(css[i].length(), longestStrLen);</span>
             }
         }
 
         // handle lists containing all nulls or all empty strings
-<span class="pc bpc" id="L290" title="4 of 6 branches missed.">        if (allStringsNull || longestStrLen == 0 &amp;&amp; !anyStringNull) {</span>
-<span class="nc" id="L291">            return INDEX_NOT_FOUND;</span>
+<span class="pc bpc" id="L299" title="4 of 6 branches missed.">        if (allStringsNull || longestStrLen == 0 &amp;&amp; !anyStringNull) {</span>
+<span class="nc" id="L300">            return INDEX_NOT_FOUND;</span>
         }
 
         // handle lists containing some nulls or some empty strings
-<span class="pc bpc" id="L295" title="1 of 2 branches missed.">        if (shortestStrLen == 0) {</span>
-<span class="nc" id="L296">            return 0;</span>
+<span class="pc bpc" id="L304" title="1 of 2 branches missed.">        if (shortestStrLen == 0) {</span>
+<span class="nc" id="L305">            return 0;</span>
         }
 
         // find the position with the first difference across all strings
-<span class="fc" id="L300">        int firstDiff = -1;</span>
-<span class="fc bfc" id="L301" title="All 2 branches covered.">        for (int stringPos = 0; stringPos &lt; shortestStrLen; stringPos++) {</span>
-<span class="fc" id="L302">            final char comparisonChar = css[0].charAt(stringPos);</span>
-<span class="fc bfc" id="L303" title="All 2 branches covered.">            for (int arrayPos = 1; arrayPos &lt; arrayLen; arrayPos++) {</span>
-<span class="fc bfc" id="L304" title="All 2 branches covered.">                if (css[arrayPos].charAt(stringPos) != comparisonChar) {</span>
-<span class="fc" id="L305">                    firstDiff = stringPos;</span>
-<span class="fc" id="L306">                    break;</span>
+<span class="fc" id="L309">        int firstDiff = -1;</span>
+<span class="fc bfc" id="L310" title="All 2 branches covered.">        for (int stringPos = 0; stringPos &lt; shortestStrLen; stringPos++) {</span>
+<span class="fc" id="L311">            final char comparisonChar = css[0].charAt(stringPos);</span>
+<span class="fc bfc" id="L312" title="All 2 branches covered.">            for (int arrayPos = 1; arrayPos &lt; arrayLen; arrayPos++) {</span>
+<span class="fc bfc" id="L313" title="All 2 branches covered.">                if (css[arrayPos].charAt(stringPos) != comparisonChar) {</span>
+<span class="fc" id="L314">                    firstDiff = stringPos;</span>
+<span class="fc" id="L315">                    break;</span>
                 }
             }
-<span class="fc bfc" id="L309" title="All 2 branches covered.">            if (firstDiff != -1) {</span>
-<span class="fc" id="L310">                break;</span>
+<span class="fc bfc" id="L318" title="All 2 branches covered.">            if (firstDiff != -1) {</span>
+<span class="fc" id="L319">                break;</span>
             }
         }
 
-<span class="pc bpc" id="L314" title="1 of 4 branches missed.">        if (firstDiff == -1 &amp;&amp; shortestStrLen != longestStrLen) {</span>
+<span class="pc bpc" id="L323" title="1 of 4 branches missed.">        if (firstDiff == -1 &amp;&amp; shortestStrLen != longestStrLen) {</span>
             // we compared all of the characters up to the length of the
             // shortest string and didn't find a match, but the string lengths
             // vary, so return the length of the shortest string.
-<span class="fc" id="L318">            return shortestStrLen;</span>
+<span class="fc" id="L327">            return shortestStrLen;</span>
         }
-<span class="fc" id="L320">        return firstDiff;</span>
+<span class="fc" id="L329">        return firstDiff;</span>
     }
 
     /**
@@ -336,25 +345,25 @@ package org.apache.commons.text.similari
      */
     protected static String getSetOfMatchingCharacterWithin(
             final CharSequence first, final CharSequence second, final int limit) {
-<span class="fc" id="L339">        final StringBuilder common = new StringBuilder();</span>
-<span class="fc" id="L340">        final StringBuilder copy = new StringBuilder(second);</span>
+<span class="fc" id="L348">        final StringBuilder common = new StringBuilder();</span>
+<span class="fc" id="L349">        final StringBuilder copy = new StringBuilder(second);</span>
 
-<span class="fc bfc" id="L342" title="All 2 branches covered.">        for (int i = 0; i &lt; first.length(); i++) {</span>
-<span class="fc" id="L343">            final char ch = first.charAt(i);</span>
-<span class="fc" id="L344">            boolean found = false;</span>
+<span class="fc bfc" id="L351" title="All 2 branches covered.">        for (int i = 0; i &lt; first.length(); i++) {</span>
+<span class="fc" id="L352">            final char ch = first.charAt(i);</span>
+<span class="fc" id="L353">            boolean found = false;</span>
 
             // See if the character is within the limit positions away from the
             // original position of that character.
-<span class="fc" id="L348">            for (int j = Math.max(0, i - limit); !found</span>
-<span class="fc bfc" id="L349" title="All 4 branches covered.">                    &amp;&amp; j &lt; Math.min(i + limit, second.length()); j++) {</span>
-<span class="fc bfc" id="L350" title="All 2 branches covered.">                if (copy.charAt(j) == ch) {</span>
-<span class="fc" id="L351">                    found = true;</span>
-<span class="fc" id="L352">                    common.append(ch);</span>
-<span class="fc" id="L353">                    copy.setCharAt(j, '*');</span>
+<span class="fc" id="L357">            for (int j = Math.max(0, i - limit); !found</span>
+<span class="fc bfc" id="L358" title="All 4 branches covered.">                    &amp;&amp; j &lt; Math.min(i + limit, second.length()); j++) {</span>
+<span class="fc bfc" id="L359" title="All 2 branches covered.">                if (copy.charAt(j) == ch) {</span>
+<span class="fc" id="L360">                    found = true;</span>
+<span class="fc" id="L361">                    common.append(ch);</span>
+<span class="fc" id="L362">                    copy.setCharAt(j, '*');</span>
                 }
             }
         }
-<span class="fc" id="L357">        return common.toString();</span>
+<span class="fc" id="L366">        return common.toString();</span>
     }
 
 }

Modified: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/LevenshteinDistance.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/LevenshteinDistance.html (original)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/LevenshteinDistance.html Fri Apr 17 06:46:28 2015
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>LevenshteinDistance</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Text</a> &gt; <a href="index.html" class="el_package">org.apache.commons.text.similarity</a> &gt; <span class="el_class">LevenshteinDistance</span></div><h1>LevenshteinDistance</h1><table class="coverage" cellspacing="0" id="coveragetable"><t
 head><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">1 of 214</td><td class="ctr2">100%</td><td class="bar">1 of 32</td><td class="ctr2">97%</td><td class="ctr1">1</td><td class="ctr2">19</td
 ><td class="ctr1">0</td><td class="ctr2">44</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><a href="LevenshteinDistance.java.html#L115" class="el_method">compare(CharSequence, CharSequence, int)</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="119" height="10" title="204" alt="204"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="3" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="116" height="10" title="31" alt="31"/></td><td class="ctr2" id="e0">97%</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">17</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">42</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="LevenshteinDistance.java.html#L78" class="el_method">compare(CharSequence, CharSequence)</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="3
 " height="10" title="6" alt="6"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a2"><a href="LevenshteinDistance.java.html#L34" class="el_method">LevenshteinDistance()</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="1" height="10" title="3" alt="3"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>LevenshteinDistance</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Text</a> &gt; <a href="index.html" class="el_package">org.apache.commons.text.similarity</a> &gt; <span class="el_class">LevenshteinDistance</span></div><h1>LevenshteinDistance</h1><table class="coverage" cellspacing="0" id="coveragetable"><t
 head><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">16 of 373</td><td class="ctr2">96%</td><td class="bar">4 of 56</td><td class="ctr2">93%</td><td class="ctr1">6</td><td class="ctr2">36</td
 ><td class="ctr1">4</td><td class="ctr2">83</td><td class="ctr1">2</td><td class="ctr2">8</td></tr></tfoot><tbody><tr><td id="a5"><a href="LevenshteinDistance.java.html#L167" class="el_method">limitedCompare(CharSequence, CharSequence, int)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="6" height="10" title="11" alt="11"/><img src="../.resources/greenbar.gif" width="113" height="10" title="189" alt="189"/></td><td class="ctr2" id="c5">94%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="15" height="10" title="4" alt="4"/><img src="../.resources/greenbar.gif" width="105" height="10" title="28" alt="28"/></td><td class="ctr2" id="e3">88%</td><td class="ctr1" id="f0">4</td><td class="ctr2" id="g0">17</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">42</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="LevenshteinDistance.java.html#L132" class="el_method">getThreshold()</a></td><td 
 class="bar" id="b1"><img src="../.resources/redbar.gif" width="1" height="10" title="3" alt="3"/></td><td class="ctr2" id="c6">0%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i5">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="LevenshteinDistance.java.html#L123" class="el_method">getDefaultInstance()</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="1" height="10" title="2" alt="2"/></td><td class="ctr2" id="c7">0%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i6">1</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a7"><a href="LevenshteinDistance.java.html#L339" class="el_method">unlimitedCompare(CharSequence, CharSeque
 nce)</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="76" height="10" title="127" alt="127"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"><img src="../.resources/greenbar.gif" width="67" height="10" title="18" alt="18"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g1">10</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i1">28</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a4"><a href="LevenshteinDistance.java.html#L70" class="el_method">LevenshteinDistance(Integer)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="9" height="10" title="16" alt="16"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d2"><img src="../.resources/greenbar.gif" width="15" height="10" title="4" alt="4"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g2">3</td><td class="ctr1" id="h4">0</td><td 
 class="ctr2" id="i2">5</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a0"><a href="LevenshteinDistance.java.html#L110" class="el_method">apply(CharSequence, CharSequence)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="9" height="10" title="16" alt="16"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="7" height="10" title="2" alt="2"/></td><td class="ctr2" id="e2">100%</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g3">2</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i3">3</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a6"><a href="LevenshteinDistance.java.html#L41" class="el_method">static {...}</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="3" height="10" title="5" alt="5"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td cl
 ass="ctr1" id="f6">0</td><td class="ctr2" id="g6">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i7">1</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a3"><a href="LevenshteinDistance.java.html#L57" class="el_method">LevenshteinDistance()</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="2" height="10" title="4" alt="4"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d7"/><td class="ctr2" id="e7">n/a</td><td class="ctr1" id="f7">0</td><td class="ctr2" id="g7">1</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i4">2</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html>
\ No newline at end of file

Modified: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/LevenshteinDistance.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/LevenshteinDistance.java.html (original)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/LevenshteinDistance.java.html Fri Apr 17 06:46:28 2015
@@ -30,52 +30,106 @@ import java.util.Arrays;
  * &lt;p&gt;
  * This code has been adapted from Apache Commons Lang 3.3.
  * &lt;/p&gt;
+ *
+ * @since 1.0
  */
-<span class="fc" id="L34">public class LevenshteinDistance implements StringMetric&lt;Integer&gt; {</span>
+public class LevenshteinDistance implements EditDistance&lt;Integer&gt; {
+
+    /**
+     * Default instance.
+     */
+<span class="fc" id="L41">    private static final LevenshteinDistance DEFAULT_INSTANCE = new LevenshteinDistance();</span>
+
+    /**
+     * Threshold.
+     */
+    private final Integer threshold;
 
     /**
-     * Find the Levenshtein distance between two Strings.
-     *
-     * &lt;p&gt;A higher score indicates a greater distance.&lt;/p&gt;
-     *
      * &lt;p&gt;
-     * The previous implementation of the Levenshtein distance algorithm was
-     * from &lt;a
-     * href=&quot;http://www.merriampark.com/ld.htm&quot;&gt;http://www.merriampark.com
-     * /ld.htm&lt;/a&gt;
+     * This returns the default instance that uses a version
+     * of the algorithm that does not use a threshold parameter.
      * &lt;/p&gt;
      *
+     * @see LevenshteinDistance#getDefaultInstance()
+     */
+    public LevenshteinDistance() {
+<span class="fc" id="L57">        this(null);</span>
+<span class="fc" id="L58">    }</span>
+
+    /**
      * &lt;p&gt;
-     * Chas Emerick has written an implementation in Java, which avoids an
-     * OutOfMemoryError which can occur when my Java implementation is used with
-     * very large strings.&lt;br&gt;
-     * This implementation of the Levenshtein distance algorithm is from &lt;a
-     * href=&quot;http://www.merriampark.com/ldjava.htm&quot;&gt;http://www.merriampark.com/
-     * ldjava.htm&lt;/a&gt;
+     * If the threshold is not null, distance calculations will be limited to a maximum length.
+     * If the threshold is null, the unlimited version of the algorithm will be used.
      * &lt;/p&gt;
      *
+     * @param threshold
+     *        If this is null then distances calculations will not be limited.
+     *        This may not be negative.
+     */
+<span class="fc" id="L70">    public LevenshteinDistance(final Integer threshold) {</span>
+<span class="fc bfc" id="L71" title="All 4 branches covered.">        if (threshold != null &amp;&amp; threshold &lt; 0) {</span>
+<span class="fc" id="L72">            throw new IllegalArgumentException(&quot;Threshold must not be negative&quot;);</span>
+        }
+<span class="fc" id="L74">        this.threshold = threshold;</span>
+<span class="fc" id="L75">    }</span>
+
+    /**
+     * &lt;p&gt;Find the Levenshtein distance between two Strings.&lt;/p&gt;
+     *
+     * &lt;p&gt;A higher score indicates a greater distance.&lt;/p&gt;
+     *
+     * &lt;p&gt;The previous implementation of the Levenshtein distance algorithm
+     * was from &lt;a href=&quot;http://www.merriampark.com/ld.htm&quot;&gt;http://www.merriampark.com/ld.htm&lt;/a&gt;&lt;/p&gt;
+     *
+     * &lt;p&gt;Chas Emerick has written an implementation in Java, which avoids an OutOfMemoryError
+     * which can occur when my Java implementation is used with very large strings.&lt;br&gt;
+     * This implementation of the Levenshtein distance algorithm
+     * is from &lt;a href=&quot;http://www.merriampark.com/ldjava.htm&quot;&gt;http://www.merriampark.com/ldjava.htm&lt;/a&gt;&lt;/p&gt;
+     *
      * &lt;pre&gt;
-     * distance.compare(null, *)             = IllegalArgumentException
-     * distance.compare(*, null)             = IllegalArgumentException
-     * distance.compare(&quot;&quot;,&quot;&quot;)               = 0
-     * distance.compare(&quot;&quot;,&quot;a&quot;)              = 1
-     * distance.compare(&quot;aaapppp&quot;, &quot;&quot;)       = 7
-     * distance.compare(&quot;frog&quot;, &quot;fog&quot;)       = 1
-     * distance.compare(&quot;fly&quot;, &quot;ant&quot;)        = 3
-     * distance.compare(&quot;elephant&quot;, &quot;hippo&quot;) = 7
-     * distance.compare(&quot;hippo&quot;, &quot;elephant&quot;) = 7
-     * distance.compare(&quot;hippo&quot;, &quot;zzzzzzzz&quot;) = 8
-     * distance.compare(&quot;hello&quot;, &quot;hallo&quot;)    = 1
+     * distance.apply(null, *)             = IllegalArgumentException
+     * distance.apply(*, null)             = IllegalArgumentException
+     * distance.apply(&quot;&quot;,&quot;&quot;)               = 0
+     * distance.apply(&quot;&quot;,&quot;a&quot;)              = 1
+     * distance.apply(&quot;aaapppp&quot;, &quot;&quot;)       = 7
+     * distance.apply(&quot;frog&quot;, &quot;fog&quot;)       = 1
+     * distance.apply(&quot;fly&quot;, &quot;ant&quot;)        = 3
+     * distance.apply(&quot;elephant&quot;, &quot;hippo&quot;) = 7
+     * distance.apply(&quot;hippo&quot;, &quot;elephant&quot;) = 7
+     * distance.apply(&quot;hippo&quot;, &quot;zzzzzzzz&quot;) = 8
+     * distance.apply(&quot;hello&quot;, &quot;hallo&quot;)    = 1
      * &lt;/pre&gt;
      *
      * @param left the first string, must not be null
      * @param right the second string, must not be null
-     * @return result distance
+     * @return result distance, or -1
      * @throws IllegalArgumentException if either String input {@code null}
      */
-    @Override
-    public Integer compare(CharSequence left, CharSequence right) {
-<span class="fc" id="L78">        return compare(left, right, Integer.MAX_VALUE);</span>
+    public Integer apply(CharSequence left, CharSequence right) {
+<span class="fc bfc" id="L110" title="All 2 branches covered.">        if (threshold != null) {</span>
+<span class="fc" id="L111">            return limitedCompare(left, right, threshold);</span>
+        } else {
+<span class="fc" id="L113">            return unlimitedCompare(left, right);</span>
+        }
+    }
+
+    /**
+     * Gets the default instance.
+     *
+     * @return the default instace
+     */
+    public static LevenshteinDistance getDefaultInstance() {
+<span class="nc" id="L123">        return DEFAULT_INSTANCE;</span>
+    }
+
+    /**
+     * Gets the distance threshold.
+     *
+     * @return the distance threshold
+     */
+    public Integer getThreshold() {
+<span class="nc" id="L132">        return threshold;</span>
     }
 
     /**
@@ -91,32 +145,30 @@ import java.util.Arrays;
      * &lt;/p&gt;
      *
      * &lt;pre&gt;
-     * distance.compare(null, *, *)             = IllegalArgumentException
-     * distance.compare(*, null, *)             = IllegalArgumentException
-     * distance.compare(*, *, -1)               = IllegalArgumentException
-     * distance.compare(&quot;&quot;,&quot;&quot;, 0)               = 0
-     * distance.compare(&quot;aaapppp&quot;, &quot;&quot;, 8)       = 7
-     * distance.compare(&quot;aaapppp&quot;, &quot;&quot;, 7)       = 7
-     * distance.compare(&quot;aaapppp&quot;, &quot;&quot;, 6))      = -1
-     * distance.compare(&quot;elephant&quot;, &quot;hippo&quot;, 7) = 7
-     * distance.compare(&quot;elephant&quot;, &quot;hippo&quot;, 6) = -1
-     * distance.compare(&quot;hippo&quot;, &quot;elephant&quot;, 7) = 7
-     * distance.compare(&quot;hippo&quot;, &quot;elephant&quot;, 6) = -1
+     * limitedCompare(null, *, *)             = IllegalArgumentException
+     * limitedCompare(*, null, *)             = IllegalArgumentException
+     * limitedCompare(*, *, -1)               = IllegalArgumentException
+     * limitedCompare(&quot;&quot;,&quot;&quot;, 0)               = 0
+     * limitedCompare(&quot;aaapppp&quot;, &quot;&quot;, 8)       = 7
+     * limitedCompare(&quot;aaapppp&quot;, &quot;&quot;, 7)       = 7
+     * limitedCompare(&quot;aaapppp&quot;, &quot;&quot;, 6))      = -1
+     * limitedCompare(&quot;elephant&quot;, &quot;hippo&quot;, 7) = 7
+     * limitedCompare(&quot;elephant&quot;, &quot;hippo&quot;, 6) = -1
+     * limitedCompare(&quot;hippo&quot;, &quot;elephant&quot;, 7) = 7
+     * limitedCompare(&quot;hippo&quot;, &quot;elephant&quot;, 6) = -1
      * &lt;/pre&gt;
      *
      * @param left the first string, must not be null
      * @param right the second string, must not be null
      * @param threshold the target threshold, must not be negative
-     * @return result distance
-     * @throws IllegalArgumentException if either String input {@code null} or
-     *             negative threshold
-     */
-    public Integer compare(CharSequence left, CharSequence right, int threshold) {
-<span class="fc bfc" id="L115" title="All 4 branches covered.">        if (left == null || right == null) {</span>
-<span class="fc" id="L116">            throw new IllegalArgumentException(&quot;Strings must not be null&quot;);</span>
+     * @return result distance, or -1
+     */
+    private static int limitedCompare(CharSequence left, CharSequence right, int threshold) {
+<span class="pc bpc" id="L167" title="2 of 4 branches missed.">        if (left == null || right == null) {</span>
+<span class="nc" id="L168">            throw new IllegalArgumentException(&quot;Strings must not be null&quot;);</span>
         }
-<span class="fc bfc" id="L118" title="All 2 branches covered.">        if (threshold &lt; 0) {</span>
-<span class="fc" id="L119">            throw new IllegalArgumentException(&quot;Threshold must not be negative&quot;);</span>
+<span class="pc bpc" id="L170" title="1 of 2 branches missed.">        if (threshold &lt; 0) {</span>
+<span class="nc" id="L171">            throw new IllegalArgumentException(&quot;Threshold must not be negative&quot;);</span>
         }
 
         /*
@@ -143,8 +195,16 @@ import java.util.Arrays;
          * and our threshold is 1. In this case we're going to walk a stripe of
          * length 3. The matrix would look like so:
          *
-         * 1 2 3 4 5 1 |#|#| | | | 2 |#|#|#| | | 3 | |#|#|#| | 4 | | |#|#|#| 5 |
-         * | | |#|#| 6 | | | | |#| 7 | | | | | |
+         * &lt;pre&gt;
+         *    1 2 3 4 5
+         * 1 |#|#| | | |
+         * 2 |#|#|#| | |
+         * 3 | |#|#|#| |
+         * 4 | | |#|#|#|
+         * 5 | | | |#|#|
+         * 6 | | | | |#|
+         * 7 | | | | | |
+         * &lt;/pre&gt;
          *
          * Note how the stripe leads off the table as there is no possible way
          * to turn a string of length 5 into one of length 7 in edit distance of
@@ -161,86 +221,195 @@ import java.util.Arrays;
          * some discussion.
          */
 
-<span class="fc" id="L164">        int n = left.length(); // length of s</span>
-<span class="fc" id="L165">        int m = right.length(); // length of t</span>
+<span class="fc" id="L224">        int n = left.length(); // length of left</span>
+<span class="fc" id="L225">        int m = right.length(); // length of right</span>
 
         // if one string is empty, the edit distance is necessarily the length
         // of the other
-<span class="fc bfc" id="L169" title="All 2 branches covered.">        if (n == 0) {</span>
-<span class="pc bpc" id="L170" title="1 of 2 branches missed.">            return m &lt;= threshold ? m : -1;</span>
-<span class="fc bfc" id="L171" title="All 2 branches covered.">        } else if (m == 0) {</span>
-<span class="fc bfc" id="L172" title="All 2 branches covered.">            return n &lt;= threshold ? n : -1;</span>
+<span class="fc bfc" id="L229" title="All 2 branches covered.">        if (n == 0) {</span>
+<span class="pc bpc" id="L230" title="1 of 2 branches missed.">            return m &lt;= threshold ? m : -1;</span>
+<span class="fc bfc" id="L231" title="All 2 branches covered.">        } else if (m == 0) {</span>
+<span class="fc bfc" id="L232" title="All 2 branches covered.">            return n &lt;= threshold ? n : -1;</span>
         }
 
-<span class="fc bfc" id="L175" title="All 2 branches covered.">        if (n &gt; m) {</span>
+<span class="fc bfc" id="L235" title="All 2 branches covered.">        if (n &gt; m) {</span>
             // swap the two strings to consume less memory
-<span class="fc" id="L177">            final CharSequence tmp = left;</span>
-<span class="fc" id="L178">            left = right;</span>
-<span class="fc" id="L179">            right = tmp;</span>
-<span class="fc" id="L180">            n = m;</span>
-<span class="fc" id="L181">            m = right.length();</span>
+<span class="fc" id="L237">            final CharSequence tmp = left;</span>
+<span class="fc" id="L238">            left = right;</span>
+<span class="fc" id="L239">            right = tmp;</span>
+<span class="fc" id="L240">            n = m;</span>
+<span class="fc" id="L241">            m = right.length();</span>
         }
 
-<span class="fc" id="L184">        int[] p = new int[n + 1]; // 'previous' cost array, horizontally</span>
-<span class="fc" id="L185">        int[] d = new int[n + 1]; // cost array, horizontally</span>
-        int[] _d; // placeholder to assist in swapping p and d
+<span class="fc" id="L244">        int[] p = new int[n + 1]; // 'previous' cost array, horizontally</span>
+<span class="fc" id="L245">        int[] d = new int[n + 1]; // cost array, horizontally</span>
+        int[] tempD; // placeholder to assist in swapping p and d
 
         // fill in starting table values
-<span class="fc" id="L189">        final int boundary = Math.min(n, threshold) + 1;</span>
-<span class="fc bfc" id="L190" title="All 2 branches covered.">        for (int i = 0; i &lt; boundary; i++) {</span>
-<span class="fc" id="L191">            p[i] = i;</span>
+<span class="fc" id="L249">        final int boundary = Math.min(n, threshold) + 1;</span>
+<span class="fc bfc" id="L250" title="All 2 branches covered.">        for (int i = 0; i &lt; boundary; i++) {</span>
+<span class="fc" id="L251">            p[i] = i;</span>
         }
         // these fills ensure that the value above the rightmost entry of our
         // stripe will be ignored in following loop iterations
-<span class="fc" id="L195">        Arrays.fill(p, boundary, p.length, Integer.MAX_VALUE);</span>
-<span class="fc" id="L196">        Arrays.fill(d, Integer.MAX_VALUE);</span>
+<span class="fc" id="L255">        Arrays.fill(p, boundary, p.length, Integer.MAX_VALUE);</span>
+<span class="fc" id="L256">        Arrays.fill(d, Integer.MAX_VALUE);</span>
 
         // iterates through t
-<span class="fc bfc" id="L199" title="All 2 branches covered.">        for (int j = 1; j &lt;= m; j++) {</span>
-<span class="fc" id="L200">            final char t_j = right.charAt(j - 1); // jth character of t</span>
-<span class="fc" id="L201">            d[0] = j;</span>
+<span class="fc bfc" id="L259" title="All 2 branches covered.">        for (int j = 1; j &lt;= m; j++) {</span>
+<span class="fc" id="L260">            final char rightJ = right.charAt(j - 1); // jth character of right</span>
+<span class="fc" id="L261">            d[0] = j;</span>
 
             // compute stripe indices, constrain to array size
-<span class="fc" id="L204">            final int min = Math.max(1, j - threshold);</span>
-<span class="fc bfc" id="L205" title="All 2 branches covered.">            final int max = j &gt; Integer.MAX_VALUE - threshold ? n : Math.min(</span>
+<span class="fc" id="L264">            final int min = Math.max(1, j - threshold);</span>
+<span class="fc bfc" id="L265" title="All 2 branches covered.">            final int max = j &gt; Integer.MAX_VALUE - threshold ? n : Math.min(</span>
                     n, j + threshold);
 
             // the stripe may lead off of the table if s and t are of different
             // sizes
-<span class="fc bfc" id="L210" title="All 2 branches covered.">            if (min &gt; max) {</span>
-<span class="fc" id="L211">                return -1;</span>
+<span class="fc bfc" id="L270" title="All 2 branches covered.">            if (min &gt; max) {</span>
+<span class="fc" id="L271">                return -1;</span>
             }
 
             // ignore entry left of leftmost
-<span class="fc bfc" id="L215" title="All 2 branches covered.">            if (min &gt; 1) {</span>
-<span class="fc" id="L216">                d[min - 1] = Integer.MAX_VALUE;</span>
+<span class="fc bfc" id="L275" title="All 2 branches covered.">            if (min &gt; 1) {</span>
+<span class="fc" id="L276">                d[min - 1] = Integer.MAX_VALUE;</span>
             }
 
             // iterates through [min, max] in s
-<span class="fc bfc" id="L220" title="All 2 branches covered.">            for (int i = min; i &lt;= max; i++) {</span>
-<span class="fc bfc" id="L221" title="All 2 branches covered.">                if (left.charAt(i - 1) == t_j) {</span>
+<span class="fc bfc" id="L280" title="All 2 branches covered.">            for (int i = min; i &lt;= max; i++) {</span>
+<span class="fc bfc" id="L281" title="All 2 branches covered.">                if (left.charAt(i - 1) == rightJ) {</span>
                     // diagonally left and up
-<span class="fc" id="L223">                    d[i] = p[i - 1];</span>
+<span class="fc" id="L283">                    d[i] = p[i - 1];</span>
                 } else {
                     // 1 + minimum of cell to the left, to the top, diagonally
                     // left and up
-<span class="fc" id="L227">                    d[i] = 1 + Math.min(Math.min(d[i - 1], p[i]), p[i - 1]);</span>
+<span class="fc" id="L287">                    d[i] = 1 + Math.min(Math.min(d[i - 1], p[i]), p[i - 1]);</span>
                 }
             }
 
             // copy current distance counts to 'previous row' distance counts
-<span class="fc" id="L232">            _d = p;</span>
-<span class="fc" id="L233">            p = d;</span>
-<span class="fc" id="L234">            d = _d;</span>
+<span class="fc" id="L292">            tempD = p;</span>
+<span class="fc" id="L293">            p = d;</span>
+<span class="fc" id="L294">            d = tempD;</span>
         }
 
         // if p[n] is greater than the threshold, there's no guarantee on it
         // being the correct
         // distance
-<span class="fc bfc" id="L240" title="All 2 branches covered.">        if (p[n] &lt;= threshold) {</span>
-<span class="fc" id="L241">            return p[n];</span>
+<span class="fc bfc" id="L300" title="All 2 branches covered.">        if (p[n] &lt;= threshold) {</span>
+<span class="fc" id="L301">            return p[n];</span>
+        }
+<span class="fc" id="L303">        return -1;</span>
+    }
+
+    /**
+     * &lt;p&gt;Find the Levenshtein distance between two Strings.&lt;/p&gt;
+     *
+     * &lt;p&gt;A higher score indicates a greater distance.&lt;/p&gt;
+     *
+     * &lt;p&gt;The previous implementation of the Levenshtein distance algorithm
+     * was from &lt;a href=&quot;http://www.merriampark.com/ld.htm&quot;&gt;http://www.merriampark.com/ld.htm&lt;/a&gt;&lt;/p&gt;
+     *
+     * &lt;p&gt;Chas Emerick has written an implementation in Java, which avoids an OutOfMemoryError
+     * which can occur when my Java implementation is used with very large strings.&lt;br&gt;
+     * This implementation of the Levenshtein distance algorithm
+     * is from &lt;a href=&quot;http://www.merriampark.com/ldjava.htm&quot;&gt;http://www.merriampark.com/ldjava.htm&lt;/a&gt;&lt;/p&gt;
+     *
+     * &lt;pre&gt;
+     * unlimitedCompare(null, *)             = IllegalArgumentException
+     * unlimitedCompare(*, null)             = IllegalArgumentException
+     * unlimitedCompare(&quot;&quot;,&quot;&quot;)               = 0
+     * unlimitedCompare(&quot;&quot;,&quot;a&quot;)              = 1
+     * unlimitedCompare(&quot;aaapppp&quot;, &quot;&quot;)       = 7
+     * unlimitedCompare(&quot;frog&quot;, &quot;fog&quot;)       = 1
+     * unlimitedCompare(&quot;fly&quot;, &quot;ant&quot;)        = 3
+     * unlimitedCompare(&quot;elephant&quot;, &quot;hippo&quot;) = 7
+     * unlimitedCompare(&quot;hippo&quot;, &quot;elephant&quot;) = 7
+     * unlimitedCompare(&quot;hippo&quot;, &quot;zzzzzzzz&quot;) = 8
+     * unlimitedCompare(&quot;hello&quot;, &quot;hallo&quot;)    = 1
+     * &lt;/pre&gt;
+     *
+     * @param left the first String, must not be null
+     * @param right the second String, must not be null
+     * @return result distance, or -1
+     * @throws IllegalArgumentException if either String input {@code null}
+     */
+    private static int unlimitedCompare(CharSequence left, CharSequence right) {
+<span class="fc bfc" id="L339" title="All 4 branches covered.">        if (left == null || right == null) {</span>
+<span class="fc" id="L340">            throw new IllegalArgumentException(&quot;Strings must not be null&quot;);</span>
+        }
+
+        /*
+           The difference between this impl. and the previous is that, rather
+           than creating and retaining a matrix of size s.length() + 1 by t.length() + 1,
+           we maintain two single-dimensional arrays of length s.length() + 1.  The first, d,
+           is the 'current working' distance array that maintains the newest distance cost
+           counts as we iterate through the characters of String s.  Each time we increment
+           the index of String t we are comparing, d is copied to p, the second int[].  Doing so
+           allows us to retain the previous cost counts as required by the algorithm (taking
+           the minimum of the cost count to the left, up one, and diagonally up and to the left
+           of the current cost count being calculated).  (Note that the arrays aren't really
+           copied anymore, just switched...this is clearly much better than cloning an array
+           or doing a System.arraycopy() each time  through the outer loop.)
+
+           Effectively, the difference between the two implementations is this one does not
+           cause an out of memory condition when calculating the LD over two very large strings.
+         */
+
+<span class="fc" id="L360">        int n = left.length(); // length of left</span>
+<span class="fc" id="L361">        int m = right.length(); // length of right</span>
+
+<span class="fc bfc" id="L363" title="All 2 branches covered.">        if (n == 0) {</span>
+<span class="fc" id="L364">            return m;</span>
+<span class="fc bfc" id="L365" title="All 2 branches covered.">        } else if (m == 0) {</span>
+<span class="fc" id="L366">            return n;</span>
+        }
+
+<span class="fc bfc" id="L369" title="All 2 branches covered.">        if (n &gt; m) {</span>
+            // swap the input strings to consume less memory
+<span class="fc" id="L371">            final CharSequence tmp = left;</span>
+<span class="fc" id="L372">            left = right;</span>
+<span class="fc" id="L373">            right = tmp;</span>
+<span class="fc" id="L374">            n = m;</span>
+<span class="fc" id="L375">            m = right.length();</span>
         }
-<span class="fc" id="L243">        return -1;</span>
+
+<span class="fc" id="L378">        int[] p = new int[n + 1]; //'previous' cost array, horizontally</span>
+<span class="fc" id="L379">        int[] d = new int[n + 1]; // cost array, horizontally</span>
+        int[] tempD; //placeholder to assist in swapping p and d
+
+        // indexes into strings left and right
+        int i; // iterates through left
+        int j; // iterates through right
+
+        char rightJ; // jth character of right
+
+        int cost; // cost
+
+<span class="fc bfc" id="L390" title="All 2 branches covered.">        for (i = 0; i &lt;= n; i++) {</span>
+<span class="fc" id="L391">            p[i] = i;</span>
+        }
+
+<span class="fc bfc" id="L394" title="All 2 branches covered.">        for (j = 1; j &lt;= m; j++) {</span>
+<span class="fc" id="L395">            rightJ = right.charAt(j - 1);</span>
+<span class="fc" id="L396">            d[0] = j;</span>
+
+<span class="fc bfc" id="L398" title="All 2 branches covered.">            for (i = 1; i &lt;= n; i++) {</span>
+<span class="fc bfc" id="L399" title="All 2 branches covered.">                cost = left.charAt(i - 1) == rightJ ? 0 : 1;</span>
+                // minimum of cell to the left+1, to the top+1, diagonally left and up +cost
+<span class="fc" id="L401">                d[i] = Math.min(Math.min(d[i - 1] + 1, p[i] + 1), p[i - 1] + cost);</span>
+            }
+
+            // copy current distance counts to 'previous row' distance counts
+<span class="fc" id="L405">            tempD = p;</span>
+<span class="fc" id="L406">            p = d;</span>
+<span class="fc" id="L407">            d = tempD;</span>
+        }
+
+        // our last action in the above loop was to switch d and p, so p now
+        // actually has the most recent cost counts
+<span class="fc" id="L412">        return p[n];</span>
     }
 
 }

Modified: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/index.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/index.html (original)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/index.html Fri Apr 17 06:46:28 2015
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>org.apache.commons.text.similarity</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Text</a> &gt; <span class="el_package">org.apache.commons.text.similarity</span></div><h1>org.apache.commons.text.similarity</h1><table class="cover
 age" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></
 thead><tfoot><tr><td>Total</td><td class="bar">39 of 717</td><td class="ctr2">95%</td><td class="bar">18 of 122</td><td class="ctr2">85%</td><td class="ctr1">17</td><td class="ctr2">77</td><td class="ctr1">12</td><td class="ctr2">159</td><td class="ctr1">1</td><td class="ctr2">16</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="JaroWrinklerDistance.html" class="el_class">JaroWrinklerDistance</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="8" height="10" title="27" alt="27"/><img src="../.resources/greenbar.gif" width="111" height="10" title="349" alt="349"/></td><td class="ctr2" id="c2">93%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="30" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="90" height="10" title="48" alt="48"/></td><td class="ctr2" id="e3">75%</td><td class="ctr1" id="f0">14</td><td class="ctr2" id="g0">40</td><td class="ctr1" id="h0">10</td><t
 d class="ctr2" id="i0">82</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">8</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="FuzzyScore.html" class="el_class">FuzzyScore</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="1" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="78" alt="78"/></td><td class="ctr2" id="c1">93%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="30" height="10" title="16" alt="16"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g2">11</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i2">23</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">3</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a1"><a href="HammingDistance.html" class="el_class">HammingDistance</a></td><td class="bar" id="b2"><img src="../.resources/red
 bar.gif" width="1" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="12" height="10" title="38" alt="38"/></td><td class="ctr2" id="c3">88%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="1" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="16" height="10" title="9" alt="9"/></td><td class="ctr2" id="e2">90%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g3">7</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i3">10</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k3">2</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a3"><a href="LevenshteinDistance.html" class="el_class">LevenshteinDistance</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="67" height="10" title="213" alt="213"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="1" height="10" title="1" alt="1"/><img src="
 ../.resources/greenbar.gif" width="58" height="10" title="31" alt="31"/></td><td class="ctr2" id="e1">97%</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g1">19</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i1">44</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k2">3</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>org.apache.commons.text.similarity</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.source.html" class="el_source">Source Files</a><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Text</a> &gt; <span class="el_package">org.apache.commons.text.similarity</span></div><h1>org.apache.commons.text.similarity</h1><table class="cover
 age" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></
 thead><tfoot><tr><td>Total</td><td class="bar">65 of 1,087</td><td class="ctr2">94%</td><td class="bar">25 of 162</td><td class="ctr2">85%</td><td class="ctr1">28</td><td class="ctr2">112</td><td class="ctr1">20</td><td class="ctr2">249</td><td class="ctr1">5</td><td class="ctr2">31</td><td class="ctr1">0</td><td class="ctr2">7</td></tr></tfoot><tbody><tr><td id="a5"><a href="JaroWrinklerDistance.html" class="el_class">JaroWrinklerDistance</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="8" height="10" title="27" alt="27"/><img src="../.resources/greenbar.gif" width="111" height="10" title="353" alt="353"/></td><td class="ctr2" id="c4">93%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="30" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="90" height="10" title="48" alt="48"/></td><td class="ctr2" id="e4">75%</td><td class="ctr1" id="f0">14</td><td class="ctr2" id="g0">40</td><td class="ctr1" id="h0">10</td
 ><td class="ctr2" id="i0">87</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k0">8</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a6"><a href="LevenshteinDistance.html" class="el_class">LevenshteinDistance</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="5" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="112" height="10" title="357" alt="357"/></td><td class="ctr2" id="c2">96%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="7" height="10" title="4" alt="4"/><img src="../.resources/greenbar.gif" width="97" height="10" title="52" alt="52"/></td><td class="ctr2" id="e2">93%</td><td class="ctr1" id="f1">6</td><td class="ctr2" id="g1">36</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i1">83</td><td class="ctr1" id="j0">2</td><td class="ctr2" id="k1">8</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a1"><a href="CosineSimila
 rity.html" class="el_class">CosineSimilarity</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="2" height="10" title="8" alt="8"/><img src="../.resources/greenbar.gif" width="39" height="10" title="125" alt="125"/></td><td class="ctr2" id="c3">94%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="7" height="10" title="4" alt="4"/><img src="../.resources/greenbar.gif" width="18" height="10" title="10" alt="10"/></td><td class="ctr2" id="e5">71%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g2">11</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i3">25</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k2">4</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a2"><a href="EditDistanceFrom.html" class="el_class">EditDistanceFrom</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="1" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="7" height
 ="10" title="23" alt="23"/></td><td class="ctr2" id="c6">79%</td><td class="bar" id="d5"><img src="../.resources/greenbar.gif" width="3" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">2</td><td class="ctr2" id="g5">5</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i5">9</td><td class="ctr1" id="j1">2</td><td class="ctr2" id="k3">4</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr><tr><td id="a4"><a href="HammingDistance.html" class="el_class">HammingDistance</a></td><td class="bar" id="b4"><img src="../.resources/redbar.gif" width="1" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="12" height="10" title="38" alt="38"/></td><td class="ctr2" id="c5">88%</td><td class="bar" id="d3"><img src="../.resources/redbar.gif" width="1" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="16" height="10" title="9" alt="9"/></td><td class="ctr2" id="e3">90%</td><td class
 ="ctr1" id="f4">1</td><td class="ctr2" id="g4">7</td><td class="ctr1" id="h4">1</td><td class="ctr2" id="i4">10</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">2</td><td class="ctr1" id="l4">0</td><td class="ctr2" id="m4">1</td></tr><tr><td id="a3"><a href="FuzzyScore.html" class="el_class">FuzzyScore</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="26" height="10" title="83" alt="83"/></td><td class="ctr2" id="c1">97%</td><td class="bar" id="d4"><img src="../.resources/greenbar.gif" width="30" height="10" title="16" alt="16"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f5">1</td><td class="ctr2" id="g3">11</td><td class="ctr1" id="h5">1</td><td class="ctr2" id="i2">26</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k4">3</td><td class="ctr1" id="l5">0</td><td class="ctr2" id="m5">1</td></tr><tr><td id="a0"><a href="CosineDistance.html" class="el_class">CosineDistance</a></td><td class="bar" id="b6"><img src="../.resour
 ces/greenbar.gif" width="13" height="10" title="43" alt="43"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">2</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">9</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">2</td><td class="ctr1" id="l6">0</td><td class="ctr2" id="m6">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html>
\ No newline at end of file

Modified: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/index.source.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/index.source.html (original)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/index.source.html Fri Apr 17 06:46:28 2015
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>org.apache.commons.text.similarity</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Text</a> &gt; <span class="el_package">org.apache.commons.text.similarity</span></div><h1>org.apache.commons.text.similarity</h1><table class="coverage" cellspac
 ing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot>
 <tr><td>Total</td><td class="bar">39 of 717</td><td class="ctr2">95%</td><td class="bar">18 of 122</td><td class="ctr2">85%</td><td class="ctr1">17</td><td class="ctr2">77</td><td class="ctr1">12</td><td class="ctr2">159</td><td class="ctr1">1</td><td class="ctr2">16</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="JaroWrinklerDistance.java.html" class="el_source">JaroWrinklerDistance.java</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="8" height="10" title="27" alt="27"/><img src="../.resources/greenbar.gif" width="111" height="10" title="349" alt="349"/></td><td class="ctr2" id="c2">93%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="30" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="90" height="10" title="48" alt="48"/></td><td class="ctr2" id="e3">75%</td><td class="ctr1" id="f0">14</td><td class="ctr2" id="g0">40</td><td class="ctr1" id="h0">10</td><td 
 class="ctr2" id="i0">82</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">8</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="FuzzyScore.java.html" class="el_source">FuzzyScore.java</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="1" height="10" title="6" alt="6"/><img src="../.resources/greenbar.gif" width="24" height="10" title="78" alt="78"/></td><td class="ctr2" id="c1">93%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="30" height="10" title="16" alt="16"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g2">11</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i2">23</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">3</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a1"><a href="HammingDistance.java.html" class="el_source">HammingDistance.java</a></td><td class="bar" id="b2"><img sr
 c="../.resources/redbar.gif" width="1" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="12" height="10" title="38" alt="38"/></td><td class="ctr2" id="c3">88%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="1" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="16" height="10" title="9" alt="9"/></td><td class="ctr2" id="e2">90%</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g3">7</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i3">10</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k3">2</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a3"><a href="LevenshteinDistance.java.html" class="el_source">LevenshteinDistance.java</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="67" height="10" title="213" alt="213"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="1" height="10
 " title="1" alt="1"/><img src="../.resources/greenbar.gif" width="58" height="10" title="31" alt="31"/></td><td class="ctr2" id="e1">97%</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g1">19</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i1">44</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k2">3</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>org.apache.commons.text.similarity</title><script type="text/javascript" src="../.resources/sort.js"></script></head><body onload="initialSort(['breadcrumb', 'coveragetable'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="index.html" class="el_class">Classes</a><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Text</a> &gt; <span class="el_package">org.apache.commons.text.similarity</span></div><h1>org.apache.commons.text.similarity</h1><table class="coverage" cellspac
 ing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Classes</td></tr></thead><tfoot>
 <tr><td>Total</td><td class="bar">65 of 1,087</td><td class="ctr2">94%</td><td class="bar">25 of 162</td><td class="ctr2">85%</td><td class="ctr1">28</td><td class="ctr2">112</td><td class="ctr1">20</td><td class="ctr2">249</td><td class="ctr1">5</td><td class="ctr2">31</td><td class="ctr1">0</td><td class="ctr2">7</td></tr></tfoot><tbody><tr><td id="a5"><a href="JaroWrinklerDistance.java.html" class="el_source">JaroWrinklerDistance.java</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="8" height="10" title="27" alt="27"/><img src="../.resources/greenbar.gif" width="111" height="10" title="353" alt="353"/></td><td class="ctr2" id="c4">93%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="30" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="90" height="10" title="48" alt="48"/></td><td class="ctr2" id="e4">75%</td><td class="ctr1" id="f0">14</td><td class="ctr2" id="g0">40</td><td class="ctr1" id="h0">10</td><
 td class="ctr2" id="i0">87</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k0">8</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a6"><a href="LevenshteinDistance.java.html" class="el_source">LevenshteinDistance.java</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="5" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="112" height="10" title="357" alt="357"/></td><td class="ctr2" id="c2">96%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="7" height="10" title="4" alt="4"/><img src="../.resources/greenbar.gif" width="97" height="10" title="52" alt="52"/></td><td class="ctr2" id="e2">93%</td><td class="ctr1" id="f1">6</td><td class="ctr2" id="g1">36</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i1">83</td><td class="ctr1" id="j0">2</td><td class="ctr2" id="k1">8</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a1"><a href="Cos
 ineSimilarity.java.html" class="el_source">CosineSimilarity.java</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="2" height="10" title="8" alt="8"/><img src="../.resources/greenbar.gif" width="39" height="10" title="125" alt="125"/></td><td class="ctr2" id="c3">94%</td><td class="bar" id="d2"><img src="../.resources/redbar.gif" width="7" height="10" title="4" alt="4"/><img src="../.resources/greenbar.gif" width="18" height="10" title="10" alt="10"/></td><td class="ctr2" id="e5">71%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g2">11</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i3">25</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k2">4</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">1</td></tr><tr><td id="a2"><a href="EditDistanceFrom.java.html" class="el_source">EditDistanceFrom.java</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="1" height="10" title="6" alt="6"/><img src="../.resources
 /greenbar.gif" width="7" height="10" title="23" alt="23"/></td><td class="ctr2" id="c6">79%</td><td class="bar" id="d5"><img src="../.resources/greenbar.gif" width="3" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">2</td><td class="ctr2" id="g5">5</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i5">9</td><td class="ctr1" id="j1">2</td><td class="ctr2" id="k3">4</td><td class="ctr1" id="l3">0</td><td class="ctr2" id="m3">1</td></tr><tr><td id="a4"><a href="HammingDistance.java.html" class="el_source">HammingDistance.java</a></td><td class="bar" id="b4"><img src="../.resources/redbar.gif" width="1" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="12" height="10" title="38" alt="38"/></td><td class="ctr2" id="c5">88%</td><td class="bar" id="d3"><img src="../.resources/redbar.gif" width="1" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="16" height="10" title="9" alt="9"/></td>
 <td class="ctr2" id="e3">90%</td><td class="ctr1" id="f4">1</td><td class="ctr2" id="g4">7</td><td class="ctr1" id="h4">1</td><td class="ctr2" id="i4">10</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">2</td><td class="ctr1" id="l4">0</td><td class="ctr2" id="m4">1</td></tr><tr><td id="a3"><a href="FuzzyScore.java.html" class="el_source">FuzzyScore.java</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="26" height="10" title="83" alt="83"/></td><td class="ctr2" id="c1">97%</td><td class="bar" id="d4"><img src="../.resources/greenbar.gif" width="30" height="10" title="16" alt="16"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f5">1</td><td class="ctr2" id="g3">11</td><td class="ctr1" id="h5">1</td><td class="ctr2" id="i2">26</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k4">3</td><td class="ctr1" id="l5">0</td><td class="ctr2" id="m5">1</td></tr><tr><td id="a0"><a href="CosineDistance.java.html" class="el_source">CosineDi
 stance.java</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="13" height="10" title="43" alt="43"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d6"/><td class="ctr2" id="e6">n/a</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g6">2</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">9</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">2</td><td class="ctr1" id="l6">0</td><td class="ctr2" id="m6">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.2.201409121644</span></div></body></html>
\ No newline at end of file



Mime
View raw message