Buggy code:
public abstract class AbstractLinkedList < E > implements List < E > { protected transient AbstractLinkedList . Node < E > header ; protected transient int size ; protected transient int modCount ; protected AbstractLinkedList ( ) { } protected AbstractLinkedList ( Collection < ? extends E > coll ) { } protected void init ( ) { } public int size ( ) { } public boolean isEmpty ( ) { } public E get ( int index ) { } public Iterator < E > iterator ( ) { } public ListIterator < E > listIterator ( ) { } public ListIterator < E > listIterator ( int fromIndex ) { } public int indexOf ( Object value ) { } public int lastIndexOf ( Object value ) { } public boolean contains ( Object value ) { } public boolean containsAll ( Collection < ? > coll ) { } public Object [ ] toArray ( ) { } @ SuppressWarnings ( "unchecked" ) public < T > T [ ] toArray ( T [ ] array ) { } public List < E > subList ( int fromIndexInclusive , int toIndexExclusive ) { } public boolean add ( E value ) { } public void add ( int index , E value ) { } public boolean addAll ( Collection < ? extends E > coll ) { } public boolean addAll ( int index , Collection < ? extends E > coll ) { } public E remove ( int index ) { } public boolean remove ( Object value ) { } public boolean removeAll ( Collection < ? > coll ) { } public boolean retainAll ( Collection < ? > coll ) { } public E set ( int index , E value ) { } public void clear ( ) { } public E getFirst ( ) { } public E getLast ( ) { } public boolean addFirst ( E o ) { } public boolean addLast ( E o ) { } public E removeFirst ( ) { } public E removeLast ( ) { } @ SuppressWarnings ( "unchecked" ) public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { if ( ( size ( ) ) == 0 ) { return "[]" ; } <START_BUG> StringBuffer buf = new StringBuffer ( ( 16 * ( size ( ) ) ) ) ; <END_BUG> buf . append ( "[" ) ; Iterator < E > it = iterator ( ) ; boolean hasNext = it . hasNext ( ) ; while ( hasNext ) { Object value = it . next ( ) ; buf . append ( ( value == ( this ) ? "(this<seq2seq4repair_space>Collection)" : value ) ) ; hasNext = it . hasNext ( ) ; if ( hasNext ) { buf . append ( ",<seq2seq4repair_space>" ) ; } } buf . append ( "]" ) ; return buf . toString ( ) ; } protected boolean isEqualValue ( Object value1 , Object value2 ) { } protected void updateNode ( AbstractLinkedList . Node < E > node , E value ) { } protected AbstractLinkedList . Node < E > createHeaderNode ( ) { } protected AbstractLinkedList . Node < E > createNode ( E value ) { } protected void addNodeBefore ( AbstractLinkedList . Node < E > node , E value ) { } protected void addNodeAfter ( AbstractLinkedList . Node < E > node , E value ) { } protected void addNode ( AbstractLinkedList . Node < E > nodeToInsert , AbstractLinkedList . Node < E > insertBeforeNode ) { } protected void removeNode ( AbstractLinkedList . Node < E > node ) { } protected void removeAllNodes ( ) { } protected AbstractLinkedList . Node < E > getNode ( int index , boolean endMarkerAllowed ) throws IndexOutOfBoundsException { } protected Iterator < E > createSubListIterator ( AbstractLinkedList . LinkedSubList < E > subList ) { } protected ListIterator < E > createSubListListIterator ( AbstractLinkedList . LinkedSubList < E > subList , int fromIndex ) { } protected void doWriteObject ( ObjectOutputStream outputStream ) throws IOException { } @ SuppressWarnings ( "unchecked" ) protected void doReadObject ( ObjectInputStream inputStream ) throws IOException , ClassNotFoundException { } protected static class Node < E > { protected AbstractLinkedList . Node < E > previous ; protected AbstractLinkedList . Node < E > next ; protected E value ; protected Node ( ) { } protected Node ( E value ) { } protected Node ( AbstractLinkedList . Node < E > previous , AbstractLinkedList . Node < E > next , E value ) { } protected E getValue ( ) { } protected void setValue ( E value ) { } protected AbstractLinkedList . Node < E > getPreviousNode ( ) { } protected void setPreviousNode ( AbstractLinkedList . Node < E > previous ) { } protected AbstractLinkedList . Node < E > getNextNode ( ) { } protected void setNextNode ( AbstractLinkedList . Node < E > next ) { } } protected static class LinkedListIterator < E > implements ListIterator < E > , OrderedIterator < E > { protected final AbstractLinkedList < E > parent ; protected AbstractLinkedList . Node < E > next ; protected int nextIndex ; protected AbstractLinkedList . Node < E > current ; protected int expectedModCount ; protected LinkedListIterator ( AbstractLinkedList < E > parent , int fromIndex ) throws IndexOutOfBoundsException { } protected void checkModCount ( ) { } protected AbstractLinkedList . Node < E > getLastNodeReturned ( ) throws IllegalStateException { } public boolean hasNext ( ) { } public E next ( ) { } public boolean hasPrevious ( ) { } public E previous ( ) { } public int nextIndex ( ) { } public int previousIndex ( ) { }

Fix:
StringBuilder buf = new StringBuilder ( ( 16 * ( size ( ) ) ) ) ;