for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext(); )
{
EGenericType eGenericSuperType = i.next();
result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
if (i.hasNext())
{
result.append(", ");
}
}
for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); )
{
EGenericType eException = i.next();
result.append(EGenericTypeItemProvider.getText(eException));
if (i.hasNext())
{
result.append(", ");
}
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EClassItemProvider.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/provider/EOperationItemProvider.java
|
Method name: String getText(Object)
|
|
Method name: String getText(Object)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext(); )↵ | | 1 | for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); )↵
|
2 | {↵ | | 2 | {↵
|
3 | EGenericType eGenericSuperType = i.next();↵ | | 3 | EGenericType eException = i.next();↵
|
4 | result.append(EGenericTypeItemProvider.getText(eGenericSuperType));↵ | | 4 | result.append(EGenericTypeItemProvider.getText(eException));↵
|
5 | if (i.hasNext())↵ | | 5 | if (i.hasNext())↵
|
6 | {↵ | | 6 | {↵
|
7 | result.append(", ");↵ | | 7 | result.append(", ");↵
|
8 | }↵ | | 8 | }↵
|
9 | } | | 9 | }
|
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 having the same super class |
Number of node comparisons | 9 |
-
{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) | 14.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | EGenericType eGenericSuperType = i.next(); | | 25 | EGenericType eException = i.next(); |
17 | result.append(EGenericTypeItemProvider.getText(eGenericSuperType)); | | 26 | result.append(EGenericTypeItemProvider.getText(eException)); |
18 | if (i.hasNext()) | | 27 | if (i.hasNext()) |
19 | | | 28 | |
Precondition Violations (0)
Row |
Violation |