if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT)
{
// Every codepoint is supported!
value[outputPos++] = high;
value[outputPos++] = ch;
}
else
{
// Produce the supplemental character as an entity
outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);
changed = true;
}
break;
if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT)
{
// Every codepoint is supported!
value[outputPos++] = high;
value[outputPos++] = ch;
}
else
{
// Produce the supplemental character as an entity
outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);
changed = true;
}
break;
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: String convert(String)
|
|
Method name: String convertText(String)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT)↵ | | 1 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT)↵
|
2 | {↵ | | 2 | {↵
|
3 | // Every codepoint is supported! ↵ | | 3 | // Every codepoint is supported! ↵
|
4 | value[outputPos++] = high;↵ | | 4 | value[outputPos++] = high;↵
|
5 | value[outputPos++] = ch;↵ | | 5 | value[outputPos++] = ch;↵
|
6 | }↵ | | 6 | }↵
|
7 | else↵ | | 7 | else↵
|
8 | {↵ | | 8 | {↵
|
9 | // Produce the supplemental character as an entity↵ | | 9 | // Produce the supplemental character as an entity↵
|
10 | outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);↵ | | 10 | outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);↵
|
11 | changed = true;↵ | | 11 | changed = true;↵
|
12 | }↵ | | 12 | }↵
|
13 | break; | | 13 | break;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
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 | 28 |
-
{Non-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) | 5.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
74 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) | | 77 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) |
75 | value[outputPos++] = high; | | 78 | value[outputPos++] = high; |
76 | | | 79 | |
| | | | |
77 | outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength); | | 80 | outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength); |
78 | | | 81 | |
79 | break; | | 82 | break; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables outputPos, changed , while Clone fragment #2 returns variables outputPos, changed |