Buggy code:
public static final int DO_STATEMENT = 19 ; public static final int EMPTY_STATEMENT = 20 ; public static final int EXPRESSION_STATEMENT = 21 ; public static final int FIELD_ACCESS = 22 ; public static final int FIELD_DECLARATION = 23 ; public static final int FOR_STATEMENT = 24 ; public static final int IF_STATEMENT = 25 ; public static final int IMPORT_DECLARATION = 26 ; public static final int INFIX_EXPRESSION = 27 ; public static final int INITIALIZER = 28 ; public static final int JAVADOC = 29 ; public static final int LABELED_STATEMENT = 30 ; public static final int METHOD_DECLARATION = 31 ; public static final int METHOD_INVOCATION = 32 ; public static final int NULL_LITERAL = 33 ; public static final int NUMBER_LITERAL = 34 ; public static final int PACKAGE_DECLARATION = 35 ; public static final int PARENTHESIZED_EXPRESSION = 36 ; public static final int POSTFIX_EXPRESSION = 37 ; public static final int PREFIX_EXPRESSION = 38 ; public static final int PRIMITIVE_TYPE = 39 ; public static final int QUALIFIED_NAME = 40 ; public static final int RETURN_STATEMENT = 41 ; public static final int SIMPLE_NAME = 42 ; public static final int SIMPLE_TYPE = 43 ; public static final int SINGLE_VARIABLE_DECLARATION = 44 ; public static final int STRING_LITERAL = 45 ; public static final int SUPER_CONSTRUCTOR_INVOCATION = 46 ; public static final int SUPER_FIELD_ACCESS = 47 ; public static final int SUPER_METHOD_INVOCATION = 48 ; public static final int SWITCH_CASE = 49 ; public static final int SWITCH_STATEMENT = 50 ; public static final int SYNCHRONIZED_STATEMENT = 51 ; public static final int THIS_EXPRESSION = 52 ; public static final int THROW_STATEMENT = 53 ; public static final int TRY_STATEMENT = 54 ; public static final int TYPE_DECLARATION = 55 ; public static final int TYPE_DECLARATION_STATEMENT = 56 ; public static final int TYPE_LITERAL = 57 ; public static final int VARIABLE_DECLARATION_EXPRESSION = 58 ; public static final int VARIABLE_DECLARATION_FRAGMENT = 59 ; public static final int VARIABLE_DECLARATION_STATEMENT = 60 ; public static final int WHILE_STATEMENT = 61 ; public static final int INSTANCEOF_EXPRESSION = 62 ; private final AST owner ; private ASTNode parent = null ; private static Map UNMODIFIABLE_EMPTY_MAP = Collections . unmodifiableMap ( new HashMap ( 1 ) ) ; private Object property1 = null ; private Object property2 = null ; private int startPosition = - 1 ; private int length = 0 ; public static final int MALFORMED = 1 ; private int flags = 0 ; class NodeList extends AbstractList { ArrayList store = new ArrayList ( 0 ) ; private boolean cycleCheck ; private Class nodeType ; class Cursor implements Iterator { private int position = 0 ; public boolean hasNext ( ) { } public Object next ( ) { } public void remove ( ) { } void update ( int index , int delta ) { } } private List cursors = null ; NodeList ( boolean cycleCheck , Class nodeType ) { } public int size ( ) { } public Object get ( int index ) { } public Object set ( int index , Object element ) { } public void add ( int index , Object element ) { } public Object remove ( int index ) { } ASTNode . NodeList . Cursor newCursor ( ) { } void releaseCursor ( ASTNode . NodeList . Cursor cursor ) { } private void updateCursors ( int index , int delta ) { } int memSize ( ) { } int listSize ( ) { } } ASTNode ( AST ast ) { } public AST getAST ( ) { } public ASTNode getParent ( ) { } public ASTNode getRoot ( ) { } void modifying ( ) { } void setParent ( ASTNode parent ) { } void replaceChild ( ASTNode oldChild , ASTNode newChild , boolean cycleCheck ) { } static void checkNewChild ( ASTNode node , ASTNode newChild , boolean cycleCheck , Class nodeType ) { } public Object getProperty ( String propertyName ) { } public void setProperty ( String propertyName , Object data ) { } public Map properties ( ) { } public int getFlags ( ) { } public void setFlags ( int flags ) { } public abstract int getNodeType ( ) { } public final boolean equals ( Object obj ) { } public abstract boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } public static ASTNode copySubtree ( AST target , ASTNode node ) { } public static List copySubtrees ( AST target , List nodes ) { } abstract ASTNode clone ( AST target ) { } public final void accept ( ASTVisitor visitor ) { } abstract void accept0 ( ASTVisitor visitor ) { } final void acceptChild ( ASTVisitor visitor , ASTNode child ) { } final void acceptChildren ( ASTVisitor visitor , ASTNode . NodeList children ) { } public int getStartPosition ( ) { } public int getLength ( ) { } public void setSourceRange ( int startPosition , int length ) { } public final String toString ( ) { StringBuffer buffer = new StringBuffer ( 6000 ) ; int p = buffer . length ( ) ; try { appendDebugString ( buffer ) ; } catch ( RuntimeException e ) { buffer . setLength ( p ) ; buffer . append ( "!" ) ; buffer . append ( standardToString ( ) ) ; } <START_BUG> return new String ( buffer . toString ( ) ) ; <END_BUG> } final String standardToString ( ) { } void appendDebugString ( StringBuffer buffer ) { } final void appendPrintString ( StringBuffer buffer ) { } static final int HEADERS = 12 ; static final int BASE_NODE_SIZE = ( ASTNode . HEADERS ) + ( 6 * 4 ) ; public final int subtreeBytes ( ) { } abstract int treeSize ( ) { } abstract int memSize ( ) { } }

Fix:
return buffer . toString ( ) ;