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 startElement(String)
|
|
Method name: void saveDataValueElement(String, String)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | saveDoctype(name);↵ | | 1 | saveDoctype(name);↵
|
2 | ↵ | | |
|
3 | ++depth;↵ | | 2 | ++depth;↵
|
4 | if (!isMixed)↵ | | 3 | if (!isMixed)↵
|
5 | {↵ | | 4 | {↵
|
6 | add(getElementIndent());↵ | | 5 | add(getElementIndent());↵
|
7 | }↵ | | 6 | ↵
|
8 | ↵ | | 7 | }↵
|
9 | add("<");↵ | | 8 | add("<");↵
|
10 | add(name);↵ | | 9 | add(name);↵
|
11 | if (firstElementMark == null)↵ | | 10 | if (firstElementMark == null)↵
|
12 | {↵ | | 11 | {↵
|
13 | firstElementMark = mark();↵ | | 12 | firstElementMark = mark();↵
|
14 | startFileBuffering();↵ | | 13 | startFileBuffering();↵
|
15 | } | | 14 | }
|
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 | 30 |
-
{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) | 5.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | saveDoctype(name); | | 3 | saveDoctype(name); |
6 | ++depth; | | 4 | ++depth; |
7 | if (!isMixed) | | 5 | if (!isMixed) |
8 | | | 6 | |
9 | add("<"); | | 7 | add("<"); |
10 | add(name); | | 8 | add(name); |
11 | if (firstElementMark == null) | | 9 | if (firstElementMark == null) |
12 | firstElementMark = mark(); | | 10 | firstElementMark = mark(); |
13 | | | 11 | |
Precondition Violations (0)
Row |
Violation |