for (int i = uriFragmentPath.size() - 1; i >= 0; --i)
{
result.append('/');
result.append(uriFragmentPath.get(i));
}
for (int i = uriFragmentPath.size() - 1; i >= 0; --i)
{
result.append('/');
result.append(uriFragmentPath.get(i));
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/EcoreUtil.java
|
Method name: String getURIFragment(EObject)
|
|
Method name: URI getURI(EObject)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | for (int i = uriFragmentPath.size() - 1; i >= 0; --i)↵ | | 1 | for (int i = uriFragmentPath.size() - 1; i >= 0; --i)↵
|
2 | {↵ | | 2 | ↵
|
| | | 3 | {↵
|
3 | result.append('/');↵ | | 4 | result.append('/');↵
|
4 | result.append(uriFragmentPath.get(i));↵ | | 5 | result.append(uriFragmentPath.get(i));↵
|
5 | } | | 6 | }
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 12 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | for (int i = uriFragmentPath.size() - 1; i >= 0; --i) | | 16 | for (int i = uriFragmentPath.size() - 1; i >= 0; --i) |
20 | | | 17 | |
21 | result.append(uriFragmentPath.get(i)); | | 18 | result.append(uriFragmentPath.get(i)); |
Precondition Violations (0)
Row |
Violation |