void testNested6() { expectSpecificBuildException("testNested6", "it is required to fail :-)", "testNested6\ntestNested6\ntestNested6"); } public void testNested7() { String specificMessage = "A single nested condition is required."; char[] c = {'a', 'b'}; StringBuffer target = new StringBuffer("testNested7x"); for (int i = 0; i < c.length; i++) { target.setCharAt(target.length() - 1, c[i]); expectSpecificBuildException(target.toString(), "it is required to fail :-)", specificMessage); }
void testNested3() { expectSpecificBuildException("testNested3", "it is required to fail :-)", "testNested3"); } public void testNested4() { String specificMessage = "Nested conditions " + "not permitted in conjunction with if/unless attributes"; char[] c = {'a', 'b', 'c'}; StringBuffer target = new StringBuffer("testNested4x"); for (int i = 0; i < c.length; i++) { target.setCharAt(target.length() - 1, c[i]); expectSpecificBuildException(target.toString(), "it is required to fail :-)", specificMessage); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/FailTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/FailTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
void testNested6() {
1
void testNested3() {
2
        expectSpecificBuildException("testNested6",
2
        expectSpecificBuildException("testNested3",
3
            "it is required to fail :-)",
3
            "it is required to fail :-)",
4
            "testNested6\ntestNested6\ntestNested6");
4
            "testNested3");
5
    }
5
    }
6
    public void testNested7() {
6
    public void testNested4() {
7
        String specificMessage = "A single nested condition is required.
7
        String specificMessage = "Nested conditions "
8
";
8
          + "not permitted in conjunction with if/unless attributes";
9
        char[] c = {'a', 'b'};
9
        char[] c = {'a', 'b', 'c'};
10
        StringBuffer target = new StringBuffer("testNested7x");
10
        StringBuffer target = new StringBuffer("testNested4x");
11
        for (int i = 0; i < c.length; i++) {
11
        for (int i = 0; i < c.length; i++) {
12
            target.setCharAt(target.length() - 1, c[i]);
12
            target.setCharAt(target.length() - 1, c[i]);
13
            expectSpecificBuildException(target.toString(),
13
            expectSpecificBuildException(target.toString(),
14
                "it is required to fail :-)", specificMessage);
14
                "it is required to fail :-)", specificMessage);
15
        }
15
        }
16
    
16
    
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