if (xsiSchemaLocation.length() > 0)
{
xsiSchemaLocation.append(' ');
}
xsiSchemaLocation.append(namespace);
xsiSchemaLocation.append(' ');
if (xsiSchemaLocation.length() > 0)
{
xsiSchemaLocation.append(' ');
}
xsiSchemaLocation.append(nsURI);
xsiSchemaLocation.append(' ');
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java
|
Method name: void addNamespaceDeclarations()
|
|
Method name: void addNamespaceDeclarations()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (xsiSchemaLocation.length() > 0)↵ | | 1 | if (xsiSchemaLocation.length() > 0)↵
|
2 | { ↵ | | 2 | ↵
|
3 | ↵ | | 3 | {↵
|
4 | xsiSchemaLocation.append(' ');↵ | | 4 | xsiSchemaLocation.append(' ');↵
|
5 | }↵ | | 5 | ↵
|
6 | ↵ | | 6 | }↵
|
7 | xsiSchemaLocation.append(namespace);↵ | | 7 | xsiSchemaLocation.append(nsURI);↵
|
8 | xsiSchemaLocation.append(' '); | | 8 | xsiSchemaLocation.append(' ');
|
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.1 |
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) | 2.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
24 | if (xsiSchemaLocation.length() > 0) | | 51 | if (xsiSchemaLocation.length() > 0) |
25 | xsiSchemaLocation.append(' '); | | 52 | xsiSchemaLocation.append(' '); |
26 | xsiSchemaLocation.append(namespace); | | 53 | xsiSchemaLocation.append(nsURI); |
27 | xsiSchemaLocation.append(' '); | | 54 | xsiSchemaLocation.append(' '); |
Precondition Violations (0)
Row |
Violation |