void testReplace1() { assertEquals("xyzdef", JOrphanUtils.replaceFirst("abcdef", "abc", "xyz")); } public void testReplace2() { assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz")); } public void testReplace3() { assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));
void testReplace6() { assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", "")); } public void testReplace7() { assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", "")); } public void testReplace8() { assertEquals("img src=xyz ", JOrphanUtils.replaceFirst("img src=xyz alt=\"\" ", "alt=\"\" ", ""));
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jorphan/util/TestJorphanUtils.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jorphan/util/TestJorphanUtils.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testReplace1() {
1
void testReplace6() {
2
        assertEquals("xyzdef", JOrphanUtils.replaceFirst("abcdef", "abc", "xyz"));
2
        assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
3
    }
3
    }
4
    public void testReplace2() {
4
    public void testReplace7() {
5
        assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz"));
5
        assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", ""));
6
    }
6
    }
7
    public void testReplace3() {
7
    public void testReplace8() {
8
        assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));
8
        assertEquals("img src=xyz ", JOrphanUtils.replaceFirst("img src=xyz alt=\"\" ", "alt=\"\" ", ""));
9
    
9
    
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