result.append(" throws ");
for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); )
{
EGenericType eException = i.next();
result.append(EGenericTypeItemProvider.getText(eException));
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/EOperationItemProvider.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(" throws ");↵ | | 1 | result.append("<");↵
|
2 | for (Iterator<EGenericType> i = eOperation.getEGenericExceptions().iterator(); i.hasNext(); )↵ | | 2 | for (Iterator<ETypeParameter> i = eOperation.getETypeParameters().iterator(); i.hasNext(); )↵
|
3 | {↵ | | 3 | {↵
|
4 | EGenericType eException = i.next();↵ | | |
|
5 | result.append(EGenericTypeItemProvider.getText(eException));↵ | | 4 | result.append(ETypeParameterItemProvider.getText(i.next()));↵
|
6 | if (i.hasNext())↵ | | 5 | if (i.hasNext())↵
|
7 | {↵ | | 6 | {↵
|
8 | result.append(", ");↵ | | 7 | result.append(", ");↵
|
9 | }↵ | | 8 | }↵
|
10 | } | | 9 | }↵
|
| | | 10 | 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 the same method |
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.9 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 7 | result.append(ETypeParameterItemProvider.getText(i.next())); |
25 | EGenericType eException = i.next(); | | | |
26 | result.append(EGenericTypeItemProvider.getText(eException)); | | | |
27 | if (i.hasNext()) | | 8 | if (i.hasNext()) |
28 | | | 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 eException=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(eException)); 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 |