void testEndsWithShorterString() { assertTrue( StringUtils.endsWith( new StringBuffer("12345678"), "78")); } public void testEndsWithSameString() { assertTrue( StringUtils.endsWith( new StringBuffer("123"), "123"));
void testEndsWithNoMatch() { assertFalse( StringUtils.endsWith( new StringBuffer("12345678"), "789")); } public void testEndsWithEmptyBuffer() { assertFalse( StringUtils.endsWith( new StringBuffer(""), "12345667") );
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/StringUtilsTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testEndsWithShorterString() {
1
void testEndsWithNoMatch() {
2
        assertTrue( StringUtils.endsWith( new StringBuffer("12345678"), "78"));
2
        assertFalse( StringUtils.endsWith( new StringBuffer("12345678"), "789"));
3
    }
3
    }
4
    public void testEndsWithSameString() {
4
    public void testEndsWithEmptyBuffer() {
5
        assertTrue( StringUtils.endsWith( new StringBuffer("123"), "123"));
5
        assertFalse( StringUtils.endsWith( new StringBuffer(""), "12345667") );
6
    
6
    
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