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(SEGMENT_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 path()
|
|
Method name: String devicePath()
|
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 | if (i != 0) result.append(SEGMENT_SEPARATOR);↵ | | 3 | if (i != 0) result.append(SEGMENT_SEPARATOR);↵
|
4 | result.append(segments[i]);↵ | | 4 | result.append(segments[i]);↵
|
5 | } | | 5 | }
|
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) | 0.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
6 | for (int i = 0, len = segments.length; i < len; i++) | | 14 | for (int i = 0, len = segments.length; i < len; i++) |
7 | | | 15 | |
8 | result.append(SEGMENT_SEPARATOR); | | 16 | result.append(SEGMENT_SEPARATOR); |
9 | result.append(segments[i]); | | 17 | result.append(segments[i]); |
Precondition Violations (0)
Row |
Violation |