while (extendsMatcher.find())
{
if (result.length() != 0)
{
result.append(',');
}
result.append(comment.substring(extendsMatcher.start(1), extendsMatcher.end(1)));
}
while (implementsMatcher.find())
{
if (result.length() != 0)
{
result.append(',');
}
result.append(comment.substring(implementsMatcher.start(1), implementsMatcher.end(1)));
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/importer/java/builder/JavaEcoreBuilder.java
|
Method name: String getExtendsAnnotation(String)
|
|
Method name: String getExtendsAnnotation(String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while (extendsMatcher.find())↵ | | 1 | while (implementsMatcher.find())↵
|
2 | {↵ | | 2 | {↵
|
3 | if (result.length() != 0)↵ | | 3 | if (result.length() != 0)↵
|
4 | {↵ | | 4 | {↵
|
5 | result.append(',');↵ | | 5 | result.append(',');↵
|
6 | }↵ | | 6 | }↵
|
7 | result.append(comment.substring(extendsMatcher.start(1), extendsMatcher.end(1)));↵ | | 7 | result.append(comment.substring(implementsMatcher.start(1), implementsMatcher.end(1)));↵
|
8 | } | | 8 | }
|
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 the same method |
Number of node comparisons | 10 |
-
{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.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | while (extendsMatcher.find()) | | 9 | while (implementsMatcher.find()) |
5 | if (result.length() != 0) | | 10 | if (result.length() != 0) |
6 | | | 11 | |
7 | result.append(comment.substring(extendsMatcher.start(1), extendsMatcher.end(1))); | | 12 | result.append(comment.substring(implementsMatcher.start(1), implementsMatcher.end(1))); |
Precondition Violations (0)
Row |
Violation |