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: 29 | Number of AST nodes: 29 | |||
1 | escapeLength++;↵ | 1 | escapeLength++;↵ | |
2 | switch (escape) {↵ | 2 | switch (escape) {↵ | |
3 | case ComplexEscape.UNICODE:↵ | 3 | case ComplexEscape.UNICODE:↵ | |
4 | escapeValue *= (char) 16;↵ | 4 | escapeValue *= (char) 16;↵ | |
5 | escapeValue += hexToDec(currentLetter);↵ | 5 | escapeValue += hexToDec(currentLetter);↵ | |
6 | if (escapeLength == 4) {↵ | 6 | if (escapeLength == 4) {↵ | |
7 | readingComplexEscape = false;↵ | 7 | readingComplexEscape = false;↵ | |
8 | }↵ | 8 | }↵ | |
9 | break;↵ | 9 | break;↵ | |
10 | case ComplexEscape.OCTAL:↵ | 10 | case ComplexEscape.OCTAL:↵ | |
11 | escapeValue *= (char) 8;↵ | 11 | escapeValue *= (char) 8;↵ | |
12 | escapeValue += (char) (currentLetter - '0');↵ | 12 | escapeValue += (char) (currentLetter - '0');↵ | |
13 | if (escapeLength == 3) {↵ | 13 | if (escapeLength == 3) {↵ | |
14 | readingComplexEscape = false;↵ | 14 | readingComplexEscape = false;↵ | |
15 | }↵ | 15 | }↵ | |
16 | break;↵ | 16 | break;↵ | |
17 | case ComplexEscape.DECIMAL:↵ | 17 | case ComplexEscape.DECIMAL:↵ | |
18 | escapeValue *= (char) 10;↵ | 18 | escapeValue *= (char) 10;↵ | |
19 | escapeValue += (char) (currentLetter - '0');↵ | 19 | escapeValue += (char) (currentLetter - '0');↵ | |
20 | if (escapeLength == 3) {↵ | 20 | if (escapeLength == 3) {↵ | |
21 | readingComplexEscape = false;↵ | 21 | readingComplexEscape = false;↵ | |
22 | }↵ | 22 | }↵ | |
23 | break;↵ | 23 | break;↵ | |
24 | case ComplexEscape.HEX:↵ | 24 | case ComplexEscape.HEX:↵ | |
25 | escapeValue *= (char) 16;↵ | 25 | escapeValue *= (char) 16;↵ | |
26 | escapeValue += hexToDec(currentLetter);↵ | 26 | escapeValue += hexToDec(currentLetter);↵ | |
27 | if (escapeLength == 2) {↵ | 27 | if (escapeLength == 2) {↵ | |
28 | readingComplexEscape = false;↵ | 28 | readingComplexEscape = false;↵ | |
29 | }↵ | 29 | }↵ | |
30 | break;↵ | 30 | break;↵ | |
31 | }↵ | 31 | }↵ | |
32 | if (!readingComplexEscape) {↵ | 32 | if (!readingComplexEscape) {↵ | |
33 | appendLetter(escapeValue);↵ | 33 | appendLetter(escapeValue);↵ | |
34 | } else {↵ | 34 | } else {↵ | |
35 | dataBuffer.ColumnStart = dataBuffer.Position + 1;↵ | 35 | dataBuffer.ColumnStart = dataBuffer.Position + 1;↵ | |
36 | } | 36 |
| |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 222 |
Number of mapped statements | 29 |
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) | 62.8 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
38 | escapeLength++; | 206 | escapeLength++; | |
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; | |
64 | if (!readingComplexEscape) | 232 | if (!readingComplexEscape) | |
65 | appendLetter(escapeValue); | 233 | appendLetter(escapeValue); | |
else | else | |||
66 | dataBuffer.ColumnStart = dataBuffer.Position + 1; | 234 | dataBuffer.ColumnStart = dataBuffer.Position + 1; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables readingComplexEscape, escapeLength, escapeValue , while Clone fragment #2 returns variables readingComplexEscape, escapeLength, escapeValue |