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