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: 5 | Number of AST nodes: 5 | |||
1 | if (startedColumn) {↵ | 1 | if (startedColumn) {↵ | |
2 | dataBuffer.Position++;↵ | 2 | dataBuffer.Position++;↵ | |
3 | if (userSettings.SafetySwitch↵ | 3 | if (userSettings.SafetySwitch↵ | |
4 | && dataBuffer.Position↵ | 4 | && dataBuffer.Position↵ | |
5 | - dataBuffer.ColumnStart↵ | 5 | - dataBuffer.ColumnStart↵ | |
6 | + columnBuffer.Position > 100000) {↵ | 6 | + columnBuffer.Position > 100000) {↵ | |
7 | close();↵ | 7 | close();↵ | |
8 | throw new IOException(↵ | 8 | throw new IOException(↵ | |
9 | "Maximum column length of 100,000 exceeded in column "↵ | 9 | "Maximum column length of 100,000 exceeded in column "↵ | |
10 | + NumberFormat↵ | 10 | + NumberFormat↵ | |
11 | .getIntegerInstance()↵ | 11 | .getIntegerInstance()↵ | |
12 | .format(↵ | 12 | .format(↵ | |
13 | columnsCount)↵ | 13 | columnsCount)↵ | |
14 | + " in record "↵ | 14 | + " in record "↵ | |
15 | + NumberFormat↵ | 15 | + NumberFormat↵ | |
16 | .getIntegerInstance()↵ | 16 | .getIntegerInstance()↵ | |
17 | .format(↵ | 17 | .format(↵ | |
18 | currentRecord)↵ | 18 | currentRecord)↵ | |
19 | + ". Set the SafetySwitch property to false"↵ | 19 | + ". Set the SafetySwitch property to false"↵ | |
20 | + " if you're expecting column lengths greater than 100,000 characters to"↵ | 20 | + " if you're expecting column lengths greater than 100,000 characters to"↵ | |
21 | + " avoid this error.");↵ | 21 | + " avoid this error.");↵ | |
22 | }↵ | 22 | }↵ | |
23 | } | 23 |
| |
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.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 18 |
Number of mapped statements | 5 |
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) | 130.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
315 | if (startedColumn) | 161 | if (startedColumn) | |
316 | dataBuffer.Position++; | 162 | dataBuffer.Position++; | |
317 | if (userSettings.SafetySwitch && dataBuffer.Position - dataBuffer.ColumnStart + columnBuffer.Position > 100000) | 163 | if (userSettings.SafetySwitch && dataBuffer.Position - dataBuffer.ColumnStart + columnBuffer.Position > 100000) | |
318 | close(); | 164 | close(); | |
319 | throw new IOException("Maximum column length of 100,000 exceeded in column " + NumberFormat.getIntegerInstance().format(columnsCount) + " in record " + NumberFormat.getIntegerInstance().format(currentRecord) + ". Set the SafetySwitch property to false" + " if you're expecting column lengths greater than 100,000 characters to" + " avoid this error."); | 165 | throw new IOException("Maximum column length of 100,000 exceeded in column " + NumberFormat.getIntegerInstance().format(columnsCount) + " in record " + NumberFormat.getIntegerInstance().format(currentRecord) + ". Set the SafetySwitch property to false" + " if you're expecting column lengths greater than 100,000 characters to" + " avoid this error."); |
Row | Violation |
---|