File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java | |||
Method name: int executeAsForked(CommandlineJava, ExecuteWatchdog)
|
Method name: TestResultHolder executeAsForked(JUnitTest, ExecuteWatchdog, File)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | while (e.hasMoreElements()) {↵ | 1 | while (e.hasMoreElements()) {↵ | |
2 | String s = (String) e.nextElement();↵ | 2 | String s = (String) e.nextElement();↵ | |
3 | if (s.startsWith("CLASSPATH=")) {↵ | 3 | if (s.startsWith(CLASSPATH)) {↵ | |
4 | commandline.createClasspath(getProject()).createPath()↵ | 4 | cmd.createClasspath(getProject()).createPath()↵ | |
5 | .append(new Path(getProject(),↵ | 5 | .append(new Path(getProject(),↵ | |
6 | s.substring("CLASSPATH=".length()↵ | 6 | s.substring(CLASSPATH.length()↵ | |
7 | )));↵ | 7 | )));↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 9 |
Number of mapped statements | 4 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | while (e.hasMoreElements()) | 17 | while (e.hasMoreElements()) | ||||||||||||||
11 | String s = (String)e.nextElement(); | 18 | String s = (String)e.nextElement(); | ||||||||||||||
12 | if (s.startsWith("CLASSPATH=")) |
| 19 | if (s.startsWith(CLASSPATH)) | |||||||||||||
13 | commandline.createClasspath(getProject()).createPath().append(new Path(getProject(), s.substring("CLASSPATH=".length()))); |
| 20 | cmd.createClasspath(getProject()).createPath().append(new Path(getProject(), s.substring(CLASSPATH.length()))); |
Row | Violation |
---|