saveDoctype(name);
++depth;
if (!isMixed)
{
add(getElementIndent());
}
add("<");
add(name);
if (firstElementMark == null)
{
firstElementMark = mark();
startFileBuffering();
}
saveDoctype(name);
++depth;
if (!isMixed)
{
add(getElementIndent());
}
add("<");
add(name);
if (firstElementMark == null)
{
firstElementMark = mark();
startFileBuffering();
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLString.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLString.java
|
Method name: void saveNilElement(String)
|
|
Method name: void saveDataValueElement(String, String)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | saveDoctype(name);↵ | | 1 | saveDoctype(name);↵
|
|
2 | ++depth;↵ | | 2 | ++depth;↵
|
3 | if (!isMixed)↵ | | 3 | if (!isMixed)↵
|
4 | {↵ | | 4 | {↵
|
5 | add(getElementIndent());↵ | | 5 | add(getElementIndent());↵
|
6 | }↵ | | 6 | }↵
|
7 | add("<");↵ | | 7 | add("<");↵
|
8 | add(name);↵ | | 8 | add(name);↵
|
9 | if (firstElementMark == null)↵ | | 9 | if (firstElementMark == null)↵
|
10 | {↵ | | 10 | {↵
|
11 | firstElementMark = mark();↵ | | 11 | firstElementMark = mark();↵
|
12 | startFileBuffering();↵ | | 12 | startFileBuffering();↵
|
13 | } | | 13 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 36 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 6.5 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
3 | saveDoctype(name); | | 3 | saveDoctype(name); |
4 | ++depth; | | 4 | ++depth; |
5 | if (!isMixed) | | 5 | if (!isMixed) |
6 | | | 6 | |
7 | add("<"); | | 7 | add("<"); |
8 | add(name); | | 8 | add(name); |
9 | if (firstElementMark == null) | | 9 | if (firstElementMark == null) |
10 | firstElementMark = mark(); | | 10 | firstElementMark = mark(); |
11 | | | 11 | |
Precondition Violations (0)
Row |
Violation |