File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/Manifest.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/MacroDef.java | |||
Method name: boolean equals(Object)
|
Method name: boolean equals(Object)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | return true;↵ | 1 | return ↵ | |
2 | false;↵ | |||
2 | }↵ | 3 | }↵ | |
3 | Manifest rhsManifest = (Manifest) rhs;↵ | 4 | Text other = (Text) obj;↵ | |
4 | if (manifestVersion == null) {↵ | 5 | if (name == null) {↵ | |
5 | if (rhsManifest.manifestVersion != null) {↵ | 6 | if (other.name != null) {↵ | |
6 | return false;↵ | 7 | return false;↵ | |
7 | }↵ | 8 | ↵ | |
9 | }↵ | |||
8 | } else if (!manifestVersion.equals(rhsManifest.manifestVersion)) {↵ | 10 | } else if (!name.equals(other.name)) {↵ | |
9 | return false;↵ | 11 | return false;↵ | |
10 | } | 12 | } | |
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 different classes |
Number of node comparisons | 10 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5 | Text other = (Text)obj; | ||||||||||||||||||||||||||
5 | Manifest rhsManifest = (Manifest)rhs; | | ||||||||||||||||||||||||||
6 | if (manifestVersion == null) |
| 6 | if (name == null) | ||||||||||||||||||||||||
7 | if (rhsManifest.manifestVersion != null) |
| 7 | if (other.name != null) | ||||||||||||||||||||||||
8 | return false; | 8 | return false; | |||||||||||||||||||||||||
9 | else if (!manifestVersion.equals(rhsManifest.manifestVersion)) |
| 9 | else if (!name.equals(other.name)) | ||||||||||||||||||||||||
10 | return false; | 10 | return false; |
Row | Violation |
---|---|
1 | Expression rhsManifest.manifestVersion cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.lang.String of variable rhsManifest.manifestVersion does not match with type java.lang.String of variable other.name |
4 | Expression rhsManifest.manifestVersion cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression rhsManifest.manifestVersion cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Type java.lang.String of variable rhsManifest.manifestVersion does not match with type java.lang.String of variable other.name |
9 | Expression rhsManifest.manifestVersion cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression other.name cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Not all possible execution flows end in a return statement |