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/Java.java | |||
Method name: TestResultHolder executeInVM(JUnitTest)
|
Method name: int executeJava()
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (dir != null) {↵ | 1 | if (dir != null) {↵ | |
2 | log("dir attribute ignored if running in the same VM",↵ | 2 | log("Working directory ignored when same JVM↵ | |
3 | is used.",↵ | |||
3 | Project.MSG_WARN);↵ | 4 | Project.MSG_WARN);↵ | |
4 | }↵ | 5 | ↵ | |
6 | }↵ | |||
5 | if (newEnvironment || null != env.getVariables()) {↵ | 7 | if (newEnvironment || null != env.getVariables()) {↵ | |
6 | log("Changes to environment variables are ignored if running in "↵ | 8 | log("Changes to environment variables are ignored ↵ | |
9 | when same "↵ | |||
7 | + "the same VM.", Project.MSG_WARN);↵ | 10 | + "JVM is used.", Project.MSG_WARN);↵ | |
8 | }↵ | 11 | }↵ | |
9 | if (getCommandline().getBootclasspath() != null) {↵ | 12 | if (getCommandLine().getBootclasspath() != null) {↵ | |
10 | log("bootclasspath is ignored if running in the same VM.",↵ | 13 | log("bootclasspath ignored when same JVM↵ | |
14 | is used.",↵ | |||
11 | Project.MSG_WARN);↵ | 15 | Project.MSG_WARN);↵ | |
12 | } | 16 | } | |
See real code fragment | See real code fragment |
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) | 16.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
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) | 13.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (dir != null) | 23 | if (dir != null) | ||||||||||||||
4 | log("dir attribute ignored if running in the same VM", Project.MSG_WARN); |
| 24 | log("Working directory ignored when same JVM is used.", Project.MSG_WARN); | |||||||||||||
5 | if (newEnvironment || null != env.getVariables()) | 25 | if (newEnvironment || null != env.getVariables()) | ||||||||||||||
6 | log("Changes to environment variables are ignored if running in " + "the same VM.", Project.MSG_WARN); |
| 26 | log("Changes to environment variables are ignored when same " + "JVM is used.", Project.MSG_WARN); | |||||||||||||
7 | if (getCommandline().getBootclasspath() != null) |
| 27 | if (getCommandLine().getBootclasspath() != null) | |||||||||||||
8 | log("bootclasspath is ignored if running in the same VM.", Project.MSG_WARN); |
| 28 | log("bootclasspath ignored when same JVM is used.", Project.MSG_WARN); |
Row | Violation |
---|---|
1 | Expression getCommandline() cannot be parameterized, because it has dependencies to/from statements that will be extracted |