for (int i = 0, len = segments.length; i < len; i++)
{
if (i != 0) result.append(SEGMENT_SEPARATOR);
result.append(segments[i]);
}
for (int i = 0, len = segments.length; i < len; i++)
{
if (i != 0) result.append(separator);
result.append(segments[i]);
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/URI.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/URI.java
|
Method name: String toString()
|
|
Method name: String toFileString()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (int i = 0, len = segments.length; i < len; i++)↵ | | 1 | for (int i = 0, len = segments.length; i < len; i++)↵
|
2 | {↵ | | 2 | ↵
|
3 | ↵ | | 3 | {↵
|
4 | if (i != 0) result.append(SEGMENT_SEPARATOR);↵ | | 4 | if (i != 0) result.append(↵
|
5 | ↵ | | 5 | separator);↵
|
6 | result.append(segments[i]);↵ | | 6 | result.append(segments[i]);↵
|
7 | } | | 7 | }
|
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 declared in the same class |
Number of node comparisons | 8 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | for (int i = 0, len = segments.length; i < len; i++) | | 15 | for (int i = 0, len = segments.length; i < len; i++) |
17 | | | 16 | |
18 | result.append(SEGMENT_SEPARATOR); | | 17 | result.append(separator); |
19 | result.append(segments[i]); | | 18 | result.append(segments[i]); |
Precondition Violations (0)
Row |
Violation |