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: 6 | Number of AST nodes: 6 | |||
1 | if (from.getValue() != null) {↵ | 1 | if (from.getRefid() != null) {↵ | |
2 | to.setValue(from.getValue());↵ | 2 | to.setRefid(from.getRefid());↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (from.getFile() != null) {↵ | 4 | if (from.getEnvironment() != null) {↵ | |
5 | to.setFile(from.getFile());↵ | 5 | to.setEnvironment(from.getEnvironment());↵ | |
6 | }↵ | 6 | }↵ | |
7 | if (from.getResource() != null) {↵ | 7 | if (from.getClasspath() != null) {↵ | |
8 | to.setResource(from.getResource());↵ | 8 | to.setClasspath(from.getClasspath());↵ | |
9 | } | 9 |
| |
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.7 |
Clones location | Clones are in the same method |
Number of node comparisons | 27 |
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) | 2.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (from.getValue() != null) |
| 10 | if (from.getRefid() != null) | |||||||||||||||||||
3 | to.setValue(from.getValue()); |
| 11 | to.setRefid(from.getRefid()); | |||||||||||||||||||
4 | if (from.getFile() != null) |
| 12 | if (from.getEnvironment() != null) | |||||||||||||||||||
5 | to.setFile(from.getFile()); |
| 13 | to.setEnvironment(from.getEnvironment()); | |||||||||||||||||||
6 | if (from.getResource() != null) |
| 14 | if (from.getClasspath() != null) | |||||||||||||||||||
7 | to.setResource(from.getResource()); |
| 15 | to.setClasspath(from.getClasspath()); |
Row | Violation |
---|---|
1 | Type java.lang.String of variable from.getValue() does not match with type org.apache.tools.ant.types.Reference of variable from.getRefid() |
2 | Expression to.setValue(from.getValue()) is a void method call, and thus it cannot be parameterized |
3 | Expression to.setRefid(from.getRefid()) is a void method call, and thus it cannot be parameterized |
4 | Type java.lang.String of variable from.getValue() does not match with type org.apache.tools.ant.types.Reference of variable from.getRefid() |
5 | Type java.io.File of variable from.getFile() does not match with type java.lang.String of variable from.getEnvironment() |
6 | Expression to.setFile(from.getFile()) is a void method call, and thus it cannot be parameterized |
7 | Expression to.setEnvironment(from.getEnvironment()) is a void method call, and thus it cannot be parameterized |
8 | Type java.io.File of variable from.getFile() does not match with type java.lang.String of variable from.getEnvironment() |
9 | Type java.lang.String of variable from.getResource() does not match with type org.apache.tools.ant.types.Path of variable from.getClasspath() |
10 | Expression to.setResource(from.getResource()) is a void method call, and thus it cannot be parameterized |
11 | Expression to.setClasspath(from.getClasspath()) is a void method call, and thus it cannot be parameterized |
12 | Type java.lang.String of variable from.getResource() does not match with type org.apache.tools.ant.types.Path of variable from.getClasspath() |