executeTarget("testFilterReaderHeadLinesSkip"); File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(), "expected/head-tail.headLinesSkip.test"); File result = FILE_UTILS.resolveFile(getProject().getBaseDir(), "result/head-tail.filterReaderHeadLinesSkip.test"); assertTrue("testFilterReaderHeadLinesSkip: Result not like expected", FILE_UTILS.contentEquals(expected, result));
File dir1 = project.resolveFile("."); // basedir of subant/subant-test1/subant.xml is .. // therefore we expect here the subant/subant-test1 subdirectory File dir2 = project.resolveFile("subant/subant-test1"); // basedir of subant/subant-test2/subant.xml is .. // therefore we expect here the subant subdirectory File dir3 = project.resolveFile("subant"); testBaseDirs("testantfile", new String[] { dir1.getAbsolutePath(), dir2.getAbsolutePath(), dir3.getAbsolutePath() });
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/filters/HeadTailTest.java File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/SubAntTest.java
Method name: void testFilterReaderHeadLinesSkip() Method name: void testantfile()
Number of AST nodes: 4 Number of AST nodes: 4
1
executeTarget("testFilterReaderHeadLinesSkip");
2
        File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(),
3
            "expected/head-tail.headLinesSkip.test");
4
        File result = FILE_UTILS.resolveFile(getProject().getBaseDir(),
5
            "result/head-tail.filterReaderHeadLinesSkip.tes
1
File dir1 = project.resolveFile(".");
2
        // basedir of subant/subant-test1/subant.xml is ..
3
        // therefore we expect here the subant/subant-test1 subdirectory
4
        File dir2 = project.resolveFile("subant/subant-test1");
5
        // basedir of subant/subant-test2/subant.xml is ..
6
        // therefore we expect here the subant subdirectory
6
t");
7
        File dir3 = project.resolveFile("subant");
7
        assertTrue("testFilterReaderHeadLinesSkip: Result not like expected",
8
        
8
                   FILE_UTILS.contentEquals(expected, result)
9
testBaseDirs("testantfile",
10
                     new String[] { dir1.getAbsolutePath(),
11
                         dir2.getAbsolutePath(),
12
                         dir3.getAbsolutePath()
9
);
13
                     });
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                
    1
    File dir1 = project.resolveFile(".");
                                                                                                                    
    2
    File dir2 = project.resolveFile("subant/subant-test1");
    1
    executeTarget("testFilterReaderHeadLinesSkip");
    1
    executeTarget("testFilterReaderHeadLinesSkip");
    4
    testBaseDirs("testantfile", new String[] {dir1.getAbsolutePath(), dir2.getAbsolutePath(), dir3.getAbsolutePath()});
    Differences
    Expression1Expression2Difference
    executeTargettestBaseDirsMETHOD_INVOCATION_NAME_MISMATCH
    executeTarget("testFilterReaderHeadLinesSkip")testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()})ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression executeTarget("testFilterReaderHeadLinesSkip") is a void method call, and thus it cannot be parameterized
    Expression testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()}) is a void method call, and thus it cannot be parameterized
    Expression executeTarget("testFilterReaderHeadLinesSkip") is a void method call, and thus it cannot be parameterized
    Expression testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()}) is a void method call, and thus it cannot be parameterized
    4
    testBaseDirs("testantfile", new String[] {dir1.getAbsolutePath(), dir2.getAbsolutePath(), dir3.getAbsolutePath()});
    2
    File expected = FILE_UTILS.resolveFile(getProject().getBaseDir(), "expected/head-tail.headLinesSkip.test");
                                                                                                                                                                                                                          
                                                                                          
    3
    File dir3 = project.resolveFile("subant");
    3
    File result = FILE_UTILS.resolveFile(getProject().getBaseDir(), "result/head-tail.filterReaderHeadLinesSkip.test");
                                                                                                                                                                                                                                          
    4
    assertTrue("testFilterReaderHeadLinesSkip: Result not like expected", FILE_UTILS.contentEquals(expected, result));
                                                                                                                                                                                                                                          
    Precondition Violations (4)
    Row Violation
    1Expression executeTarget("testFilterReaderHeadLinesSkip") is a void method call, and thus it cannot be parameterized
    2Expression testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()}) is a void method call, and thus it cannot be parameterized
    3Expression executeTarget("testFilterReaderHeadLinesSkip") is a void method call, and thus it cannot be parameterized
    4Expression testBaseDirs("testantfile",new String[]{dir1.getAbsolutePath(),dir2.getAbsolutePath(),dir3.getAbsolutePath()}) is a void method call, and thus it cannot be parameterized