Timer timer=new Timer();
executeTarget("test2");
timer.stop();
if(TRACE) System.out.println(" test2 elapsed time="+timer.time());
Timer timer=new Timer();
executeTarget("test3");
timer.stop();
if(TRACE) System.out.println(" test4 elapsed time="+timer.time());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/SleepTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/taskdefs/SleepTest.java
|
Method name: void test2()
|
|
Method name: void test4()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | Timer timer=new Timer();↵ | | 1 | Timer timer=new Timer();↵
|
2 | executeTarget("test2");↵ | | 2 | executeTarget("test3");↵
|
3 | timer.stop();↵ | | 3 | timer.stop();↵
|
4 | if(TRACE) System.out.println(" test2 elapsed time="+timer.time()); | | 4 | if(TRACE) System.out.println(" test4 elapsed time="+timer.time());
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 12.1 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Timer timer = new Timer(); | | 1 | Timer timer = new Timer(); |
2 | executeTarget("test2"); | | 2 | executeTarget("test3"); |
3 | timer.stop(); | | 3 | timer.stop(); |
4 | if (TRACE) | | 4 | if (TRACE) |
5 | System.out.println(" test2 elapsed time=" + timer.time()); | | 5 | System.out.println(" test4 elapsed time=" + timer.time()); |
Precondition Violations (0)
Row |
Violation |