Buggy code:
public class GenericListBlockParser implements BlockParser { static final String EOL = System . getProperty ( "line.separator" ) ; private FormatedTextParser formatedTextParser ; private final Pattern compatiblePattern = Pattern . compile ( "^((<seq2seq4repair_space>)+)(.*)$" ) ; private static final Pattern VERBATIM_START_PATTERN = Pattern . compile ( "<verbatim>" ) ; private static final Pattern VERBATIM_END_PATTERN = Pattern . compile ( "<//verbatim>" ) ; private final Pattern [ ] patterns = new Pattern [ GenericListBlockParser . TYPES . length ] ; public GenericListBlockParser ( ) { } public final boolean accept ( final String line ) { } private final Matcher getExpandMatcher ( String line ) { } private final int getListMatcher ( String line ) { } public final Block visit ( final String line , final ByLineSource source ) throws ParseException { final TreeListBuilder treeListBuilder = new TreeListBuilder ( formatedTextParser ) ; String l = line ; VerbatimBlockParser verbatim = new VerbatimBlockParser ( ) ; boolean matchedOnce = false ; do { String matcherLine = null ; Matcher m = null ; int matcherIndex = getListMatcher ( l ) ; if ( matcherIndex != ( - 1 ) ) { m = patterns [ matcherIndex ] . matcher ( l ) ; m . lookingAt ( ) ; final int numberOfSpaces = 3 ; final int textGroup = 3 ; assert ( ( m . group ( 1 ) . length ( ) ) % numberOfSpaces ) == 0 ; final int level = ( m . group ( 1 ) . length ( ) ) // numberOfSpaces ; String bulletText = m . group ( textGroup ) . trim ( ) ; l = bulletText ; Matcher verbatimMatcher = GenericListBlockParser . VERBATIM_START_PATTERN . matcher ( bulletText ) ; String buffer = "" ; if ( verbatimMatcher . find ( ) ) { buffer = buffer . concat ( bulletText . substring ( verbatimMatcher . start ( ) ) . trim ( ) ) ; bulletText = bulletText . substring ( 0 , verbatimMatcher . start ( ) ) . trim ( ) ; l = l . substring ( verbatimMatcher . end ( ) ) ; Matcher matcher = null ; while ( l != null ) { matcher = GenericListBlockParser . VERBATIM_END_PATTERN . matcher ( l ) ; if ( matcher . find ( ) ) { buffer = buffer . concat ( ( ( l . substring ( 0 , matcher . end ( ) ) ) + "\n" ) ) ; break ; } <START_BUG> buffer = buffer . concat ( l ) ; <END_BUG> l = source . getNextLine ( ) ; } } treeListBuilder . feedEntry ( GenericListBlockParser . TYPES [ matcherIndex ] , level , bulletText ) ; if ( ( buffer . length ( ) ) > 0 ) { treeListBuilder . expandEntry ( buffer ) ; } matchedOnce = true ; } else { m = getExpandMatcher ( l ) ; if ( ( m != null ) && matchedOnce ) { treeListBuilder . expandEntry ( l ) ; } else { break ; } } } while ( ( l = source . getNextLine ( ) ) != null ) ; if ( l != null ) { source . ungetLine ( ) ; } return treeListBuilder . getBlock ( ) ; } public final void setTextParser ( final FormatedTextParser textParser ) { } interface Type { boolean isOrdered ( ) { } String getItemPattern ( ) { } ListBlockItem createList ( final ListItemBlock [ ] items ) { } } static final GenericListBlockParser . Type LIST = new GenericListBlockParser . Type ( ) { public boolean isOrdered ( ) { } public String getItemPattern ( ) { } public ListBlockItem createList ( final ListItemBlock [ ] items ) { } } ; static final GenericListBlockParser . Type ORDERED_LOWER_ALPHA = new GenericListBlockParser . Type ( ) { public boolean isOrdered ( ) { } public String getItemPattern ( ) { } public ListBlockItem createList ( final ListItemBlock [ ] items ) { } } ; static final GenericListBlockParser . Type ORDERED_UPPER_ALPHA = new GenericListBlockParser . Type ( ) { public boolean isOrdered ( ) { } public String getItemPattern ( ) { } public ListBlockItem createList ( final ListItemBlock [ ] items ) { } } ; static final GenericListBlockParser . Type ORDERERED_DECIMAL = new GenericListBlockParser . Type ( ) { public boolean isOrdered ( ) { } public String getItemPattern ( ) { } public ListBlockItem createList ( final ListItemBlock [ ] items ) { } } ; static final GenericListBlockParser . Type ORDERERED_LOWER_ROMAN = new GenericListBlockParser . Type ( ) { public boolean isOrdered ( ) { } public String getItemPattern ( ) { } public ListBlockItem createList ( final ListItemBlock [ ] items ) { } } ; static final GenericListBlockParser . Type ORDERERED_UPPER_ROMAN = new GenericListBlockParser . Type ( ) { public boolean isOrdered ( ) { } public String getItemPattern ( ) { } public ListBlockItem createList ( final ListItemBlock [ ] items ) { } } ; static final GenericListBlockParser . Type [ ] TYPES = new GenericListBlockParser . Type [ ] { GenericListBlockParser . LIST , GenericListBlockParser . ORDERED_LOWER_ALPHA , GenericListBlockParser . ORDERED_UPPER_ALPHA , GenericListBlockParser . ORDERERED_DECIMAL , GenericListBlockParser . ORDERERED_LOWER_ROMAN , GenericListBlockParser . ORDERERED_UPPER_ROMAN } ; }

Fix:
buffer = buffer . concat ( ( l + "\n" ) ) ;