int handleSqlSingleQuotes ( String line , BitSet quoteBitSet , int startingPoint ) { int end ; int quoteCounter = 1 ; boolean quotationEnded = false ; do { end = line . indexOf ( ' ' , startingPoint + 1 ) ; if ( end > - 1 ) { quoteCounter ++ ; } if ( end == - 1 || end == line . length ( ) - 1 ) { quoteBitSet . set ( startingPoint , line . length ( ) ) ; quotationEnded = true ; } else if ( line . charAt ( end + 1 ) != ' ' && quoteCounter % 2 == 0 ) { quotationEnded = true ; } end = end == - 1 ? line . length ( ) - 1 : end ; quoteBitSet . set ( startingPoint , end + 1 ) ; startingPoint = end ; } while ( ! quotationEnded && end < line . length ( ) ) ; return startingPoint ; }
Marks single - quoted string position based on input .