if (currentLineWidth > lineWidth)
{
addLine();
add(getAttributeIndent());
}
else
{
add(" ");
}
add(prefix);
add(":");
add(localName);
add("=\"");
add(value);
add("\"");
if (currentLineWidth > lineWidth)
{
addLine();
add(getAttributeIndent());
}
else
{
add(" ");
}
add(name);
add("=\"");
add(value);
add("\"");
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 addAttributeNS(String, String, String)
|
|
Method name: void addAttribute(String, String)
|
Number of AST nodes: 10
|
|
Number of AST nodes: 8
|
|
1 | if (currentLineWidth > lineWidth)↵ | | 1 | if (currentLineWidth > lineWidth)↵
|
2 | {↵ | | 2 | {↵
|
3 | addLine();↵ | | 3 | addLine();↵
|
4 | add(getAttributeIndent());↵ | | 4 | add(getAttributeIndent());↵
|
5 | }↵ | | 5 | }↵
|
6 | else↵ | | 6 | else↵
|
7 | {↵ | | 7 | {↵
|
8 | add(" ");↵ | | 8 | add(" ");↵
|
9 | }↵ | | 9 | }↵
|
10 | add(prefix);↵ | | 10 | add(↵
|
11 | add(":");↵ | | |
|
12 | add(localName);↵ | | 11 | name);↵
|
13 | add("=\"");↵ | | 12 | add("=\"");↵
|
14 | add(value);↵ | | 13 | add(value);↵
|
15 | add("\""); | | 14 | add("\"");
|
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 declared in the same class |
Number of node comparisons | 40 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 9.4 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (currentLineWidth > lineWidth) | | 1 | if (currentLineWidth > lineWidth) |
2 | | | 2 | |
3 | add(getAttributeIndent()); | | 3 | add(getAttributeIndent()); |
| | | | |
4 | | | 4 | |
5 | add(prefix); | | | |
6 | add(":"); | | | |
7 | add(localName); | | 5 | add(name); |
8 | add("=\""); | | 6 | add("=\""); |
9 | add(value); | | 7 | add(value); |
10 | add("\""); | | 8 | add("\""); |
Precondition Violations (0)
Row |
Violation |