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: 7 | Number of AST nodes: 7 | |||
1 | if (XMLChar.isLowSurrogate(ch))↵ | 1 | if (XMLChar.isLowSurrogate(ch))↵ | |
2 | {↵ | 2 | {↵ | |
3 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT)↵ | 3 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT)↵ | |
4 | {↵ | 4 | {↵ | |
5 | // Every codepoint is supported! ↵ | 5 | // Every codepoint is supported! ↵ | |
6 | value[outputPos++] = high;↵ | 6 | value[outputPos++] = high;↵ | |
7 | value[outputPos++] = ch;↵ | 7 | value[outputPos++] = ch;↵ | |
8 | }↵ | 8 | }↵ | |
9 | else↵ | 9 | else↵ | |
10 | {↵ | 10 | {↵ | |
11 | // Produce the supplemental character as an entity↵ | 11 | // Produce the supplemental character as an entity↵ | |
12 | outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);↵ | 12 | outputPos = replaceChars(outputPos, ("" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);↵ | |
13 | changed = true;↵ | 13 | changed = true;↵ | |
14 | }↵ | 14 | }↵ | |
15 | break;↵ | 15 | break;↵ | |
16 | } | 16 |
| |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 31 |
Number of mapped statements | 7 |
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.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
73 | if (XMLChar.isLowSurrogate(ch)) | 76 | if (XMLChar.isLowSurrogate(ch)) | |
74 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) | 77 | if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) | |
75 | value[outputPos++] = high; | 78 | value[outputPos++] = high; | |
76 | value[outputPos++] = ch; | 79 | value[outputPos++] = ch; | |
else | else | |||
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 | changed = true; | 81 | changed = true; | |
79 | break; | 82 | break; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables outputPos, changed , while Clone fragment #2 returns variables outputPos, changed |