You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@commons.apache.org by br...@apache.org on 2015/03/01 13:14:31 UTC
svn commit: r941823 [14/21] - 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/similarity/ apidocs/org/apache...
Modified: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/JaroWrinklerDistance.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/JaroWrinklerDistance.html (original)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/JaroWrinklerDistance.html Sun Mar 1 12:14:29 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>JaroWrinklerDistance</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> > <a href="index.html" class="el_package">org.apache.commons.text.similarity</a> > <span class="el_class">JaroWrinklerDistance</span></div><h1>JaroWrinklerDistance</h1><table class="coverage" 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></tr></thead><tfoot><tr><td>Total</td><td class="bar">27 of 376</td><td class="ctr2">93%</td><td class="bar">16 of 64</td><td class="ctr2">75%</td><td class="ctr1">14</td><td class="ctr2">4
0</td><td class="ctr1">10</td><td class="ctr2">82</td><td class="ctr1">0</td><td class="ctr2">8</td></tr></tfoot><tbody><tr><td id="a4"><a href="JaroWrinklerDistance.java.html#L279" class="el_method">indexOfDifference(CharSequence[])</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="14" height="10" title="13" alt="13"/><img src="../.resources/greenbar.gif" width="105" height="10" title="96" alt="96"/></td><td class="ctr2" id="c6">88%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="38" height="10" title="9" alt="9"/><img src="../.resources/greenbar.gif" width="81" height="10" title="19" alt="19"/></td><td class="ctr2" id="e5">68%</td><td class="ctr1" id="f0">8</td><td class="ctr2" id="g0">15</td><td class="ctr1" id="h0">5</td><td class="ctr2" id="i0">30</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="JaroWrinklerDistance.java.html#L147" class="el_method">getCommonPrefix(String[])</a></td><
td class="bar" id="b1"><img src="../.resources/redbar.gif" width="13" height="10" title="12" alt="12"/><img src="../.resources/greenbar.gif" width="24" height="10" title="22" alt="22"/></td><td class="ctr2" id="c7">65%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="21" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="21" height="10" title="5" alt="5"/></td><td class="ctr2" id="e6">50%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g1">6</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i3">10</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a6"><a href="JaroWrinklerDistance.java.html#L179" class="el_method">score(CharSequence, CharSequence)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="2" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="94" height="10" title="86" alt="86"/></td><td class="ctr2" id="c5">98%</td><td class="bar" id=
"d2"><img src="../.resources/redbar.gif" width="8" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="25" height="10" title="6" alt="6"/></td><td class="ctr2" id="e4">75%</td><td class="ctr1" id="f2">2</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i1">15</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a3"><a href="JaroWrinklerDistance.java.html#L352" class="el_method">getSetOfMatchingCharacterWithin(CharSequence, CharSequence, int)</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="64" height="10" title="59" alt="59"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="34" height="10" title="8" alt="8"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">5</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">12</td><td class="ctr1" id="j3">0</td><td clas
s="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="JaroWrinklerDistance.java.html#L75" class="el_method">compare(CharSequence, CharSequence)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="42" height="10" title="39" alt="39"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d4"><img src="../.resources/greenbar.gif" width="17" 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="g4">3</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">7</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a0"><a href="JaroWrinklerDistance.java.html#L102" class="el_method">commonPrefixLength(CharSequence, CharSequence)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="24" height="10" title="22" alt="22"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"><img src="../.resources/greenbar.gif" width="8" height="10" tit
le="2" alt="2"/></td><td class="ctr2" id="e2">100%</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g6">2</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i6">2</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a7"><a href="JaroWrinklerDistance.java.html#L231" class="el_method">transpositions(CharSequence, CharSequence)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="24" height="10" title="22" alt="22"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d5"><img src="../.resources/greenbar.gif" width="17" height="10" title="4" alt="4"/></td><td class="ctr2" id="e3">100%</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g5">3</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i5">5</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a5"><a href="JaroWrinklerDistance.java.html#L38" class="el_method">JaroWrinklerDistance()</a></td><td class="bar" id="b7"><img sr
c="../.resources/greenbar.gif" width="3" height="10" title="3" alt="3"/></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="i7">1</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
+<?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>JaroWrinklerDistance</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> > <a href="index.html" class="el_package">org.apache.commons.text.similarity</a> > <span class="el_class">JaroWrinklerDistance</span></div><h1>JaroWrinklerDistance</h1><table class="coverage" 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></tr></thead><tfoot><tr><td>Total</td><td class="bar">27 of 376</td><td class="ctr2">93%</td><td class="bar">16 of 64</td><td class="ctr2">75%</td><td class="ctr1">14</td><td class="ctr2">4
0</td><td class="ctr1">10</td><td class="ctr2">82</td><td class="ctr1">0</td><td class="ctr2">8</td></tr></tfoot><tbody><tr><td id="a4"><a href="JaroWrinklerDistance.java.html#L266" class="el_method">indexOfDifference(CharSequence[])</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="14" height="10" title="13" alt="13"/><img src="../.resources/greenbar.gif" width="105" height="10" title="96" alt="96"/></td><td class="ctr2" id="c6">88%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="38" height="10" title="9" alt="9"/><img src="../.resources/greenbar.gif" width="81" height="10" title="19" alt="19"/></td><td class="ctr2" id="e5">68%</td><td class="ctr1" id="f0">8</td><td class="ctr2" id="g0">15</td><td class="ctr1" id="h0">5</td><td class="ctr2" id="i0">30</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="JaroWrinklerDistance.java.html#L139" class="el_method">getCommonPrefix(String[])</a></td><
td class="bar" id="b1"><img src="../.resources/redbar.gif" width="13" height="10" title="12" alt="12"/><img src="../.resources/greenbar.gif" width="24" height="10" title="22" alt="22"/></td><td class="ctr2" id="c7">65%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="21" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="21" height="10" title="5" alt="5"/></td><td class="ctr2" id="e6">50%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g1">6</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i3">10</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a6"><a href="JaroWrinklerDistance.java.html#L171" class="el_method">score(CharSequence, CharSequence)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="2" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="94" height="10" title="86" alt="86"/></td><td class="ctr2" id="c5">98%</td><td class="bar" id=
"d2"><img src="../.resources/redbar.gif" width="8" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="25" height="10" title="6" alt="6"/></td><td class="ctr2" id="e4">75%</td><td class="ctr1" id="f2">2</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i1">15</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a3"><a href="JaroWrinklerDistance.java.html#L339" class="el_method">getSetOfMatchingCharacterWithin(CharSequence, CharSequence, int)</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="64" height="10" title="59" alt="59"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d3"><img src="../.resources/greenbar.gif" width="34" height="10" title="8" alt="8"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">5</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">12</td><td class="ctr1" id="j3">0</td><td clas
s="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="JaroWrinklerDistance.java.html#L73" class="el_method">compare(CharSequence, CharSequence)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="42" height="10" title="39" alt="39"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d4"><img src="../.resources/greenbar.gif" width="17" 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="g4">3</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">7</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a0"><a href="JaroWrinklerDistance.java.html#L97" class="el_method">commonPrefixLength(CharSequence, CharSequence)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="24" height="10" title="22" alt="22"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d6"><img src="../.resources/greenbar.gif" width="8" height="10" titl
e="2" alt="2"/></td><td class="ctr2" id="e2">100%</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g6">2</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i6">2</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a7"><a href="JaroWrinklerDistance.java.html#L223" class="el_method">transpositions(CharSequence, CharSequence)</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="24" height="10" title="22" alt="22"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d5"><img src="../.resources/greenbar.gif" width="17" height="10" title="4" alt="4"/></td><td class="ctr2" id="e3">100%</td><td class="ctr1" id="f6">0</td><td class="ctr2" id="g5">3</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i5">5</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a5"><a href="JaroWrinklerDistance.java.html#L38" class="el_method">JaroWrinklerDistance()</a></td><td class="bar" id="b7"><img src
="../.resources/greenbar.gif" width="3" height="10" title="3" alt="3"/></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="i7">1</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/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 Sun Mar 1 12:14:29 2015
@@ -17,6 +17,8 @@
package org.apache.commons.text.similarity;
/**
+ * A similarity algorithm indicating the percentage of matched characters between two character sequences.
+ *
* <p>
* The Jaro measure is the weighted sum of percentage of matched characters
* from each file and transposed characters. Winkler increased this measure
@@ -32,8 +34,6 @@ 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<Double> {</span>
@@ -43,26 +43,24 @@ package org.apache.commons.text.similari
public static final int INDEX_NOT_FOUND = -1;
/**
- * <p>
* Find the Jaro Winkler Distance which indicates the similarity score
- * between two Strings.
- * </p>
+ * between two CharSequences.
*
* <pre>
- * StringUtils.getJaroWinklerDistance(null, null) = IllegalArgumentException
- * StringUtils.getJaroWinklerDistance("","") = 0.0
- * StringUtils.getJaroWinklerDistance("","a") = 0.0
- * StringUtils.getJaroWinklerDistance("aaapppp", "") = 0.0
- * StringUtils.getJaroWinklerDistance("frog", "fog") = 0.93
- * StringUtils.getJaroWinklerDistance("fly", "ant") = 0.0
- * StringUtils.getJaroWinklerDistance("elephant", "hippo") = 0.44
- * StringUtils.getJaroWinklerDistance("hippo", "elephant") = 0.44
- * StringUtils.getJaroWinklerDistance("hippo", "zzzzzzzz") = 0.0
- * StringUtils.getJaroWinklerDistance("hello", "hallo") = 0.88
- * StringUtils.getJaroWinklerDistance("ABC Corporation", "ABC Corp") = 0.91
- * StringUtils.getJaroWinklerDistance("D N H Enterprises Inc", "D &amp; H Enterprises, Inc.") = 0.93
- * StringUtils.getJaroWinklerDistance("My Gym Children's Fitness Center", "My Gym. Childrens Fitness") = 0.94
- * StringUtils.getJaroWinklerDistance("PENNSYLVANIA", "PENNCISYLVNIA") = 0.9
+ * distance.compare(null, null) = IllegalArgumentException
+ * distance.compare("","") = 0.0
+ * distance.compare("","a") = 0.0
+ * distance.compare("aaapppp", "") = 0.0
+ * distance.compare("frog", "fog") = 0.93
+ * distance.compare("fly", "ant") = 0.0
+ * distance.compare("elephant", "hippo") = 0.44
+ * distance.compare("hippo", "elephant") = 0.44
+ * distance.compare("hippo", "zzzzzzzz") = 0.0
+ * distance.compare("hello", "hallo") = 0.88
+ * distance.compare("ABC Corporation", "ABC Corp") = 0.91
+ * distance.compare("D N H Enterprises Inc", "D &amp; H Enterprises, Inc.") = 0.93
+ * distance.compare("My Gym Children's Fitness Center", "My Gym. Childrens Fitness") = 0.94
+ * distance.compare("PENNSYLVANIA", "PENNCISYLVNIA") = 0.9
* </pre>
*
* @param left the first String, must not be null
@@ -72,23 +70,20 @@ package org.apache.commons.text.similari
*/
@Override
public Double compare(CharSequence left, CharSequence right) {
-<span class="fc" id="L75"> final double DEFAULT_SCALING_FACTOR = 0.1;</span>
+<span class="fc" id="L73"> final double DEFAULT_SCALING_FACTOR = 0.1;</span>
-<span class="fc bfc" id="L77" title="All 4 branches covered."> if (left == null || right == null) {</span>
-<span class="fc" id="L78"> throw new IllegalArgumentException("Strings must not be null");</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("Strings must not be null");</span>
}
-<span class="fc" id="L81"> final double jaro = score(left, right);</span>
-<span class="fc" id="L82"> final int cl = commonPrefixLength(left, right);</span>
-<span class="fc" id="L83"> final double matchScore = Math.round((jaro + (DEFAULT_SCALING_FACTOR</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"> return matchScore;</span>
+<span class="fc" id="L84"> return matchScore;</span>
}
- // TODO: we can move these methods to a Util class, keep them here,
- // create a common abstract class, shade lang-3.3...
-
/**
* Calculates the number of characters from the beginning of the strings
* that match exactly one-to-one, up to a maximum of four (4) characters.
@@ -99,18 +94,16 @@ package org.apache.commons.text.similari
*/
private static int commonPrefixLength(final CharSequence first,
final CharSequence second) {
-<span class="fc" id="L102"> final int result = getCommonPrefix(first.toString(), second.toString())</span>
+<span class="fc" id="L97"> final int result = getCommonPrefix(first.toString(), second.toString())</span>
.length();
// Limit the result to 4.
-<span class="fc bfc" id="L106" title="All 2 branches covered."> return result > 4 ? 4 : result;</span>
+<span class="fc bfc" id="L101" title="All 2 branches covered."> return result > 4 ? 4 : result;</span>
}
/**
- * <p>
* Compares all Strings in an array and returns the initial sequence of
* characters that is common to all of them.
- * </p>
*
* <p>
* For example,
@@ -118,48 +111,47 @@ package org.apache.commons.text.similari
* </p>
*
* <pre>
- * StringUtils.getCommonPrefix(null) = ""
- * StringUtils.getCommonPrefix(new String[] {}) = ""
- * StringUtils.getCommonPrefix(new String[] {"abc"}) = "abc"
- * StringUtils.getCommonPrefix(new String[] {null, null}) = ""
- * StringUtils.getCommonPrefix(new String[] {"", ""}) = ""
- * StringUtils.getCommonPrefix(new String[] {"", null}) = ""
- * StringUtils.getCommonPrefix(new String[] {"abc", null, null}) = ""
- * StringUtils.getCommonPrefix(new String[] {null, null, "abc"}) = ""
- * StringUtils.getCommonPrefix(new String[] {"", "abc"}) = ""
- * StringUtils.getCommonPrefix(new String[] {"abc", ""}) = ""
- * StringUtils.getCommonPrefix(new String[] {"abc", "abc"}) = "abc"
- * StringUtils.getCommonPrefix(new String[] {"abc", "a"}) = "a"
- * StringUtils.getCommonPrefix(new String[] {"ab", "abxyz"}) = "ab"
- * StringUtils.getCommonPrefix(new String[] {"abcde", "abxyz"}) = "ab"
- * StringUtils.getCommonPrefix(new String[] {"abcde", "xyz"}) = ""
- * StringUtils.getCommonPrefix(new String[] {"xyz", "abcde"}) = ""
- * StringUtils.getCommonPrefix(new String[] {"i am a machine", "i am a robot"}) = "i am a "
+ * getCommonPrefix(null) = ""
+ * getCommonPrefix(new String[] {}) = ""
+ * getCommonPrefix(new String[] {"abc"}) = "abc"
+ * getCommonPrefix(new String[] {null, null}) = ""
+ * getCommonPrefix(new String[] {"", ""}) = ""
+ * getCommonPrefix(new String[] {"", null}) = ""
+ * getCommonPrefix(new String[] {"abc", null, null}) = ""
+ * getCommonPrefix(new String[] {null, null, "abc"}) = ""
+ * getCommonPrefix(new String[] {"", "abc"}) = ""
+ * getCommonPrefix(new String[] {"abc", ""}) = ""
+ * getCommonPrefix(new String[] {"abc", "abc"}) = "abc"
+ * getCommonPrefix(new String[] {"abc", "a"}) = "a"
+ * getCommonPrefix(new String[] {"ab", "abxyz"}) = "ab"
+ * getCommonPrefix(new String[] {"abcde", "abxyz"}) = "ab"
+ * getCommonPrefix(new String[] {"abcde", "xyz"}) = ""
+ * getCommonPrefix(new String[] {"xyz", "abcde"}) = ""
+ * getCommonPrefix(new String[] {"i am a machine", "i am a robot"}) = "i am a "
* </pre>
*
* @param strs array of String objects, entries may be null
* @return the initial sequence of characters that are common to all Strings
* in the array; empty String if the array is null, the elements are
* all null or if there is no common prefix.
- * @since 2.4
*/
public static String getCommonPrefix(final String... strs) {
-<span class="pc bpc" id="L147" title="2 of 4 branches missed."> if (strs == null || strs.length == 0) {</span>
-<span class="nc" id="L148"> return "";</span>
+<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 "";</span>
}
-<span class="fc" id="L150"> final int smallestIndexOfDiff = indexOfDifference(strs);</span>
-<span class="pc bpc" id="L151" title="1 of 2 branches missed."> if (smallestIndexOfDiff == INDEX_NOT_FOUND) {</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>
// all strings were identical
-<span class="nc bnc" id="L153" title="All 2 branches missed."> if (strs[0] == null) {</span>
-<span class="nc" id="L154"> return "";</span>
+<span class="nc bnc" id="L145" title="All 2 branches missed."> if (strs[0] == null) {</span>
+<span class="nc" id="L146"> return "";</span>
}
-<span class="nc" id="L156"> return strs[0];</span>
-<span class="fc bfc" id="L157" title="All 2 branches covered."> } else if (smallestIndexOfDiff == 0) {</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>
// there were no common initial characters
-<span class="fc" id="L159"> return "";</span>
+<span class="fc" id="L151"> return "";</span>
} else {
// we found a common initial character sequence
-<span class="fc" id="L162"> return strs[0].substring(0, smallestIndexOfDiff);</span>
+<span class="fc" id="L154"> return strs[0].substring(0, smallestIndexOfDiff);</span>
}
}
@@ -176,47 +168,47 @@ package org.apache.commons.text.similari
String longer;
// Determine which String is longer.
-<span class="fc bfc" id="L179" title="All 2 branches covered."> if (first.length() > second.length()) {</span>
-<span class="fc" id="L180"> longer = first.toString().toLowerCase();</span>
-<span class="fc" id="L181"> shorter = second.toString().toLowerCase();</span>
+<span class="fc bfc" id="L171" title="All 2 branches covered."> if (first.length() > second.length()) {</span>
+<span class="fc" id="L172"> longer = first.toString().toLowerCase();</span>
+<span class="fc" id="L173"> shorter = second.toString().toLowerCase();</span>
} else {
-<span class="fc" id="L183"> longer = second.toString().toLowerCase();</span>
-<span class="fc" id="L184"> shorter = first.toString().toLowerCase();</span>
+<span class="fc" id="L175"> longer = second.toString().toLowerCase();</span>
+<span class="fc" id="L176"> shorter = first.toString().toLowerCase();</span>
}
// Calculate the half length() distance of the shorter String.
-<span class="fc" id="L188"> final int halflength = shorter.length() / 2 + 1;</span>
+<span class="fc" id="L180"> 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="L194"> final String m1 = getSetOfMatchingCharacterWithin(shorter, longer,</span>
+<span class="fc" id="L186"> final String m1 = getSetOfMatchingCharacterWithin(shorter, longer,</span>
halflength);
-<span class="fc" id="L196"> final String m2 = getSetOfMatchingCharacterWithin(longer, shorter,</span>
+<span class="fc" id="L188"> 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="L201" title="1 of 4 branches missed."> if (m1.length() == 0 || m2.length() == 0) {</span>
-<span class="fc" id="L202"> return 0.0;</span>
+<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>
}
// 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="L207" title="1 of 2 branches missed."> if (m1.length() != m2.length()) {</span>
-<span class="nc" id="L208"> return 0.0;</span>
+<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>
}
// Calculate the number of transposition between the two sets
// of common characters.
-<span class="fc" id="L213"> final int transpositions = transpositions(m1, m2);</span>
+<span class="fc" id="L205"> final int transpositions = transpositions(m1, m2);</span>
// Calculate the distance.
-<span class="fc" id="L216"> final double dist = (m1.length() / ((double) shorter.length())</span>
+<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="L219"> return dist;</span>
+<span class="fc" id="L211"> return dist;</span>
}
/**
@@ -228,20 +220,18 @@ package org.apache.commons.text.similari
*/
protected static int transpositions(final CharSequence first,
final CharSequence second) {
-<span class="fc" id="L231"> int transpositions = 0;</span>
-<span class="fc bfc" id="L232" title="All 2 branches covered."> for (int i = 0; i < first.length(); i++) {</span>
-<span class="fc bfc" id="L233" title="All 2 branches covered."> if (first.charAt(i) != second.charAt(i)) {</span>
-<span class="fc" id="L234"> transpositions++;</span>
+<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 < 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="L237"> return transpositions / 2;</span>
+<span class="fc" id="L229"> return transpositions / 2;</span>
}
/**
- * <p>
* Compares all CharSequences in an array and returns the index at which the
* CharSequences begin to differ.
- * </p>
*
* <p>
* For example,
@@ -249,88 +239,85 @@ package org.apache.commons.text.similari
* </p>
*
* <pre>
- * StringUtils.indexOfDifference(null) = -1
- * StringUtils.indexOfDifference(new String[] {}) = -1
- * StringUtils.indexOfDifference(new String[] {"abc"}) = -1
- * StringUtils.indexOfDifference(new String[] {null, null}) = -1
- * StringUtils.indexOfDifference(new String[] {"", ""}) = -1
- * StringUtils.indexOfDifference(new String[] {"", null}) = 0
- * StringUtils.indexOfDifference(new String[] {"abc", null, null}) = 0
- * StringUtils.indexOfDifference(new String[] {null, null, "abc"}) = 0
- * StringUtils.indexOfDifference(new String[] {"", "abc"}) = 0
- * StringUtils.indexOfDifference(new String[] {"abc", ""}) = 0
- * StringUtils.indexOfDifference(new String[] {"abc", "abc"}) = -1
- * StringUtils.indexOfDifference(new String[] {"abc", "a"}) = 1
- * StringUtils.indexOfDifference(new String[] {"ab", "abxyz"}) = 2
- * StringUtils.indexOfDifference(new String[] {"abcde", "abxyz"}) = 2
- * StringUtils.indexOfDifference(new String[] {"abcde", "xyz"}) = 0
- * StringUtils.indexOfDifference(new String[] {"xyz", "abcde"}) = 0
- * StringUtils.indexOfDifference(new String[] {"i am a machine", "i am a robot"}) = 7
+ * distance.indexOfDifference(null) = -1
+ * distance.indexOfDifference(new String[] {}) = -1
+ * distance.indexOfDifference(new String[] {"abc"}) = -1
+ * distance.indexOfDifference(new String[] {null, null}) = -1
+ * distance.indexOfDifference(new String[] {"", ""}) = -1
+ * distance.indexOfDifference(new String[] {"", null}) = 0
+ * distance.indexOfDifference(new String[] {"abc", null, null}) = 0
+ * distance.indexOfDifference(new String[] {null, null, "abc"}) = 0
+ * distance.indexOfDifference(new String[] {"", "abc"}) = 0
+ * distance.indexOfDifference(new String[] {"abc", ""}) = 0
+ * distance.indexOfDifference(new String[] {"abc", "abc"}) = -1
+ * distance.indexOfDifference(new String[] {"abc", "a"}) = 1
+ * distance.indexOfDifference(new String[] {"ab", "abxyz"}) = 2
+ * distance.indexOfDifference(new String[] {"abcde", "abxyz"}) = 2
+ * distance.indexOfDifference(new String[] {"abcde", "xyz"}) = 0
+ * distance.indexOfDifference(new String[] {"xyz", "abcde"}) = 0
+ * distance.indexOfDifference(new String[] {"i am a machine", "i am a robot"}) = 7
* </pre>
*
* @param css array of CharSequences, entries may be null
* @return the index where the strings begin to differ; -1 if they are all
* equal
- * @since 2.4
- * @since 3.0 Changed signature from indexOfDifference(String...) to
- * indexOfDifference(CharSequence...)
*/
protected static int indexOfDifference(final CharSequence... css) {
-<span class="pc bpc" id="L279" title="2 of 4 branches missed."> if (css == null || css.length <= 1) {</span>
-<span class="nc" id="L280"> return INDEX_NOT_FOUND;</span>
+<span class="pc bpc" id="L266" title="2 of 4 branches missed."> if (css == null || css.length <= 1) {</span>
+<span class="nc" id="L267"> return INDEX_NOT_FOUND;</span>
}
-<span class="fc" id="L282"> boolean anyStringNull = false;</span>
-<span class="fc" id="L283"> boolean allStringsNull = true;</span>
-<span class="fc" id="L284"> final int arrayLen = css.length;</span>
-<span class="fc" id="L285"> int shortestStrLen = Integer.MAX_VALUE;</span>
-<span class="fc" id="L286"> int longestStrLen = 0;</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>
// 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="L291" title="All 2 branches covered."> for (int i = 0; i < arrayLen; i++) {</span>
-<span class="pc bpc" id="L292" title="1 of 2 branches missed."> if (css[i] == null) {</span>
-<span class="nc" id="L293"> anyStringNull = true;</span>
-<span class="nc" id="L294"> shortestStrLen = 0;</span>
+<span class="fc bfc" id="L278" title="All 2 branches covered."> for (int i = 0; i < 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>
} else {
-<span class="fc" id="L296"> allStringsNull = false;</span>
-<span class="fc" id="L297"> shortestStrLen = Math.min(css[i].length(), shortestStrLen);</span>
-<span class="fc" id="L298"> longestStrLen = Math.max(css[i].length(), longestStrLen);</span>
+<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>
}
}
// handle lists containing all nulls or all empty strings
-<span class="pc bpc" id="L303" title="4 of 6 branches missed."> if (allStringsNull || longestStrLen == 0 && !anyStringNull) {</span>
-<span class="nc" id="L304"> return INDEX_NOT_FOUND;</span>
+<span class="pc bpc" id="L290" title="4 of 6 branches missed."> if (allStringsNull || longestStrLen == 0 && !anyStringNull) {</span>
+<span class="nc" id="L291"> return INDEX_NOT_FOUND;</span>
}
// handle lists containing some nulls or some empty strings
-<span class="pc bpc" id="L308" title="1 of 2 branches missed."> if (shortestStrLen == 0) {</span>
-<span class="nc" id="L309"> return 0;</span>
+<span class="pc bpc" id="L295" title="1 of 2 branches missed."> if (shortestStrLen == 0) {</span>
+<span class="nc" id="L296"> return 0;</span>
}
// find the position with the first difference across all strings
-<span class="fc" id="L313"> int firstDiff = -1;</span>
-<span class="fc bfc" id="L314" title="All 2 branches covered."> for (int stringPos = 0; stringPos < shortestStrLen; stringPos++) {</span>
-<span class="fc" id="L315"> final char comparisonChar = css[0].charAt(stringPos);</span>
-<span class="fc bfc" id="L316" title="All 2 branches covered."> for (int arrayPos = 1; arrayPos < arrayLen; arrayPos++) {</span>
-<span class="fc bfc" id="L317" title="All 2 branches covered."> if (css[arrayPos].charAt(stringPos) != comparisonChar) {</span>
-<span class="fc" id="L318"> firstDiff = stringPos;</span>
-<span class="fc" id="L319"> break;</span>
+<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 < 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 < 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 bfc" id="L322" title="All 2 branches covered."> if (firstDiff != -1) {</span>
-<span class="fc" id="L323"> 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="pc bpc" id="L327" title="1 of 4 branches missed."> if (firstDiff == -1 && shortestStrLen != longestStrLen) {</span>
+<span class="pc bpc" id="L314" title="1 of 4 branches missed."> if (firstDiff == -1 && 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="L331"> return shortestStrLen;</span>
+<span class="fc" id="L318"> return shortestStrLen;</span>
}
-<span class="fc" id="L333"> return firstDiff;</span>
+<span class="fc" id="L320"> return firstDiff;</span>
}
/**
@@ -349,25 +336,25 @@ package org.apache.commons.text.similari
*/
protected static String getSetOfMatchingCharacterWithin(
final CharSequence first, final CharSequence second, final int limit) {
-<span class="fc" id="L352"> final StringBuilder common = new StringBuilder();</span>
-<span class="fc" id="L353"> final StringBuilder copy = new StringBuilder(second);</span>
+<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 bfc" id="L355" title="All 2 branches covered."> for (int i = 0; i < first.length(); i++) {</span>
-<span class="fc" id="L356"> final char ch = first.charAt(i);</span>
-<span class="fc" id="L357"> boolean found = false;</span>
+<span class="fc bfc" id="L342" title="All 2 branches covered."> for (int i = 0; i < 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>
// See if the character is within the limit positions away from the
// original position of that character.
-<span class="fc" id="L361"> for (int j = Math.max(0, i - limit); !found</span>
-<span class="fc bfc" id="L362" title="All 4 branches covered."> && j < Math.min(i + limit, second.length()); j++) {</span>
-<span class="fc bfc" id="L363" title="All 2 branches covered."> if (copy.charAt(j) == ch) {</span>
-<span class="fc" id="L364"> found = true;</span>
-<span class="fc" id="L365"> common.append(ch);</span>
-<span class="fc" id="L366"> copy.setCharAt(j, '*');</span>
+<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."> && j < 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="L370"> return common.toString();</span>
+<span class="fc" id="L357"> 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 Sun Mar 1 12:14:29 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> > <a href="index.html" class="el_package">org.apache.commons.text.similarity</a> > <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#L127" 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#L82" 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#L32" 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> > <a href="index.html" class="el_package">org.apache.commons.text.similarity</a> > <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
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 Sun Mar 1 12:14:29 2015
@@ -19,28 +19,24 @@ package org.apache.commons.text.similari
import java.util.Arrays;
/**
+ * An algorithm for measuring the difference between two character sequences.
+ *
* <p>
- * A string metric for measuring the difference between two sequences.
+ * This is the number of changes needed to change one sequence into another,
+ * where each change is a single character modification (deletion, insertion
+ * or substitution).
* </p>
*
* <p>
* This code has been adapted from Apache Commons Lang 3.3.
* </p>
- *
- * @since 1.0
*/
-<span class="fc" id="L32">public class LevenshteinDistance implements StringMetric<Integer> {</span>
+<span class="fc" id="L34">public class LevenshteinDistance implements StringMetric<Integer> {</span>
/**
- * <p>
* Find the Levenshtein distance between two Strings.
- * </p>
*
- * <p>
- * This is the number of changes needed to change one String into another,
- * where each change is a single character modification (deletion, insertion
- * or substitution).
- * </p>
+ * <p>A higher score indicates a greater distance.</p>
*
* <p>
* The previous implementation of the Levenshtein distance algorithm was
@@ -59,17 +55,17 @@ import java.util.Arrays;
* </p>
*
* <pre>
- * StringUtils.getLevenshteinDistance(null, *) = IllegalArgumentException
- * StringUtils.getLevenshteinDistance(*, null) = IllegalArgumentException
- * StringUtils.getLevenshteinDistance("","") = 0
- * StringUtils.getLevenshteinDistance("","a") = 1
- * StringUtils.getLevenshteinDistance("aaapppp", "") = 7
- * StringUtils.getLevenshteinDistance("frog", "fog") = 1
- * StringUtils.getLevenshteinDistance("fly", "ant") = 3
- * StringUtils.getLevenshteinDistance("elephant", "hippo") = 7
- * StringUtils.getLevenshteinDistance("hippo", "elephant") = 7
- * StringUtils.getLevenshteinDistance("hippo", "zzzzzzzz") = 8
- * StringUtils.getLevenshteinDistance("hello", "hallo") = 1
+ * distance.compare(null, *) = IllegalArgumentException
+ * distance.compare(*, null) = IllegalArgumentException
+ * distance.compare("","") = 0
+ * distance.compare("","a") = 1
+ * distance.compare("aaapppp", "") = 7
+ * distance.compare("frog", "fog") = 1
+ * distance.compare("fly", "ant") = 3
+ * distance.compare("elephant", "hippo") = 7
+ * distance.compare("hippo", "elephant") = 7
+ * distance.compare("hippo", "zzzzzzzz") = 8
+ * distance.compare("hello", "hallo") = 1
* </pre>
*
* @param left the first string, must not be null
@@ -79,20 +75,12 @@ import java.util.Arrays;
*/
@Override
public Integer compare(CharSequence left, CharSequence right) {
-<span class="fc" id="L82"> return compare(left, right, Integer.MAX_VALUE);</span>
+<span class="fc" id="L78"> return compare(left, right, Integer.MAX_VALUE);</span>
}
/**
- * <p>
- * Find the Levenshtein distance between two Strings if it's less than or
+ * Find the Levenshtein distance between two CharSequences if it's less than or
* equal to a given threshold.
- * </p>
- *
- * <p>
- * This is the number of changes needed to change one String into another,
- * where each change is a single character modification (deletion, insertion
- * or substitution).
- * </p>
*
* <p>
* This implementation follows from Algorithms on Strings, Trees and
@@ -103,17 +91,17 @@ import java.util.Arrays;
* </p>
*
* <pre>
- * StringUtils.getLevenshteinDistance(null, *, *) = IllegalArgumentException
- * StringUtils.getLevenshteinDistance(*, null, *) = IllegalArgumentException
- * StringUtils.getLevenshteinDistance(*, *, -1) = IllegalArgumentException
- * StringUtils.getLevenshteinDistance("","", 0) = 0
- * StringUtils.getLevenshteinDistance("aaapppp", "", 8) = 7
- * StringUtils.getLevenshteinDistance("aaapppp", "", 7) = 7
- * StringUtils.getLevenshteinDistance("aaapppp", "", 6)) = -1
- * StringUtils.getLevenshteinDistance("elephant", "hippo", 7) = 7
- * StringUtils.getLevenshteinDistance("elephant", "hippo", 6) = -1
- * StringUtils.getLevenshteinDistance("hippo", "elephant", 7) = 7
- * StringUtils.getLevenshteinDistance("hippo", "elephant", 6) = -1
+ * distance.compare(null, *, *) = IllegalArgumentException
+ * distance.compare(*, null, *) = IllegalArgumentException
+ * distance.compare(*, *, -1) = IllegalArgumentException
+ * distance.compare("","", 0) = 0
+ * distance.compare("aaapppp", "", 8) = 7
+ * distance.compare("aaapppp", "", 7) = 7
+ * distance.compare("aaapppp", "", 6)) = -1
+ * distance.compare("elephant", "hippo", 7) = 7
+ * distance.compare("elephant", "hippo", 6) = -1
+ * distance.compare("hippo", "elephant", 7) = 7
+ * distance.compare("hippo", "elephant", 6) = -1
* </pre>
*
* @param left the first string, must not be null
@@ -124,11 +112,11 @@ import java.util.Arrays;
* negative threshold
*/
public Integer compare(CharSequence left, CharSequence right, int threshold) {
-<span class="fc bfc" id="L127" title="All 4 branches covered."> if (left == null || right == null) {</span>
-<span class="fc" id="L128"> throw new IllegalArgumentException("Strings must not be null");</span>
+<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("Strings must not be null");</span>
}
-<span class="fc bfc" id="L130" title="All 2 branches covered."> if (threshold < 0) {</span>
-<span class="fc" id="L131"> throw new IllegalArgumentException("Threshold must not be negative");</span>
+<span class="fc bfc" id="L118" title="All 2 branches covered."> if (threshold < 0) {</span>
+<span class="fc" id="L119"> throw new IllegalArgumentException("Threshold must not be negative");</span>
}
/*
@@ -173,86 +161,86 @@ import java.util.Arrays;
* some discussion.
*/
-<span class="fc" id="L176"> int n = left.length(); // length of s</span>
-<span class="fc" id="L177"> int m = right.length(); // length of t</span>
+<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>
// if one string is empty, the edit distance is necessarily the length
// of the other
-<span class="fc bfc" id="L181" title="All 2 branches covered."> if (n == 0) {</span>
-<span class="pc bpc" id="L182" title="1 of 2 branches missed."> return m <= threshold ? m : -1;</span>
-<span class="fc bfc" id="L183" title="All 2 branches covered."> } else if (m == 0) {</span>
-<span class="fc bfc" id="L184" title="All 2 branches covered."> return n <= threshold ? n : -1;</span>
+<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 <= 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 <= threshold ? n : -1;</span>
}
-<span class="fc bfc" id="L187" title="All 2 branches covered."> if (n > m) {</span>
+<span class="fc bfc" id="L175" title="All 2 branches covered."> if (n > m) {</span>
// swap the two strings to consume less memory
-<span class="fc" id="L189"> final CharSequence tmp = left;</span>
-<span class="fc" id="L190"> left = right;</span>
-<span class="fc" id="L191"> right = tmp;</span>
-<span class="fc" id="L192"> n = m;</span>
-<span class="fc" id="L193"> m = right.length();</span>
+<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="L196"> int[] p = new int[n + 1]; // 'previous' cost array, horizontally</span>
-<span class="fc" id="L197"> int[] d = new int[n + 1]; // cost array, horizontally</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
// fill in starting table values
-<span class="fc" id="L201"> final int boundary = Math.min(n, threshold) + 1;</span>
-<span class="fc bfc" id="L202" title="All 2 branches covered."> for (int i = 0; i < boundary; i++) {</span>
-<span class="fc" id="L203"> p[i] = i;</span>
+<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 < boundary; i++) {</span>
+<span class="fc" id="L191"> 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="L207"> Arrays.fill(p, boundary, p.length, Integer.MAX_VALUE);</span>
-<span class="fc" id="L208"> Arrays.fill(d, Integer.MAX_VALUE);</span>
+<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>
// iterates through t
-<span class="fc bfc" id="L211" title="All 2 branches covered."> for (int j = 1; j <= m; j++) {</span>
-<span class="fc" id="L212"> final char t_j = right.charAt(j - 1); // jth character of t</span>
-<span class="fc" id="L213"> d[0] = j;</span>
+<span class="fc bfc" id="L199" title="All 2 branches covered."> for (int j = 1; j <= 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>
// compute stripe indices, constrain to array size
-<span class="fc" id="L216"> final int min = Math.max(1, j - threshold);</span>
-<span class="fc bfc" id="L217" title="All 2 branches covered."> final int max = j > Integer.MAX_VALUE - threshold ? n : Math.min(</span>
+<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 > 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="L222" title="All 2 branches covered."> if (min > max) {</span>
-<span class="fc" id="L223"> return -1;</span>
+<span class="fc bfc" id="L210" title="All 2 branches covered."> if (min > max) {</span>
+<span class="fc" id="L211"> return -1;</span>
}
// ignore entry left of leftmost
-<span class="fc bfc" id="L227" title="All 2 branches covered."> if (min > 1) {</span>
-<span class="fc" id="L228"> d[min - 1] = Integer.MAX_VALUE;</span>
+<span class="fc bfc" id="L215" title="All 2 branches covered."> if (min > 1) {</span>
+<span class="fc" id="L216"> d[min - 1] = Integer.MAX_VALUE;</span>
}
// iterates through [min, max] in s
-<span class="fc bfc" id="L232" title="All 2 branches covered."> for (int i = min; i <= max; i++) {</span>
-<span class="fc bfc" id="L233" title="All 2 branches covered."> if (left.charAt(i - 1) == t_j) {</span>
+<span class="fc bfc" id="L220" title="All 2 branches covered."> for (int i = min; i <= max; i++) {</span>
+<span class="fc bfc" id="L221" title="All 2 branches covered."> if (left.charAt(i - 1) == t_j) {</span>
// diagonally left and up
-<span class="fc" id="L235"> d[i] = p[i - 1];</span>
+<span class="fc" id="L223"> 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="L239"> d[i] = 1 + Math.min(Math.min(d[i - 1], p[i]), p[i - 1]);</span>
+<span class="fc" id="L227"> 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="L244"> _d = p;</span>
-<span class="fc" id="L245"> p = d;</span>
-<span class="fc" id="L246"> d = _d;</span>
+<span class="fc" id="L232"> _d = p;</span>
+<span class="fc" id="L233"> p = d;</span>
+<span class="fc" id="L234"> d = _d;</span>
}
// if p[n] is greater than the threshold, there's no guarantee on it
// being the correct
// distance
-<span class="fc bfc" id="L252" title="All 2 branches covered."> if (p[n] <= threshold) {</span>
-<span class="fc" id="L253"> return p[n];</span>
+<span class="fc bfc" id="L240" title="All 2 branches covered."> if (p[n] <= threshold) {</span>
+<span class="fc" id="L241"> return p[n];</span>
}
-<span class="fc" id="L255"> return -1;</span>
+<span class="fc" id="L243"> return -1;</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 Sun Mar 1 12:14:29 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> > <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">34 of 674</td><td class="ctr2">95%</td><td class="bar">17 of 112</td><td class="ctr2">85%</td><td class="ctr1">16</td><td class="ctr2">70</td><td class="ctr1">11</td><td class="ctr2">149</td><td class="ctr1">1</td><td class="ctr2">14</td><td class="ctr1">0</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a1"><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="e2">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="FuzzyDistance.html" class="el_class">FuzzyDistance</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="d2"><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="a2"><a href="LevenshteinDistance.html" class="el_class">LevenshteinDistance</a></td><td class="bar" id="b2"><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="f2">1</td><td class="ctr2" id="g1">19</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i1">44</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">3</td><td class="ctr1" id="l2">0</td><td class="ctr2" id="m2">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> > <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