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