dataBuffer.Position++; if (userSettings.SafetySwitch && dataBuffer.Position - dataBuffer.ColumnStart + columnBuffer.Position > 100000) { close(); 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."); }
dataBuffer.Position++; if (userSettings.SafetySwitch && dataBuffer.Position - dataBuffer.ColumnStart + columnBuffer.Position > 100000) { close(); 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."); }
Clone fragments detected by clone detection tool
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
									}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in the same method
Number of node comparisons17
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)133.6
    Clone typeType 1
    Mapped Statements
    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.");
    Precondition Violations (0)
    Row Violation