public void testSimple() { executeTarget("simple"); // get the fileset and its basedir Project p = getProject(); FileSet fileset = (FileSet) p.getReference("testfileset"); File baseDir = fileset.getDir(p); String log = getLog(); assertTrue("Expecting attribute value printed", log.indexOf("Attribute attr1 = test") != -1); assertTrue("Expecting nested element value printed", log.indexOf("Fileset basedir = " + baseDir.getAbsolutePath()) != -1);
public void testNestedByClassName() { executeTarget("nestedbyclassname"); // get the fileset and its basedir Project p = getProject(); FileSet fileset = (FileSet) p.getReference("testfileset"); File baseDir = fileset.getDir(p); String log = getLog(); assertTrue("Expecting attribute value to be printed", log.indexOf("Attribute attr1 = test") != -1); assertTrue("Expecting nested element value to be printed", log.indexOf("Fileset basedir = " + baseDir.getAbsolutePath()) != -1);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/optional/script/ScriptDefTest.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void testSimple() {
1
public void testNestedByClassName() {
2
        executeTarget("simple");
2
        executeTarget("nestedbyclassname");
3
        // get the fileset and its basedir
3
        // get the fileset and its basedir
4
        Project p = getProject();
4
        Project p = getProject();
5
        FileSet fileset = (FileSet) p.getReference("testfileset");
5
        FileSet fileset = (FileSet) p.getReference("testfileset");
6
        File baseDir = fileset.getDir(p);
6
        File baseDir = fileset.getDir(p);
7
        String log = getLog();
7
        String log = getLog();
8
        assertTrue("Expecting attribute value printed",
8
        assertTrue("Expecting attribute value to be printed",
9
            log.indexOf("Attribute attr1 = test") != -1);
9
            log.indexOf("Attribute attr1 = test") != -1);
10
        assertTrue("Expecting nested element value printed",
10
        assertTrue("Expecting nested element value to be printed",
11
            log.indexOf("Fileset basedir = " + baseDir.getAbsolutePath()) != -1);
11
            log.indexOf("Fileset basedir = " + baseDir.getAbsolutePath()) != -1);
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