Buggy code:
int totalCharsSoFar ; int positionOfNonWhiteSpaceCharInFront ; int positionOfNonWhiteSpaceCharInBack ; int lineNumber ; int fieldStartDelimiterIndex ; int fieldStopDelimiterIndex ; int stopDelimiterPosition ; boolean foundStartAndStopDelimiters ; boolean streamOpenForReading ; static final int DEFAULT_FORMAT_CODE = 0 ; static final int ASCII_FIXED_FORMAT_CODE = 1 ; private int formatCode = ImportReadData . DEFAULT_FORMAT_CODE ; private boolean hasColumnDefinition ; private char recordSeparatorChar0 ; private char fieldSeparatorChar0 ; private boolean recordSepStartNotWhite = true ; private boolean fieldSepStartNotWhite = true ; protected ControlInfo controlFileReader ; protected int numberOfColumns ; protected String [ ] columnTypes ; protected char [ ] fieldSeparator ; protected int fieldSeparatorLength ; protected char [ ] recordSeparator ; protected int recordSeparatorLength ; protected String nullString ; protected String columnDefinition ; protected String format ; protected String dataCodeset ; protected char [ ] fieldStartDelimiter ; protected int fieldStartDelimiterLength ; protected char [ ] fieldStopDelimiter ; protected int fieldStopDelimiterLength ; protected boolean hasDelimiterAtEnd ; private ImportLobFile [ ] lobFileHandles ; private String lobFileName ; private int lobOffset ; private int lobLength ; private void loadPropertiesInfo ( ) throws Exception { } ImportReadData ( String inputFileName , ControlInfo controlFileReader ) throws Exception { } int getNumberOfColumns ( ) { } protected void ignoreFirstRow ( ) throws Exception { } protected void loadColumnTypes ( ) throws Exception { } private void openFile ( ) throws Exception { } public final Object run ( ) throws Exception { } private void realOpenFile ( ) throws Exception { } private void loadMetaData ( ) throws Exception { } void closeStream ( ) throws Exception { } int findNumberOfColumnsInARow ( ) throws Exception { } private void checkForWhiteSpaceInFront ( ) { } private void checkForWhiteSpaceInBack ( ) { } boolean readTokensUntilEndOfRecord ( ) throws Exception { } private int lookForPassedSeparator ( char [ ] delimiter , int delimiterIndex , int delimiterLength , int nextChar , boolean lookForRecordSeperator ) throws IOException { } private int reCheckRestOfTheCharacters ( int startFrom , char [ ] delimiter , int delimiterLength ) { } private boolean skipDoubleDelimiters ( char [ ] characterDelimiter ) throws IOException { } private void omitLineFeed ( ) throws IOException { } int getCurrentRowNumber ( ) { } boolean readNextRow ( String [ ] returnStringArray ) throws Exception { } private boolean haveSep = true ; private boolean readNextFixedRow ( String [ ] returnStringArray ) throws Exception { } private boolean readNextDelimitedRow ( String [ ] returnStringArray ) throws Exception { int upperLimit = ( numberOfColumns ) - 1 ; if ( upperLimit < 0 ) return false ; for ( int i = 0 ; i < upperLimit ; i ++ ) { if ( ! ( readNextToken ( fieldSeparator , 0 , fieldSeparatorLength , false ) ) ) { if ( i == 0 ) return false ; else throw LoadError . unexpectedEndOfFile ( ( ( lineNumber ) + 1 ) ) ; } if ( ( ( stopDelimiterPosition ) != 0 ) && ( ( stopDelimiterPosition ) != ( totalCharsSoFar ) ) ) { for ( int k = ( stopDelimiterPosition ) + 1 ; k < ( totalCharsSoFar ) ; k ++ ) { if ( ( Character . isWhitespace ( currentToken [ k ] ) ) == false ) { throw LoadError . dataAfterStopDelimiter ( ( ( lineNumber ) + 1 ) , ( i + 1 ) ) ; } } totalCharsSoFar = stopDelimiterPosition ; } if ( ( totalCharsSoFar ) != ( - 1 ) ) { returnStringArray [ i ] = new String ( currentToken , positionOfNonWhiteSpaceCharInFront , totalCharsSoFar ) ; } else returnStringArray [ i ] = null ; } if ( ! ( readNextToken ( recordSeparator , 0 , recordSeparatorLength , true ) ) ) { if ( upperLimit == 0 ) return false ; else throw LoadError . unexpectedEndOfFile ( ( ( lineNumber ) + 1 ) ) ; } if ( ( ( stopDelimiterPosition ) != 0 ) && ( ( stopDelimiterPosition ) != ( totalCharsSoFar ) ) ) { for ( int i = ( stopDelimiterPosition ) + 1 ; i < ( totalCharsSoFar ) ; i ++ ) { if ( ( Character . isWhitespace ( currentToken [ i ] ) ) == false ) { throw LoadError . dataAfterStopDelimiter ( ( ( lineNumber ) + 1 ) , numberOfColumns ) ; } } totalCharsSoFar = stopDelimiterPosition ; } if ( hasDelimiterAtEnd ) { if ( ! ( ( fieldStopDelimiterLength ) > 0 ) ) { -- ( totalCharsSoFar ) ; } } <START_BUG> if ( ( totalCharsSoFar ) != ( - 1 ) ) { <END_BUG> if ( ! ( hasDelimiterAtEnd ) ) { returnStringArray [ upperLimit ] = new String ( currentToken , positionOfNonWhiteSpaceCharInFront , totalCharsSoFar ) ; } else if ( ( ( totalCharsSoFar ) == ( fieldSeparatorLength ) ) && ( isFieldSep ( currentToken ) ) ) { String currentStr = new String ( currentToken , positionOfNonWhiteSpaceCharInFront , totalCharsSoFar ) ; if ( ( currentToken [ ( ( totalCharsSoFar ) + 1 ) ] ) == ( fieldStopDelimiter [ 0 ] ) ) { returnStringArray [ upperLimit ] = currentStr ; } else { returnStringArray [ upperLimit ] = null ; } } else { if ( ( totalCharsSoFar ) > 0 ) { returnStringArray [ upperLimit ] = new String ( currentToken , positionOfNonWhiteSpaceCharInFront , totalCharsSoFar ) ; } else { returnStringArray [ upperLimit ] = null ; } } } else returnStringArray [ upperLimit ] = null ; ( lineNumber ) ++ ; return true ; } private boolean isFieldSep ( char [ ] chrArray ) { } boolean readNextToken ( char [ ] delimiter , int delimiterIndex , int delimiterLength , boolean isRecordSeperator ) throws Exception { } String getClobColumnFromExtFileAsString ( String lobLocationStr , int colIndex ) throws SQLException { } Clob getClobColumnFromExtFile ( String lobLocationStr , int colIndex ) throws SQLException { } Blob getBlobColumnFromExtFile ( String lobLocationStr , int colIndex ) throws SQLException { } private void initExternalLobFile ( String lobLocationStr , int colIndex ) throws SQLException { } }

Fix:
if ( ( totalCharsSoFar ) > ( - 1 ) ) {