if (data != null) {
hashCode += (data.hashCode() * 17);
}
if (name != null) {
hashCode += (name.hashCode() * 29);
}
if (subElements != null) {
hashCode += (subElements.hashCode() * 57);
}
if (attributes != null) {
hashCode += (attributes.hashCode() * 13);
}
if (data != null) {
hashCode += (data.hashCode() * 17);
}
if (name != null) {
hashCode += (name.hashCode() * 29);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core-api/src/main/java/org/columba/core/xml/XmlElement.java
|
|
File path: /columba-1.4-src/core-api/src/main/java/org/columba/core/xml/XmlElement.java
|
Method name: int hashCode()
|
|
Method name: int hashCode()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
| | | 1 | if (attributes != null) {↵
|
| | | 2 | hashCode += (attributes.hashCode() * 13);↵
|
| | | 3 | }↵
|
|
1 | if (data != null) {↵ | | 4 | if (data != null) {↵
|
2 | hashCode += (data.hashCode() * 17);↵ | | 5 | hashCode += (data.hashCode() * 17);↵
|
3 | }↵ | | 6 | }↵
|
|
4 | if (name != null) {↵ | | 7 | if (name != null) {↵
|
5 | hashCode += (name.hashCode() * 29);↵ | | 8 | hashCode += (name.hashCode() * 29);↵
|
6 | }↵ | | 9 | }
|
|
7 | if (subElements != null) {↵ | | | |
8 | hashCode += (subElements.hashCode() * 57);↵ | | | |
9 | } | | | |
See real code fragment |
|
See real code fragment |
Summary
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 | 27 |
-
{Non-refactorable}
Mapping Summary
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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | if (data != null) | | 4 | if (data != null) |
5 | hashCode += (data.hashCode() * 17); | | 5 | hashCode += (data.hashCode() * 17); |
6 | if (name != null) | | 6 | if (name != null) |
7 | hashCode += (name.hashCode() * 29); | | 7 | hashCode += (name.hashCode() * 29); |
8 | if (subElements != null) | | 2 | if (attributes != null) |
| | | 3 | hashCode += (attributes.hashCode() * 13); |
9 | hashCode += (subElements.hashCode() * 57); | | | |
Precondition Violations (1)
Row |
Violation |
1 | Type java.util.List of variable subElements does not match with type java.util.Hashtable of variable attributes |