if (currentLineWidth > lineWidth)
{
addLine();
add(getAttributeIndent());
}
else
{
add(" ");
}
add(name);
add("=\"");
if (currentLineWidth > lineWidth)
{
addLine();
add(getAttributeIndent());
}
else
{
add(" ");
}
add(name);
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 addAttribute(String, String)
|
|
Method name: void startAttribute(String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
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(name);↵ | | 10 | add(name);↵
|
11 | add("=\""); | | 11 | 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 | 20 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.5 |
Clone type | Type 1 |
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(name); | | 5 | add(name); |
6 | add("=\""); | | 6 | add("=\""); |
Precondition Violations (0)
Row |
Violation |