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