void testReplace5() { assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", "")); } public 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=\"\" ", "")); }
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")); } public void testReplace4() { assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "bce", "xyz")); }
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 testReplace5() {
1
void testReplace1() {
2
        assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
2
        assertEquals("xyzdef", JOrphanUtils.replaceFirst("abcdef", "abc", "xyz"));
3
    }
3
    }
4
    public void testReplace6() {
4
    public void testReplace2() {
5
        assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "alt=\"\" ", ""));
5
        assertEquals("axyzdef", JOrphanUtils.replaceFirst("abcdef", "bc", "xyz"));
6
    }
6
    }
7
    public void testReplace7() {
7
    public void testReplace3() {
8
        assertEquals("alt=\"\"", JOrphanUtils.replaceFirst("alt=\"\"", "alt=\"\" ", ""));
8
        assertEquals("abcxyz", JOrphanUtils.replaceFirst("abcdef", "def", "xyz"));
9
    }
9
    }
10
    public void testReplace8() {
10
    public void testReplace4() {
11
        assertEquals("img src=xyz ", JOrphanUtils.replaceFirst("img src=xyz alt=\"\" ", "alt=\"\" ", ""));
11
        assertEquals("abcdef", JOrphanUtils.replaceFirst("abcdef", "bce", "xyz"));
12
    }
12
    }
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