result.append(" -> ");
for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext(); )
{
EGenericType eGenericSuperType = i.next();
result.append(EGenericTypeItemProvider.getText(eGenericSuperType));
if (i.hasNext())
{
result.append(", ");
}
}
result.append("<");
for (Iterator<ETypeParameter> i = eOperation.getETypeParameters().iterator(); i.hasNext(); )
{
result.append(ETypeParameterItemProvider.getText(i.next()));
if (i.hasNext())
{
result.append(", ");
}
}
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: 6
|
|
Number of AST nodes: 6
|
|
1 | result.append(" -> ");↵ | | 1 | result.append("<");↵
|
2 | for (Iterator<EGenericType> i = eClass.getEGenericSuperTypes().iterator(); i.hasNext(); )↵ | | 2 | for (Iterator<E↵
|
3 | {↵ | | |
|
4 | EGenericType eGenericSuperType = i.next();↵ | | 3 | TypeParameter> i = eOperation.getETypeParameters().iterator(); i.hasNext(); )↵
|
| | | 4 | {↵
|
5 | result.append(EGenericTypeItemProvider.getText(eGenericSuperType));↵ | | 5 | result.append(ETypeParameterItemProvider.getText(i.next()));↵
|
6 | if (i.hasNext())↵ | | 6 | if (i.hasNext())↵
|
7 | {↵ | | 7 | {↵
|
8 | result.append(", ");↵ | | 8 | result.append(", ");↵
|
9 | }↵ | | 9 | }↵
|
10 | } | | 10 | }↵
|
| | | 11 | result.append(">");
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 7 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 5.7 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 7 | result.append(ETypeParameterItemProvider.getText(i.next())); |
16 | EGenericType eGenericSuperType = i.next(); | | | |
17 | result.append(EGenericTypeItemProvider.getText(eGenericSuperType)); | | | |
18 | if (i.hasNext()) | | 8 | if (i.hasNext()) |
19 | | | 9 | |
Precondition Violations (4)
Row |
Violation |
1 | Unmatched statement result.append(ETypeParameterItemProvider.getText(i.next())); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement EGenericType eGenericSuperType=i.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement result.append(EGenericTypeItemProvider.getText(eGenericSuperType)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type java.util.Iterator<org.eclipse.emf.ecore.EGenericType> of variable i does not match with type java.util.Iterator<org.eclipse.emf.ecore.ETypeParameter> of variable i |