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 addText(String)
|
Method name: void addProcessingInstruction(String, String)
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | if (lineWidth != Integer.MAX_VALUE)↵ | 1 | if (lineWidth != Integer.MAX_VALUE)↵ | |
2 | {↵ | 2 | ↵ | |
3 | {↵ | |||
3 | currentLineWidth += newString.length();↵ | 4 | currentLineWidth += data.length();↵ | |
4 | LOOP: ↵ | 5 | LOOP: ↵ | |
5 | for (int i = newString.length() - 1; i >= 0; --i)↵ | 6 | for (int i = data.length() - 1; i >= 0; --i)↵ | |
6 | {↵ | 7 | ↵ | |
8 | {↵ | |||
7 | switch (newString.charAt(i))↵ | 9 | switch (data.charAt(i))↵ | |
8 | {↵ | 10 | {↵ | |
9 | case '\n':↵ | 11 | case '\n':↵ | |
10 | case '\r':↵ | 12 | case '\r':↵ | |
11 | {↵ | 13 | {↵ | |
12 | currentLineWidth = newString.length() - i;↵ | 14 | currentLineWidth = data.length() - i;↵ | |
13 | break LOOP;↵ | 15 | break LOOP;↵ | |
16 | }↵ | |||
14 | }↵ | 17 | }↵ | |
15 | }↵ | 18 | }↵ | |
16 | }↵ | 19 | }↵ | |
17 | }↵ | 20 | ↵ | |
18 | super.add(newString); | 21 | super.add(data); | |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 20 |
Number of mapped statements | 9 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | if (lineWidth != Integer.MAX_VALUE) | 9 | if (lineWidth != Integer.MAX_VALUE) | |||||||||||
4 | currentLineWidth += newString.length(); |
| 10 | currentLineWidth += data.length(); | ||||||||||
5 | for (int i = newString.length() - 1; i >= 0; --i) |
| 11 | for (int i = data.length() - 1; i >= 0; --i) | ||||||||||
6 | switch (newString.charAt(i)) |
| 12 | switch (data.charAt(i)) | ||||||||||
7 | case '\n': | 13 | case '\n': | |||||||||||
8 | case '\r': | 14 | case '\r': | |||||||||||
9 | currentLineWidth = newString.length() - i; |
| 15 | currentLineWidth = data.length() - i; | ||||||||||
10 | break LOOP; | 16 | break LOOP; | |||||||||||
11 | super.add(newString); |
| 17 | super.add(data); |
Row | Violation |
---|