void testSubstituteURL1() { String input = "This page http://columba.sourceforge.net is net!"; String result = HtmlParser.substituteURL(input); assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A> is net!", result); } public void testSubstituteURL3() { String input = "This page \t(http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239) is net!"; String result = HtmlParser.substituteURL(input); assertEquals( "This page \t(<A HREF=\"http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239\">http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239</A>) is net!", result); } public void testSubstituteURL4() { String input = "This page http://columba.sourceforge.net. is net!"; String result = HtmlParser.substituteURL(input); assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A>. is net!", result); } public void testSubstituteURL5() { String input = "This page http://test.com/$255. is net!"; String result = HtmlParser.substituteURL(input); assertEquals("This page <A HREF=\"http://test.com/$255\">http://test.com/$255</A>. is net!", result); }
void testSubstituteURL3() { String input = "This page \t(http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239) is net!"; String result = HtmlParser.substituteURL(input); assertEquals( "This page \t(<A HREF=\"http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239\">http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239</A>) is net!", result); } public void testSubstituteURL4() { String input = "This page http://columba.sourceforge.net. is net!"; String result = HtmlParser.substituteURL(input); assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A>. is net!", result); } public void testSubstituteURL5() { String input = "This page http://test.com/$255. is net!"; String result = HtmlParser.substituteURL(input); assertEquals("This page <A HREF=\"http://test.com/$255\">http://test.com/$255</A>. is net!", result); } public void testSubstituteURL6() { String input = "http://columbamail.org/jira/browse/CA-117<br>"; String result = HtmlParser.substituteURL(input); assertEquals( "<A HREF=\"http://columbamail.org/jira/browse/CA-117\">http://columbamail.org/jira/browse/CA-117</A><br>", result); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/test/java/org/columba/mail/parser/text/HtmlParserTest.java File path: /columba-1.4-src/mail/src/test/java/org/columba/mail/parser/text/HtmlParserTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testSubstituteURL1() {
2
        String input = "This page http://columba.sourceforge.net is net!";
3
        String result = HtmlParser.substituteURL(input);
4
        assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A> is net!", result);
5
    }
6
    public void testSubstituteURL3() {
1
void testSubstituteURL3() {
7
        String input = "This page \t(http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239) is net!";
2
        String input = "This page \t(http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239) is net!";
8
        String result = HtmlParser.substituteURL(input);
3
        String result = HtmlParser.substituteURL(input);
9
     
4
     
10
        assertEquals(
5
        assertEquals(
11
                "This page \t(<A HREF=\"http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239\">http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239</A>) is net!",
6
                "This page \t(<A HREF=\"http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239\">http://columba.sourceforge.net/phpBB2/viewtopic.php?p=239#239</A>) is net!",
12
                result);
7
                result);
13
    }
8
    }
14
    public void testSubstituteURL4() {
9
    public void testSubstituteURL4() {
15
        String input = "This page http://columba.sourceforge.net. is net!";
10
        String input = "This page http://columba.sourceforge.net. is net!";
16
        String result = HtmlParser.substituteURL(input);
11
        String result = HtmlParser.substituteURL(input);
17
        assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A>. is net!", result);
12
        assertEquals("This page <A HREF=\"http://columba.sourceforge.net\">http://columba.sourceforge.net</A>. is net!", result);
18
    }
13
    }
19
    public void testSubstituteURL5() {
14
    public void testSubstituteURL5() {
20
        String input = "This page http://test.com/$255. is net!";
15
        String input = "This page http://test.com/$255. is net!";
21
        String result = HtmlParser.substituteURL(input);
16
        String result = HtmlParser.substituteURL(input);
22
        assertEquals("This page <A HREF=\"http://test.com/$255\">http://test.com/$255</A>. is net!", result);
17
        assertEquals("This page <A HREF=\"http://test.com/$255\">http://test.com/$255</A>. is net!", result);
23
    }
18
    }
19
    
20
    public void testSubstituteURL6() {
21
        String input = "http://columbamail.org/jira/browse/CA-117<br>";
22
        String result = HtmlParser.substituteURL(input);
23
     
24
        assertEquals(
25
                "<A HREF=\"http://columbamail.org/jira/browse/CA-117\">http://columbamail.org/jira/browse/CA-117</A><br>",
26
                result);
27
    }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0