File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/SubAnt.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/SubAnt.java | |||
Method name: void copyProperty(Property, Property)
|
Method name: void copyProperty(Property, Property)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (from.getEnvironment() != null) {↵ | 1 | if (from.getValue() != null) {↵ | |
2 | to.setEnvironment(from.getEnvironment());↵ | 2 | to.setValue(from.getValue());↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (from.getClasspath() != null) {↵ | 4 | if (from.getFile() != null) {↵ | |
5 | to.setClasspath(from.getClasspath());↵ | 5 | to.setFile(from.getFile());↵ | |
6 | } | 6 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 13 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (from.getEnvironment() != null) |
| 4 | if (from.getFile() != null) | |||||||||||||||||||
13 | to.setEnvironment(from.getEnvironment()); |
| 5 | to.setFile(from.getFile()); | |||||||||||||||||||
14 | if (from.getClasspath() != null) |
| 2 | if (from.getValue() != null) | |||||||||||||||||||
15 | to.setClasspath(from.getClasspath()); |
| 3 | to.setValue(from.getValue()); |
Row | Violation |
---|---|
1 | Type java.lang.String of variable from.getEnvironment() does not match with type java.io.File of variable from.getFile() |
2 | Expression to.setEnvironment(from.getEnvironment()) is a void method call, and thus it cannot be parameterized |
3 | Expression to.setFile(from.getFile()) is a void method call, and thus it cannot be parameterized |
4 | Type java.lang.String of variable from.getEnvironment() does not match with type java.io.File of variable from.getFile() |
5 | Type org.apache.tools.ant.types.Path of variable from.getClasspath() does not match with type java.lang.String of variable from.getValue() |
6 | Expression to.setClasspath(from.getClasspath()) is a void method call, and thus it cannot be parameterized |
7 | Expression to.setValue(from.getValue()) is a void method call, and thus it cannot be parameterized |
8 | Type org.apache.tools.ant.types.Path of variable from.getClasspath() does not match with type java.lang.String of variable from.getValue() |