commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ki...@apache.org
Subject svn commit: r947984 [23/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
Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/HumanNameParser.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/HumanNameParser.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/HumanNameParser.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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>HumanNameParser</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.names</a> &gt; <span class="el_class">HumanNameParser</span></div><h1>HumanNameParser</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td clas
 s="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">25 of 303</td><td class="ctr2">92%</td><td class="bar">1 of 2</td><td class="ctr2">50%</td><td class="ctr1">4</td><td class="ctr2">13</td><td class="ctr1">
 4</td><td class="ctr2">41</td><td class="ctr1">3</td><td class="ctr2">12</td></tr></tfoot><tbody><tr><td id="a11"><a href="HumanNameParser.java.html#L230" class="el_method">parse()</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="12" height="10" title="16" alt="16"/><img src="../.resources/greenbar.gif" width="79" height="10" title="101" alt="101"/></td><td class="ctr2" id="c8">86%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="60" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="60" height="10" title="1" alt="1"/></td><td class="ctr2" id="e0">50%</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">17</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a4"><a href="HumanNameParser.java.html#L149" class="el_method">getName()</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="2" height=
 "10" title="3" alt="3"/></td><td class="ctr2" id="c9">0%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a8"><a href="HumanNameParser.java.html#L212" class="el_method">getSuffixes()</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c10">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">1</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a6"><a href="HumanNameParser.java.html#L221" class="el_method">getPrefixes()</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="2" height="10" title="3" alt="3"/></td
 ><td class="ctr2" id="c11">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">1</td><td class="ctr2" id="i5">1</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a9"><a href="HumanNameParser.java.html#L120" class="el_method">HumanNameParser(Name)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="120" height="10" title="152" alt="152"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i1">13</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a10"><a href="HumanNameParser.java.html#L112" class="el_method">HumanNameParser(String)</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="5" height="10" title="7" alt="7"/>
 </td><td class="ctr2" id="c1">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a2"><a href="HumanNameParser.java.html#L158" class="el_method">getLeadingInit()</a></td><td class="bar" id="b6"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c2">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">1</td><td class="ctr1" id="h6">0</td><td class="ctr2" id="i6">1</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a0"><a href="HumanNameParser.java.html#L167" class="el_method">getFirst()</a></td><td class="bar" id="b7"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2"
  id="c3">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><tr><td id="a5"><a href="HumanNameParser.java.html#L176" class="el_method">getNickname()</a></td><td class="bar" id="b8"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f8">0</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i8">1</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a3"><a href="HumanNameParser.java.html#L185" class="el_method">getMiddle()</a></td><td class="bar" id="b9"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c5">100%</td><td c
 lass="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i9">1</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a1"><a href="HumanNameParser.java.html#L194" class="el_method">getLast()</a></td><td class="bar" id="b10"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i10">1</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a7"><a href="HumanNameParser.java.html#L203" class="el_method">getSuffix()</a></td><td class="bar" id="b11"><img src="../.resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c7">100%</td><td class="bar" id="d1
 1"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i11">1</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/HumanNameParser.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/HumanNameParser.java.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/HumanNameParser.java.html Fri Apr 17 06:46:28 2015
@@ -0,0 +1,270 @@
+<?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>HumanNameParser.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.text.names</a> &gt; <span class="el_source">HumanNameParser.java</span><
 /div><h1>HumanNameParser.java</h1><pre class="source lang-java linenums">/*
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.text.names;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * &lt;p&gt;A parser capable of parsing name parts out of a single string.&lt;/p&gt;
+ *
+ * &lt;p&gt;The code works by basically applying several Regexes in a certain order
+ * and removing (chopping) tokens off the original string. The parser consumes
+ * the tokens during its creation.&lt;/p&gt;
+ *
+ * &lt;ul&gt;
+ * &lt;li&gt;J. Walter Weatherman &lt;/li&gt;
+ * &lt;li&gt;de la Cruz, Ana M.&lt;/li&gt;
+ * &lt;li&gt;James C. ('Jimmy') O'Dell, Jr.&lt;/li&gt;
+ * &lt;/ul&gt;
+ *
+ * &lt;p&gt;and parses out the:&lt;/p&gt;
+ *
+ * &lt;ul&gt;
+ * &lt;li&gt;leading initial (Like &quot;J.&quot; in &quot;J. Walter Weatherman&quot;)&lt;/li&gt;
+ * &lt;li&gt;first name (or first initial in a name like 'R. Crumb')&lt;/li&gt;
+ * &lt;li&gt;nicknames (like &quot;Jimmy&quot; in &quot;James C. ('Jimmy') O'Dell, Jr.&quot;)&lt;/li&gt;
+ * &lt;li&gt;middle names&lt;/li&gt;
+ * &lt;li&gt;last name (including compound ones like &quot;van der Sar' and &quot;Ortega y Gasset&quot;), and&lt;/li&gt;
+ * &lt;li&gt;suffix (like 'Jr.', 'III')&lt;/li&gt;
+ * &lt;/ul&gt;
+ *
+ * &lt;pre&gt;
+ * Name name = new Name(&quot;Sérgio Vieira de Mello&quot;);
+ * HumanNameParser parser = new HumanNameParser(name);
+ * String firstName = parser.getFirst();
+ * String nickname = parser.getNickname();
+ * // ...
+ * &lt;/pre&gt;
+ *
+ * &lt;p&gt;The original code was written in &lt;a href=&quot;http://jasonpriem.com/human-name-parse&quot;&gt;PHP&lt;/a&gt;
+ * and ported to &lt;a href=&quot;http://tupilabs.github.io/HumanNameParser.java/&quot;&gt;Java&lt;/a&gt;.&lt;/p&gt;
+ *
+ * &lt;p&gt;This implementation is based on the Java implementation, with additions
+ * suggested in &lt;a href=&quot;https://issues.apache.org/jira/browse/SANDBOX-487&quot;&gt;SANDBOX-487&lt;/a&gt;.&lt;/p&gt;
+ *
+ * &lt;p&gt;This class is not thread-safe.&lt;/p&gt;
+ *
+ * @since 1.0
+ */
+public class HumanNameParser {
+
+    /**
+     * Name parsed.
+     */
+    private Name name;
+    /**
+     * Leading init part.
+     */
+    private String leadingInit;
+    /**
+     * First name.
+     */
+    private String first;
+    /**
+     * Single nickname found in the name input.
+     */
+    private String nickname;
+    /**
+     * Middle name.
+     */
+    private String middle;
+    /**
+     * Last name.
+     */
+    private String last;
+    /**
+     * Name suffix.
+     */
+    private String suffix;
+    /**
+     * Suffixes found.
+     */
+    private List&lt;String&gt; suffixes;
+    /**
+     * Prefixes found.
+     */
+    private List&lt;String&gt; prefixes;
+
+    /**
+     * Creates a parser given a string name.
+     *
+     * @param name string name
+     */
+    public HumanNameParser(String name) {
+<span class="fc" id="L112">        this(new Name(name));</span>
+<span class="fc" id="L113">    }</span>
+
+    /**
+     * Creates a parser given a {@code Name} object.
+     *
+     * @param name {@code Name}
+     */
+<span class="fc" id="L120">    public HumanNameParser(Name name) {</span>
+<span class="fc" id="L121">        this.name = name;</span>
+
+<span class="fc" id="L123">        this.leadingInit = &quot;&quot;;</span>
+<span class="fc" id="L124">        this.first = &quot;&quot;;</span>
+<span class="fc" id="L125">        this.nickname = &quot;&quot;;</span>
+<span class="fc" id="L126">        this.middle = &quot;&quot;;</span>
+<span class="fc" id="L127">        this.last = &quot;&quot;;</span>
+<span class="fc" id="L128">        this.suffix = &quot;&quot;;</span>
+
+<span class="fc" id="L130">        this.suffixes = Arrays.asList(new String[] {</span>
+                &quot;esq&quot;, &quot;esquire&quot;, &quot;jr&quot;,
+                &quot;sr&quot;, &quot;2&quot;, &quot;ii&quot;, &quot;iii&quot;, &quot;iv&quot; });
+<span class="fc" id="L133">        this.prefixes = Arrays</span>
+<span class="fc" id="L134">            .asList(new String[] {</span>
+                    &quot;bar&quot;, &quot;ben&quot;, &quot;bin&quot;, &quot;da&quot;, &quot;dal&quot;,
+                    &quot;de la&quot;, &quot;de&quot;, &quot;del&quot;, &quot;der&quot;, &quot;di&quot;, &quot;ibn&quot;, &quot;la&quot;, &quot;le&quot;,
+                    &quot;san&quot;, &quot;st&quot;, &quot;ste&quot;, &quot;van&quot;, &quot;van der&quot;, &quot;van den&quot;, &quot;vel&quot;,
+                    &quot;von&quot; });
+
+<span class="fc" id="L140">        this.parse();</span>
+<span class="fc" id="L141">    }</span>
+
+    /**
+     * Gets the {@code Name} object.
+     *
+     * @return the {@code Name} object
+     */
+    public Name getName() {
+<span class="nc" id="L149">        return name;</span>
+    }
+
+    /**
+     * Gets the leading init part of the name.
+     *
+     * @return the leading init part of the name
+     */
+    public String getLeadingInit() {
+<span class="fc" id="L158">        return leadingInit;</span>
+    }
+
+    /**
+     * Gets the first name.
+     *
+     * @return first name
+     */
+    public String getFirst() {
+<span class="fc" id="L167">        return first;</span>
+    }
+
+    /**
+     * Gets the nickname.
+     *
+     * @return the nickname
+     */
+    public String getNickname() {
+<span class="fc" id="L176">        return nickname;</span>
+    }
+
+    /**
+     * Gets the middle name.
+     *
+     * @return the middle name
+     */
+    public String getMiddle() {
+<span class="fc" id="L185">        return middle;</span>
+    }
+
+    /**
+     * Gets the last name.
+     *
+     * @return the last name
+     */
+    public String getLast() {
+<span class="fc" id="L194">        return last;</span>
+    }
+
+    /**
+     * Gets the suffix part of the name.
+     *
+     * @return the name suffix
+     */
+    public String getSuffix() {
+<span class="fc" id="L203">        return suffix;</span>
+    }
+
+    /**
+     * Gets the name suffixes.
+     *
+     * @return the name suffixes
+     */
+    public List&lt;String&gt; getSuffixes() {
+<span class="nc" id="L212">        return suffixes;</span>
+    }
+
+    /**
+     * Gets the name prefixes.
+     *
+     * @return the name prefixes
+     */
+    public List&lt;String&gt; getPrefixes() {
+<span class="nc" id="L221">        return prefixes;</span>
+    }
+
+    /**
+     * Consumes the string and creates the name parts.
+     *
+     * @throws NameParseException if the parser fails to retrieve the name parts
+     */
+    private void parse() {
+<span class="fc" id="L230">        String suffixes = StringUtils.join(this.suffixes, &quot;\\.*|&quot;) + &quot;\\.*&quot;;</span>
+<span class="fc" id="L231">        String prefixes = StringUtils.join(this.prefixes, &quot; |&quot;) + &quot; &quot;;</span>
+
+        // The regex use is a bit tricky.  *Everything* matched by the regex will be replaced,
+        // but you can select a particular parenthesized submatch to be returned.
+        // Also, note that each regex requres that the preceding ones have been run, and matches chopped out.
+        // names that starts or end w/ an apostrophe break this
+<span class="fc" id="L237">        String nicknamesRegex = &quot;(?i) ('|\\\&quot;|\\(\\\&quot;*'*)(.+?)('|\\\&quot;|\\\&quot;*'*\\)) &quot;;</span>
+<span class="fc" id="L238">        String suffixRegex = &quot;(?i),* *((&quot; + suffixes + &quot;)$)&quot;;</span>
+<span class="fc" id="L239">        String lastRegex = &quot;(?i)(?!^)\\b([^ ]+ y |&quot; + prefixes + &quot;)*[^ ]+$&quot;;</span>
+        // note the lookahead, which isn't returned or replaced
+<span class="fc" id="L241">        String leadingInitRegex = &quot;(?i)(^(.\\.*)(?= \\p{L}{2}))&quot;;</span>
+<span class="fc" id="L242">        String firstRegex = &quot;(?i)^([^ ]+)&quot;;</span>
+
+        // get nickname, if there is one
+<span class="fc" id="L245">        this.nickname = this.name.chopWithRegex(nicknamesRegex, 2);</span>
+
+        // get suffix, if there is one
+<span class="fc" id="L248">        this.suffix = this.name.chopWithRegex(suffixRegex, 1);</span>
+
+        // flip the before-comma and after-comma parts of the name
+<span class="fc" id="L251">        this.name.flip(&quot;,&quot;);</span>
+
+        // get the last name
+<span class="fc" id="L254">        this.last = this.name.chopWithRegex(lastRegex, 0);</span>
+
+        // get the first initial, if there is one
+<span class="fc" id="L257">        this.leadingInit = this.name.chopWithRegex(leadingInitRegex, 1);</span>
+
+        // get the first name
+<span class="fc" id="L260">        this.first = this.name.chopWithRegex(firstRegex, 0);</span>
+<span class="pc bpc" id="L261" title="1 of 2 branches missed.">        if (StringUtils.isBlank(this.first)) {</span>
+<span class="nc" id="L262">            throw new NameParseException(&quot;Couldn't find a first name in '{&quot; + this.name.getStr() + &quot;}'&quot;);</span>
+        }
+
+        // if anything's left, that's the middle name
+<span class="fc" id="L266">        this.middle = this.name.getStr();</span>
+<span class="fc" id="L267">    }</span>
+
+}
+</pre><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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/Name.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/Name.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/Name.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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>Name</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.names</a> &gt; <span class="el_class">Name</span></div><h1>Name</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="togg
 leSort(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">20 of 148</td><td class="ctr2">86%</td><td class="bar">5 of 16</td><td class="ctr2">69%</td><td class="ctr1">5</td><td class="ctr2">14</td><td class="ctr1">2</td><td class="ctr2">36</td><t
 d class="ctr1">0</td><td class="ctr2">6</td></tr></tfoot><tbody><tr><td id="a1"><a href="Name.java.html#L112" class="el_method">flip(String)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="27" height="10" title="14" alt="14"/><img src="../.resources/greenbar.gif" width="71" height="10" title="37" alt="37"/></td><td class="ctr2" id="c5">73%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="24" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="48" height="10" title="4" alt="4"/></td><td class="ctr2" id="e1">67%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g1">4</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i1">8</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="Name.java.html#L76" class="el_method">chopWithRegex(String, int)</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="11" height="10" title="6" alt="6"/><img src="../
 .resources/greenbar.gif" width="108" height="10" title="56" alt="56"/></td><td class="ctr2" id="c4">90%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="36" height="10" title="3" alt="3"/><img src="../.resources/greenbar.gif" width="84" height="10" title="7" alt="7"/></td><td class="ctr2" id="e0">70%</td><td class="ctr1" id="f0">3</td><td class="ctr2" id="g0">6</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i0">17</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a4"><a href="Name.java.html#L131" class="el_method">norm()</a></td><td class="bar" id="b2"><img src="../.resources/greenbar.gif" width="38" height="10" title="20" alt="20"/></td><td class="ctr2" id="c0">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">4</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr>
 <td id="a3"><a href="Name.java.html#L42" class="el_method">Name(String)</a></td><td class="bar" id="b3"><img src="../.resources/greenbar.gif" width="11" height="10" title="6" alt="6"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">3</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a5"><a href="Name.java.html#L61" class="el_method">setStr(String)</a></td><td class="bar" id="b4"><img src="../.resources/greenbar.gif" width="11" height="10" title="6" alt="6"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">3</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr><tr><td id="a2"><a href="Name.java.html#L52" cl
 ass="el_method">getStr()</a></td><td class="bar" id="b5"><img src="../.resources/greenbar.gif" width="5" height="10" title="3" alt="3"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d5"/><td class="ctr2" id="e5">n/a</td><td class="ctr1" id="f5">0</td><td class="ctr2" id="g5">1</td><td class="ctr1" id="h5">0</td><td class="ctr2" id="i5">1</td><td class="ctr1" id="j5">0</td><td class="ctr2" id="k5">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/Name.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/Name.java.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/Name.java.html Fri Apr 17 06:46:28 2015
@@ -0,0 +1,137 @@
+<?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>Name.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.text.names</a> &gt; <span class="el_source">Name.java</span></div><h1>Name.java</h1
 ><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.text.names;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * &lt;p&gt;A {@code Name} object that encapsulates a name string, and contains the logic
+ * for handling with Regexes.&lt;/p&gt;
+ *
+ * &lt;p&gt;This class is not thread-safe.&lt;/p&gt;
+ *
+ * @since 1.0
+ */
+public class Name {
+
+    /**
+     * Encapsulated string. Not immutable!
+     */
+    private String str;
+
+    /**
+     * Creates a new Name object.
+     *
+     * @param str encapsulated string.
+     */
+<span class="fc" id="L42">    public Name(String str) {</span>
+<span class="fc" id="L43">        this.str = str;</span>
+<span class="fc" id="L44">    }</span>
+
+    /**
+     * Gets the encapsulated string.
+     *
+     * @return encapsulated string
+     */
+    public String getStr() {
+<span class="fc" id="L52">        return str;</span>
+    }
+
+    /**
+     * Sets the encapsulated string value.
+     *
+     * @param str string value
+     */
+    public void setStr(String str) {
+<span class="fc" id="L61">        this.str = str;</span>
+<span class="fc" id="L62">        this.norm();</span>
+<span class="fc" id="L63">    }</span>
+
+    /**
+     * Uses a regex to chop off and return part of the namestring.
+     * There are two parts: first, it returns the matched substring,
+     * and then it removes that substring from the encapsulated
+     * string and normalizes it.
+     *
+     * @param regex matches the part of the namestring to chop off
+     * @param submatchIndex which of the parenthesized submatches to use
+     * @return the part of the namestring that got chopped off
+     */
+    public String chopWithRegex(String regex, int submatchIndex) {
+<span class="fc" id="L76">        String chopped = &quot;&quot;;</span>
+<span class="fc" id="L77">        Pattern pattern = Pattern.compile(regex);</span>
+<span class="fc" id="L78">        Matcher matcher = pattern.matcher(this.str);</span>
+
+        // workdaround for numReplacements in Java
+<span class="fc" id="L81">        int numReplacements = 0;</span>
+<span class="fc bfc" id="L82" title="All 2 branches covered.">        while (matcher.find()) {</span>
+<span class="fc" id="L83">            numReplacements++;</span>
+        }
+
+        // recreate or the groups are gone
+<span class="fc" id="L87">        pattern = Pattern.compile(regex);</span>
+<span class="fc" id="L88">        matcher = pattern.matcher(this.str);</span>
+<span class="fc bfc" id="L89" title="All 2 branches covered.">        if (matcher.find()) {</span>
+<span class="pc bpc" id="L90" title="1 of 2 branches missed.">            boolean subset = matcher.groupCount() &gt; submatchIndex;</span>
+<span class="pc bpc" id="L91" title="1 of 2 branches missed.">            if (subset) {</span>
+<span class="fc" id="L92">                this.str = this.str.replaceAll(regex, &quot; &quot;);</span>
+<span class="pc bpc" id="L93" title="1 of 2 branches missed.">                if (numReplacements &gt; 1) {</span>
+<span class="nc" id="L94">                    throw new NameParseException(&quot;The regex being used to find the name has multiple matches.&quot;);</span>
+                }
+<span class="fc" id="L96">                this.norm();</span>
+<span class="fc" id="L97">                return matcher.group(submatchIndex).trim();</span>
+            }
+        }
+<span class="fc" id="L100">        return chopped;</span>
+    }
+
+    /**
+     * Flips the front and back parts of a name with one another.
+     * Front and back are determined by a specified character somewhere in the
+     * middle of the string.
+     *
+     * @param flipAroundChar the character(s) demarcating the two halves you want to flip.
+     * @throws NameParseException if a regex fails or a condition is not expected
+     */
+    public void flip(String flipAroundChar) {
+<span class="fc" id="L112">        String[] parts = this.str.split(flipAroundChar);</span>
+<span class="pc bpc" id="L113" title="1 of 2 branches missed.">        if (parts != null) {</span>
+<span class="fc bfc" id="L114" title="All 2 branches covered.">            if (parts.length == 2) {</span>
+<span class="fc" id="L115">                this.str = String.format(&quot;%s %s&quot;, parts[1], parts[0]);</span>
+<span class="fc" id="L116">                this.norm();</span>
+<span class="pc bpc" id="L117" title="1 of 2 branches missed.">            } else if (parts.length &gt; 2) {</span>
+<span class="nc" id="L118">                throw new NameParseException(</span>
+                        &quot;Can't flip around multiple '&quot; + flipAroundChar + &quot;' characters in namestring.&quot;);
+            }
+        }
+<span class="fc" id="L122">    }</span>
+
+    /**
+     * &lt;p&gt;Removes extra whitespace and punctuation from {@code this.str}.&lt;/p&gt;
+     *
+     * &lt;p&gt;Strips whitespace chars from ends, strips redundant whitespace, converts
+     * whitespace chars to &quot; &quot;.&lt;/p&gt;
+     */
+    public void norm() {
+<span class="fc" id="L131">        this.str = this.str.trim();</span>
+<span class="fc" id="L132">        this.str = this.str.replaceAll(&quot;\\s+&quot;, &quot; &quot;);</span>
+<span class="fc" id="L133">        this.str = this.str.replaceAll(&quot;,$&quot;, &quot; &quot;);</span>
+<span class="fc" id="L134">    }</span>
+
+}
+</pre><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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/NameParseException.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/NameParseException.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/NameParseException.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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>NameParseException</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.names</a> &gt; <span class="el_class">NameParseException</span></div><h1>NameParseException</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">23 of 23</td><td class="ctr2">0%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">5</td><td class="ctr2">5</td><td class="
 ctr1">10</td><td class="ctr2">10</td><td class="ctr1">5</td><td class="ctr2">5</td></tr></tfoot><tbody><tr><td id="a3"><a href="NameParseException.java.html#L76" class="el_method">NameParseException(String, Throwable, boolean, boolean)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="120" height="10" title="7" alt="7"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="NameParseException.java.html#L63" class="el_method">NameParseException(String, Throwable)</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="85" height="10" title="5" alt="5"/></td><td class="ctr2" id="c1">0%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">1</td><td class="ct
 r2" id="g1">1</td><td class="ctr1" id="h1">2</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="NameParseException.java.html#L44" class="el_method">NameParseException(String)</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="68" height="10" title="4" alt="4"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a4"><a href="NameParseException.java.html#L53" class="el_method">NameParseException(Throwable)</a></td><td class="bar" id="b3"><img src="../.resources/redbar.gif" width="68" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">1</td><td cla
 ss="ctr2" id="g3">1</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i3">2</td><td class="ctr1" id="j3">1</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a0"><a href="NameParseException.java.html#L35" class="el_method">NameParseException()</a></td><td class="bar" id="b4"><img src="../.resources/redbar.gif" width="51" height="10" title="3" alt="3"/></td><td class="ctr2" id="c4">0%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">1</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h4">2</td><td class="ctr2" id="i4">2</td><td class="ctr1" id="j4">1</td><td class="ctr2" id="k4">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/NameParseException.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/NameParseException.java.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/NameParseException.java.html Fri Apr 17 06:46:28 2015
@@ -0,0 +1,80 @@
+<?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>NameParseException.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.text.names</a> &gt; <span class="el_source">NameParseException.java</
 span></div><h1>NameParseException.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.text.names;
+
+/**
+ * Name parse exception.
+ *
+ * @since 1.0
+ */
+public class NameParseException extends RuntimeException {
+
+    /**
+     * Serial UID.
+     */
+    private static final long serialVersionUID = -2375904385006224156L;
+
+    /**
+     * Constructor.
+     */
+    public NameParseException() {
+<span class="nc" id="L35">        super();</span>
+<span class="nc" id="L36">    }</span>
+
+    /**
+     * Contructor with message.
+     *
+     * @param message message
+     */
+    public NameParseException(String message) {
+<span class="nc" id="L44">        super(message);</span>
+<span class="nc" id="L45">    }</span>
+
+    /**
+     * Constructor with case.
+     *
+     * @param cause cause
+     */
+    public NameParseException(Throwable cause) {
+<span class="nc" id="L53">        super(cause);</span>
+<span class="nc" id="L54">    }</span>
+
+    /**
+     * Constructor with message and cause.
+     *
+     * @param message message
+     * @param cause cause
+     */
+    public NameParseException(String message, Throwable cause) {
+<span class="nc" id="L63">        super(message, cause);</span>
+<span class="nc" id="L64">    }</span>
+
+    /**
+     * Complete constructor.
+     *
+     * @param message message
+     * @param cause cause
+     * @param enableSuppression flag to enable suppression
+     * @param writableStackTrace a writable stack trace
+     */
+    public NameParseException(String message, Throwable cause,
+            boolean enableSuppression, boolean writableStackTrace) {
+<span class="nc" id="L76">        super(message, cause, enableSuppression, writableStackTrace);</span>
+<span class="nc" id="L77">    }</span>
+
+}
+</pre><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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/index.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/index.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/index.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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.names</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.names</span></div><h1>org.apache.commons.text.names</h1><table class="coverage" cellspacin
 g="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><t
 r><td>Total</td><td class="bar">68 of 474</td><td class="ctr2">86%</td><td class="bar">6 of 18</td><td class="ctr2">67%</td><td class="ctr1">14</td><td class="ctr2">32</td><td class="ctr1">16</td><td class="ctr2">87</td><td class="ctr1">8</td><td class="ctr2">23</td><td class="ctr1">1</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a0"><a href="HumanNameParser.html" class="el_class">HumanNameParser</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="9" height="10" title="25" alt="25"/><img src="../.resources/greenbar.gif" width="110" height="10" title="278" alt="278"/></td><td class="ctr2" id="c0">92%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="7" height="10" title="1" alt="1"/></td><td class="ctr2" id="e1">50%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g1">13</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i0">41</td><td cl
 ass="ctr1" id="j1">3</td><td class="ctr2" id="k0">12</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a2"><a href="NameParseException.html" class="el_class">NameParseException</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="9" height="10" title="23" alt="23"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f0">5</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h0">10</td><td class="ctr2" id="i2">10</td><td class="ctr1" id="j0">5</td><td class="ctr2" id="k2">5</td><td class="ctr1" id="l0">1</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a1"><a href="Name.html" class="el_class">Name</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="7" height="10" title="20" alt="20"/><img src="../.resources/greenbar.gif" width="50" height="10" title="128" alt="128"/></td><td class="ctr2" id="c1">86%</td><td class="bar" id="d0"><img src=".
 ./.resources/redbar.gif" width="37" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="82" height="10" title="11" alt="11"/></td><td class="ctr2" id="e0">69%</td><td class="ctr1" id="f1">5</td><td class="ctr2" id="g0">14</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i1">36</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">6</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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/index.source.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/index.source.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.names/index.source.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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.names</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.names</span></div><h1>org.apache.commons.text.names</h1><table class="coverage" cellspacing="0" id="cov
 eragetable"><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">68 of 474</td><td class="ctr2">86%</td><td class="bar">6 of 18</td><td class="ctr2">67%</td><td class="ctr1">14</td><td class="ctr2">32</td><td class="ctr1">16</td><td class="ctr2">87</td><td class="ctr1">8</td><td class="ctr2">23</td><td class="ctr1">1</td><td class="ctr2">3</td></tr></tfoot><tbody><tr><td id="a0"><a href="HumanNameParser.java.html" class="el_source">HumanNameParser.java</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="9" height="10" title="25" alt="25"/><img src="../.resources/greenbar.gif" width="110" height="10" title="278" alt="278"/></td><td class="ctr2" id="c0">92%</td><td class="bar" id="d1"><img src="../.resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../.resources/greenbar.gif" width="7" height="10" title="1" alt="1"/></td><td class="ctr2" id="e1">50%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g1">13</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i0">41</td><td clas
 s="ctr1" id="j1">3</td><td class="ctr2" id="k0">12</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a2"><a href="NameParseException.java.html" class="el_source">NameParseException.java</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="9" height="10" title="23" alt="23"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f0">5</td><td class="ctr2" id="g2">5</td><td class="ctr1" id="h0">10</td><td class="ctr2" id="i2">10</td><td class="ctr1" id="j0">5</td><td class="ctr2" id="k2">5</td><td class="ctr1" id="l0">1</td><td class="ctr2" id="m1">1</td></tr><tr><td id="a1"><a href="Name.java.html" class="el_source">Name.java</a></td><td class="bar" id="b2"><img src="../.resources/redbar.gif" width="7" height="10" title="20" alt="20"/><img src="../.resources/greenbar.gif" width="50" height="10" title="128" alt="128"/></td><td class="ctr2" id="c1">86%</td><td class="bar"
  id="d0"><img src="../.resources/redbar.gif" width="37" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="82" height="10" title="11" alt="11"/></td><td class="ctr2" id="e0">69%</td><td class="ctr1" id="f1">5</td><td class="ctr2" id="g0">14</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i1">36</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">6</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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/Counter.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/Counter.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/Counter.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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>Counter</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.internal</a> &gt; <span class="el_class">Counter</span></div><h1>Counter</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortabl
 e" 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">3 of 49</td><td class="ctr2">94%</td><td class="bar">0 of 4</td><td class="ctr2">100%</td><td class="ctr1">1</td><td class="ctr2">4</td><td class="ctr1">2</td><td cl
 ass="ctr2">10</td><td class="ctr1">1</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="Counter.java.html#L38" class="el_method">Counter()</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="7" height="10" title="3" alt="3"/></td><td class="ctr2" id="c1">0%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i1">2</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="Counter.java.html#L49" class="el_method">of(CharSequence[])</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="120" height="10" title="46" alt="46"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../.resources/greenbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g0">3</
 td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i0">8</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/Counter.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/Counter.java.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/Counter.java.html Fri Apr 17 06:46:28 2015
@@ -0,0 +1,62 @@
+<?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>Counter.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.text.similarity.internal</a> &gt; <span class="el_source">Counter.java</span></d
 iv><h1>Counter.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.text.similarity.internal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Java implementation of Python's collections Counter module.
+ *
+ * &lt;p&gt;It counts how many times each element provided occurred in an array and
+ * returns a dict with the element as key and the count as value.&lt;/p&gt;
+ *
+ * @see &lt;a href=&quot;https://docs.python.org/dev/library/collections.html#collections.Counter&quot;&gt;
+ * https://docs.python.org/dev/library/collections.html#collections.Counter&lt;/a&gt;
+ * @since 0.1
+ */
+public final class Counter {
+
+    /**
+     * Hidden constructor.
+     */
+    private Counter() {
+<span class="nc" id="L38">        super();</span>
+<span class="nc" id="L39">    }</span>
+
+    /**
+     * It counts how many times each element provided occurred in an array and
+     * returns a dict with the element as key and the count as value.
+     *
+     * @param tokens array of tokens
+     * @return dict, where the elements are key, and the count the value
+     */
+    public static Map&lt;CharSequence, Integer&gt; of(CharSequence[] tokens) {
+<span class="fc" id="L49">        final Map&lt;CharSequence, Integer&gt; innerCounter = new HashMap&lt;CharSequence, Integer&gt;();</span>
+<span class="fc bfc" id="L50" title="All 2 branches covered.">        for (CharSequence token : tokens) {</span>
+<span class="fc bfc" id="L51" title="All 2 branches covered.">            if (innerCounter.containsKey(token)) {</span>
+<span class="fc" id="L52">                int value = innerCounter.get(token);</span>
+<span class="fc" id="L53">                innerCounter.put(token, ++value);</span>
+<span class="fc" id="L54">            } else {</span>
+<span class="fc" id="L55">                innerCounter.put(token, 1);</span>
+            }
+        }
+<span class="fc" id="L58">        return innerCounter;</span>
+    }
+
+}
+</pre><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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/RegexTokenizer.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/RegexTokenizer.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/RegexTokenizer.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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>RegexTokenizer</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.internal</a> &gt; <span class="el_class">RegexTokenizer</span></div><h1>RegexTokenizer</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">5 of 44</td><td class="ctr2">89%</td><td class="bar">2 of 6</td><td class="ctr2">67%</td><td class="ctr1">2</td><td class="ctr2">5</td><td class
 ="ctr1">1</td><td class="ctr2">9</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="RegexTokenizer.java.html#L40" class="el_method">tokenize(CharSequence)</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="14" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="105" height="10" title="36" alt="36"/></td><td class="ctr2" id="c1">88%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="40" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="80" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">67%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">4</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">8</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="RegexTokenizer.java.html#L31" class="el_method">RegexTokenizer()</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.g
 if" width="8" height="10" title="3" alt="3"/></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></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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/RegexTokenizer.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/RegexTokenizer.java.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/RegexTokenizer.java.html Fri Apr 17 06:46:28 2015
@@ -0,0 +1,53 @@
+<?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>RegexTokenizer.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.text.similarity.internal</a> &gt; <span class="el_source">RegexTokenizer.
 java</span></div><h1>RegexTokenizer.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.text.similarity.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * A simple word tokenizer that utilizes regex to find words. It applies a regex
+ * {@code}(\w)+{@code} over the input text to extract words from a given character
+ * sequence.
+ *
+ * @since 0.1
+ */
+<span class="fc" id="L31">public class RegexTokenizer implements Tokenizer&lt;CharSequence&gt; {</span>
+
+    /**
+     * {@inheritDoc}
+     *
+     * @throws IllegalArgumentException if the input text is blank
+     */
+    @Override
+    public CharSequence[] tokenize(CharSequence text) {
+<span class="pc bpc" id="L40" title="2 of 4 branches missed.">        if (text == null || text.toString().trim().equals(&quot;&quot;)) {</span>
+<span class="nc" id="L41">            throw new IllegalArgumentException(&quot;Invalid text&quot;);</span>
+        }
+<span class="fc" id="L43">        Pattern pattern = Pattern.compile(&quot;(\\w)+&quot;);</span>
+<span class="fc" id="L44">        Matcher matcher = pattern.matcher(text.toString());</span>
+<span class="fc" id="L45">        List&lt;String&gt; tokens = new ArrayList&lt;String&gt;();</span>
+<span class="fc bfc" id="L46" title="All 2 branches covered.">        while (matcher.find()) {</span>
+<span class="fc" id="L47">            tokens.add(matcher.group(0));</span>
+        }
+<span class="fc" id="L49">        return tokens.toArray(new String[0]);</span>
+    }
+
+}
+</pre><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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/index.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/index.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/index.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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.internal</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.internal</span></div><h1>org.apache.commons.text.similarity.inter
 nal</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><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">8 of 93</td><td class="ctr2">91%</td><td class="bar">2 of 10</td><td class="ctr2">80%</td><td class="ctr1">3</td><td class="ctr2">9</td><td class="ctr1">3</td><td class="ctr2">19</td><td class="ctr1">1</td><td class="ctr2">4</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="RegexTokenizer.html" class="el_class">RegexTokenizer</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="12" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="95" height="10" title="39" alt="39"/></td><td class="ctr2" id="c1">89%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="40" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="80" height="10" title="4" alt="4"/></td><td class="ctr2" id="e1">67%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">5</td><td class="ctr1" id="h1">1</td><td cla
 ss="ctr2" id="i1">9</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">2</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="Counter.html" class="el_class">Counter</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="7" height="10" title="3" alt="3"/><img src="../.resources/greenbar.gif" width="112" height="10" title="46" alt="46"/></td><td class="ctr2" id="c0">94%</td><td class="bar" id="d1"><img src="../.resources/greenbar.gif" width="80" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">4</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">10</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">2</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/index.source.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/index.source.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity.internal/index.source.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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.internal</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.internal</span></div><h1>org.apache.commons.text.similarity.internal</h1><tabl
 e 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><td class="sortable ctr1" id="l" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="m" onclick="toggleSort(this)">Class
 es</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">8 of 93</td><td class="ctr2">91%</td><td class="bar">2 of 10</td><td class="ctr2">80%</td><td class="ctr1">3</td><td class="ctr2">9</td><td class="ctr1">3</td><td class="ctr2">19</td><td class="ctr1">1</td><td class="ctr2">4</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="RegexTokenizer.java.html" class="el_source">RegexTokenizer.java</a></td><td class="bar" id="b0"><img src="../.resources/redbar.gif" width="12" height="10" title="5" alt="5"/><img src="../.resources/greenbar.gif" width="95" height="10" title="39" alt="39"/></td><td class="ctr2" id="c1">89%</td><td class="bar" id="d0"><img src="../.resources/redbar.gif" width="40" height="10" title="2" alt="2"/><img src="../.resources/greenbar.gif" width="80" height="10" title="4" alt="4"/></td><td class="ctr2" id="e1">67%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">5</td><td class="ctr1" id="h1">1</td><td class
 ="ctr2" id="i1">9</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">2</td><td class="ctr1" id="l0">0</td><td class="ctr2" id="m0">1</td></tr><tr><td id="a0"><a href="Counter.java.html" class="el_source">Counter.java</a></td><td class="bar" id="b1"><img src="../.resources/redbar.gif" width="7" height="10" title="3" alt="3"/><img src="../.resources/greenbar.gif" width="112" height="10" title="46" alt="46"/></td><td class="ctr2" id="c0">94%</td><td class="bar" id="d1"><img src="../.resources/greenbar.gif" width="80" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">4</td><td class="ctr1" id="h0">2</td><td class="ctr2" id="i0">10</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k1">2</td><td class="ctr1" id="l1">0</td><td class="ctr2" id="m1">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/CosineDistance.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/CosineDistance.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/CosineDistance.html Fri Apr 17 06:46:28 2015
@@ -0,0 +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>CosineDistance</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">CosineDistance</span></div><h1>CosineDistance</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td cl
 ass="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">0 of 43</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">
 0</td><td class="ctr2">9</td><td class="ctr1">0</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a0"><a href="CosineDistance.java.html#L46" class="el_method">apply(CharSequence, CharSequence)</a></td><td class="bar" id="b0"><img src="../.resources/greenbar.gif" width="120" height="10" title="30" alt="30"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">6</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="CosineDistance.java.html#L34" class="el_method">CosineDistance()</a></td><td class="bar" id="b1"><img src="../.resources/greenbar.gif" width="52" height="10" title="13" alt="13"/></td><td class="ctr2" id="c1">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</t
 d><td class="ctr2" id="i1">3</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">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

Added: websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/CosineDistance.java.html
==============================================================================
--- websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/CosineDistance.java.html (added)
+++ websites/production/commons/content/sandbox/commons-text/jacoco/org.apache.commons.text.similarity/CosineDistance.java.html Fri Apr 17 06:46:28 2015
@@ -0,0 +1,56 @@
+<?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>CosineDistance.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><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.source.html" class="el_package">org.apache.commons.text.similarity</a> &gt; <span class="el_source">CosineDistance.java</spa
 n></div><h1>CosineDistance.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.text.similarity;
+
+import java.util.Map;
+
+import org.apache.commons.text.similarity.internal.Counter;
+import org.apache.commons.text.similarity.internal.RegexTokenizer;
+import org.apache.commons.text.similarity.internal.Tokenizer;
+
+/**
+ * Measures the cosine distance between two character sequences.
+ *
+ * &lt;p&gt;It utilizes the CosineSimilarity to compute the distance. Character sequences
+ * are converted into vectors through a simple tokenizer that works with &lt;/p&gt;
+ *
+ * @see org.apache.commons.text.similarity.internal.RegexTokenizer
+ * @since 1.0
+ */
+<span class="fc" id="L34">public class CosineDistance implements EditDistance&lt;Double&gt; {</span>
+    /**
+     * Tokenizer used to convert the character sequence into a vector.
+     */
+<span class="fc" id="L38">    private final Tokenizer&lt;CharSequence&gt; tokenizer = new RegexTokenizer();</span>
+    /**
+     * Cosine similarity.
+     */
+<span class="fc" id="L42">    private final CosineSimilarity cosineSimilarity = new CosineSimilarity();</span>
+
+    @Override
+    public Double apply(CharSequence left, CharSequence right) {
+<span class="fc" id="L46">        CharSequence[] leftTokens = tokenizer.tokenize(left);</span>
+<span class="fc" id="L47">        CharSequence[] rightTokens = tokenizer.tokenize(right);</span>
+
+<span class="fc" id="L49">        Map&lt;CharSequence, Integer&gt; leftVector = Counter.of(leftTokens);</span>
+<span class="fc" id="L50">        Map&lt;CharSequence, Integer&gt; rightVector = Counter.of(rightTokens);</span>
+<span class="fc" id="L51">        double similarity = cosineSimilarity.cosineSimilarity(leftVector, rightVector);</span>
+<span class="fc" id="L52">        return 1.0 - similarity;</span>
+    }
+
+}
+</pre><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