if (hash == -1)
{
Object theKey = getKey();
hash = (theKey == null ? 0 : theKey.hashCode());
}
return hash;
if (hash == -1)
{
Object theKey = getKey();
hash = (theKey == null ? 0 : theKey.hashCode());
}
return hash;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/impl/EObjectToChangesMapEntryImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/impl/ENamedElementToXMLInfoMapEntryImpl.java
|
Method name: int getHash()
|
|
Method name: int getHash()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (hash == -1)↵ | | 1 | if (hash == -1)↵
|
2 | {↵ | | 2 | {↵
|
3 | Object theKey = getKey();↵ | | 3 | Object theKey = getKey();↵
|
4 | hash = (theKey == null ? 0 : theKey.hashCode());↵ | | 4 | hash = (theKey == null ? 0 : theKey.hashCode());↵
|
5 | }↵ | | 5 | }↵
|
6 | return hash; | | 6 | return hash;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (hash == -1) | | 1 | if (hash == -1) |
| | | 2 | Object theKey = getKey(); |
2 | Object theKey = getKey(); | | | |
3 | hash = (theKey == null ? 0 : theKey.hashCode()); | | 3 | hash = (theKey == null ? 0 : theKey.hashCode()); |
4 | return hash; | | 4 | return hash; |
Precondition Violations (0)
Row |
Violation |