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 addProcessingInstruction(String, String)
|
Method name: void addCDATA(String)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | currentLineWidth += data.length();↵ | 1 | currentLineWidth += newString.length();↵ | |
2 | LOOP: ↵ | 2 | LOOP: ↵ | |
3 | for (int i = data.length() - 1; i >= 0; --i)↵ | 3 | for (int i = newString.length() - 1; i >= 0; --i)↵ | |
4 | {↵ | 4 | ↵ | |
5 | ↵ | 5 | {↵ | |
6 | switch (data.charAt(i))↵ | 6 | switch (newString.charAt(i))↵ | |
7 | {↵ | 7 | {↵ | |
8 | case '\n':↵ | 8 | case '\n':↵ | |
9 | case '\r':↵ | 9 | case '\r':↵ | |
10 | {↵ | 10 | ↵ | |
11 | ↵ | 11 | {↵ | |
12 | currentLineWidth = data.length() - i;↵ | 12 | currentLineWidth = newString.length() - i;↵ | |
13 | break LOOP;↵ | 13 | break LOOP;↵ | |
14 | }↵ | 14 | }↵ | |
15 | }↵ | 15 | ↵ | |
16 | ↵ | 16 | }↵ | |
17 | } | 17 |
| |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
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) | 0.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | currentLineWidth += data.length(); |
| 5 | currentLineWidth += newString.length(); | ||||||||||
11 | for (int i = data.length() - 1; i >= 0; --i) |
| 6 | for (int i = newString.length() - 1; i >= 0; --i) | ||||||||||
12 | switch (data.charAt(i)) |
| 7 | switch (newString.charAt(i)) | ||||||||||
13 | case '\n': | 8 | case '\n': | |||||||||||
14 | case '\r': | 9 | case '\r': | |||||||||||
15 | currentLineWidth = data.length() - i; |
| 10 | currentLineWidth = newString.length() - i; | ||||||||||
16 | break LOOP; | 11 | break LOOP; |
Row | Violation |
---|