question: private void parseQuotedSpans ( SpanManager sm , Span s , List < Span > quotedSpans , String quotation ) { final int qlen = quotation . length ( ) ; int start = sm . indexOf ( quotation , s . getStart ( ) , s . getEnd ( ) ) ; while ( start != - 1 ) { int end = sm . indexOf ( quotation , start + qlen , s . getEnd ( ) ) ; if ( end == - 1 ) { break ; } Span qs = new Span ( start , end ) ; quotedSpans . add ( qs ) ; if ( calculateSrcSpans ) { qs . setSrcSpan ( new SrcSpan ( sm . getSrcPos ( start ) , sm . getSrcPos ( end + qlen - 1 ) + 1 ) ) ; } sm . delete ( end , end + qlen ) ; sm . delete ( start , start + qlen ) ; start = sm . indexOf ( quotation , qs . getEnd ( ) , s . getEnd ( ) ) ; } }
target:  Searches the Range given by the Span s for the double occurence of "quotation" and puts the results in the List quotedSpans. The Quotation tags will be deleted.