File path: /sql12/plugins/dataimport/src/com/csvreader/CsvReader.java | File path: /sql12/plugins/dataimport/src/com/csvreader/CsvReader.java | |||
Method name: boolean readRecord()
|
Method name: boolean readRecord()
|
|||
Number of AST nodes: 25 | Number of AST nodes: 25 | |||
1 | switch (escape) {↵ | 1 | switch (escape) {↵ | |
2 | case ComplexEscape.UNICODE:↵ | 2 | case ComplexEscape.UNICODE:↵ | |
3 | escapeValue *= (char) 16;↵ | 3 | escapeValue *= (char) 16;↵ | |
4 | escapeValue += hexToDec(currentLetter);↵ | 4 | escapeValue += hexToDec(currentLetter);↵ | |
5 | if (escapeLength == 4) {↵ | 5 | if (escapeLength == 4) {↵ | |
6 | readingComplexEscape = false;↵ | 6 | readingComplexEscape = false;↵ | |
7 | }↵ | 7 | }↵ | |
8 | break;↵ | 8 | break;↵ | |
9 | case ComplexEscape.OCTAL:↵ | 9 | case ComplexEscape.OCTAL:↵ | |
10 | escapeValue *= (char) 8;↵ | 10 | escapeValue *= (char) 8;↵ | |
11 | escapeValue += (char) (currentLetter - '0');↵ | 11 | escapeValue += (char) (currentLetter - '0');↵ | |
12 | if (escapeLength == 3) {↵ | 12 | if (escapeLength == 3) {↵ | |
13 | readingComplexEscape = false;↵ | 13 | readingComplexEscape = false;↵ | |
14 | }↵ | 14 | }↵ | |
15 | break;↵ | 15 | break;↵ | |
16 | case ComplexEscape.DECIMAL:↵ | 16 | case ComplexEscape.DECIMAL:↵ | |
17 | escapeValue *= (char) 10;↵ | 17 | escapeValue *= (char) 10;↵ | |
18 | escapeValue += (char) (currentLetter - '0');↵ | 18 | escapeValue += (char) (currentLetter - '0');↵ | |
19 | if (escapeLength == 3) {↵ | 19 | if (escapeLength == 3) {↵ | |
20 | readingComplexEscape = false;↵ | 20 | readingComplexEscape = false;↵ | |
21 | }↵ | 21 | }↵ | |
22 | break;↵ | 22 | break;↵ | |
23 | case ComplexEscape.HEX:↵ | 23 | case ComplexEscape.HEX:↵ | |
24 | escapeValue *= (char) 16;↵ | 24 | escapeValue *= (char) 16;↵ | |
25 | escapeValue += hexToDec(currentLetter);↵ | 25 | escapeValue += hexToDec(currentLetter);↵ | |
26 | if (escapeLength == 2) {↵ | 26 | if (escapeLength == 2) {↵ | |
27 | readingComplexEscape = false;↵ | 27 | readingComplexEscape = false;↵ | |
28 | }↵ | 28 | }↵ | |
29 | break;↵ | 29 | break;↵ | |
30 | } | 30 |
| |
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) | 1.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 212 |
Number of mapped statements | 25 |
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) | 47.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
39 | switch (escape) | 207 | switch (escape) | |
40 | case ComplexEscape.UNICODE: | 208 | case ComplexEscape.UNICODE: | |
41 | escapeValue *= (char)16; | 209 | escapeValue *= (char)16; | |
42 | escapeValue += hexToDec(currentLetter); | 210 | escapeValue += hexToDec(currentLetter); | |
43 | if (escapeLength == 4) | 211 | if (escapeLength == 4) | |
44 | readingComplexEscape = false; | 212 | readingComplexEscape = false; | |
45 | break; | 213 | break; | |
46 | case ComplexEscape.OCTAL: | 214 | case ComplexEscape.OCTAL: | |
47 | escapeValue *= (char)8; | 215 | escapeValue *= (char)8; | |
48 | escapeValue += (char)(currentLetter - '0'); | 216 | escapeValue += (char)(currentLetter - '0'); | |
49 | if (escapeLength == 3) | 217 | if (escapeLength == 3) | |
50 | readingComplexEscape = false; | 218 | readingComplexEscape = false; | |
51 | break; | 219 | break; | |
52 | case ComplexEscape.DECIMAL: | 220 | case ComplexEscape.DECIMAL: | |
53 | escapeValue *= (char)10; | 221 | escapeValue *= (char)10; | |
54 | escapeValue += (char)(currentLetter - '0'); | 222 | escapeValue += (char)(currentLetter - '0'); | |
55 | if (escapeLength == 3) | 223 | if (escapeLength == 3) | |
56 | readingComplexEscape = false; | 224 | readingComplexEscape = false; | |
57 | break; | 225 | break; | |
58 | case ComplexEscape.HEX: | 226 | case ComplexEscape.HEX: | |
59 | escapeValue *= (char)16; | 227 | escapeValue *= (char)16; | |
60 | escapeValue += hexToDec(currentLetter); | 228 | escapeValue += hexToDec(currentLetter); | |
61 | if (escapeLength == 2) | 229 | if (escapeLength == 2) | |
62 | readingComplexEscape = false; | 230 | readingComplexEscape = false; | |
63 | break; | 231 | break; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables readingComplexEscape, escapeValue , while Clone fragment #2 returns variables readingComplexEscape, escapeValue |