log("Using System properties " + System.getProperties(),
Project.MSG_VERBOSE);
if (splitJunit) {
classLoader = (AntClassLoader) delegate.getClass().getClassLoader();
} else {
createClassLoader();
}
if (classLoader != null) {
classLoader.setThreadContextLoader();
}
log("Using System properties " + System.getProperties(),
Project.MSG_VERBOSE);
if (splitJunit) {
classLoader = (AntClassLoader) delegate.getClass().getClassLoader();
} else {
createClassLoader();
}
if (classLoader != null) {
classLoader.setThreadContextLoader();
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
|
Method name: void logVmExit(FormatterElement[], JUnitTest, String, String)
|
|
Method name: TestResultHolder executeInVM(JUnitTest)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | log("Using System properties " + System.getProperties(),↵ | | 1 | log("Using System properties " + System.getProperties(),↵
|
2 | Project.MSG_VERBOSE);↵ | | 2 | Project.MSG_VERBOSE);↵
|
3 | if (splitJunit) {↵ | | 3 | if (splitJunit) {↵
|
4 | classLoader = (AntClassLoader) delegate.getClass().getClassLoader();↵ | | 4 | classLoader = (AntClassLoader) delegate.getClass().getClassLoader();↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | createClassLoader();↵ | | 6 | createClassLoader();↵
|
7 | }↵ | | 7 | }↵
|
8 | if (classLoader != null) {↵ | | 8 | if (classLoader != null) {↵
|
9 | classLoader.setThreadContextLoader();↵ | | 9 | classLoader.setThreadContextLoader();↵
|
10 | } | | 10 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 11.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | log("Using System properties " + System.getProperties(), Project.MSG_VERBOSE); | | 13 | log("Using System properties " + System.getProperties(), Project.MSG_VERBOSE); |
3 | if (splitJunit) | | 14 | if (splitJunit) |
4 | classLoader = (AntClassLoader)delegate.getClass().getClassLoader(); | | 15 | classLoader = (AntClassLoader)delegate.getClass().getClassLoader(); |
| | | | |
5 | | | 16 | |
6 | if (classLoader != null) | | 17 | if (classLoader != null) |
7 | classLoader.setThreadContextLoader(); | | 18 | classLoader.setThreadContextLoader(); |
Precondition Violations (0)
Row |
Violation |