Buggy code:
public abstract class AssistParser extends Parser { public AstNode assistNode ; public boolean isOrphanCompletionNode ; int [ ] blockStarts = new int [ 30 ] ; protected int previousToken ; protected int previousIdentifierPtr ; protected static final int ElementStackIncrement = 100 ; protected int elementPtr ; protected int [ ] elementKindStack = new int [ AssistParser . ElementStackIncrement ] ; protected int [ ] elementInfoStack = new int [ AssistParser . ElementStackIncrement ] ; protected int previousKind ; protected int previousInfo ; protected static final int ASSIST_PARSER = 512 ; protected static final int K_SELECTOR = ( AssistParser . ASSIST_PARSER ) + 1 ; protected static final int K_TYPE_DELIMITER = ( AssistParser . ASSIST_PARSER ) + 2 ; protected static final int K_METHOD_DELIMITER = ( AssistParser . ASSIST_PARSER ) + 3 ; protected static final int K_FIELD_INITIALIZER_DELIMITER = ( AssistParser . ASSIST_PARSER ) + 4 ; protected static final int THIS_CONSTRUCTOR = - 1 ; protected static final int SUPER_CONSTRUCTOR = - 2 ; protected boolean isFirst = false ; public AssistParser ( ProblemReporter problemReporter , boolean assertMode ) { } public abstract char [ ] assistIdentifier ( ) { } public int bodyEnd ( AbstractMethodDeclaration method ) { } public int bodyEnd ( Initializer initializer ) { } public RecoveredElement buildInitialRecoveryState ( ) { } protected void consumeClassBodyDeclaration ( ) { } protected void consumeClassBodyopt ( ) { } protected void consumeClassHeader ( ) { } protected void consumeConstructorBody ( ) { } protected void consumeConstructorHeader ( ) { } protected void consumeEnterAnonymousClassBody ( ) { } protected void consumeExplicitConstructorInvocation ( int flag , int recFlag ) { } protected void consumeForceNoDiet ( ) { } protected void consumeInterfaceHeader ( ) { } protected void consumeMethodBody ( ) { } protected void consumeMethodHeader ( ) { } protected void consumeMethodInvocationName ( ) { } protected void consumeMethodInvocationPrimary ( ) { } protected void consumeMethodInvocationSuper ( ) { } protected void consumeNestedMethod ( ) { } protected void consumeOpenBlock ( ) { } protected void consumePackageDeclarationName ( ) { } protected void consumeRestoreDiet ( ) { } protected void consumeSingleTypeImportDeclarationName ( ) { } protected void consumeStaticInitializer ( ) { } protected void consumeStaticOnly ( ) { } protected void consumeToken ( int token ) { } protected void consumeTypeImportOnDemandDeclarationName ( ) { } public abstract ImportReference createAssistImportReference ( char [ ] [ ] tokens , long [ ] positions ) { } public abstract ImportReference createAssistPackageReference ( char [ ] [ ] tokens , long [ ] positions ) { } public abstract NameReference createQualifiedAssistNameReference ( char [ ] [ ] previousIdentifiers , char [ ] name , long [ ] positions ) { } public abstract TypeReference createQualifiedAssistTypeReference ( char [ ] [ ] previousIdentifiers , char [ ] name , long [ ] positions ) { } public abstract NameReference createSingleAssistNameReference ( char [ ] name , long position ) { } public abstract TypeReference createSingleAssistTypeReference ( char [ ] name , long position ) { } public void flushAssistState ( ) { } protected void flushElementStack ( ) { } protected TypeReference getTypeReference ( int dim ) { } protected NameReference getUnspecifiedReferenceOptimized ( ) { } public void goForBlockStatementsopt ( ) { } public void goForConstructorBlockStatementsopt ( ) { } public void goForHeaders ( ) { } public void goForCompilationUnit ( ) { } public void goForBlockStatementsOrMethodHeaders ( ) { } protected char [ ] [ ] identifierSubSet ( int subsetLength ) { } protected int indexOfAssistIdentifier ( ) { } public void initialize ( ) { } public abstract void initializeScanner ( ) { } protected boolean isIndirectlyInsideFieldInitialization ( ) { } protected boolean isIndirectlyInsideMethod ( ) { } protected boolean isIndirectlyInsideType ( ) { } protected boolean isInsideFieldInitialization ( ) { } protected boolean isInsideMethod ( ) { } protected boolean isInsideType ( ) { } protected int lastIndexOfElement ( int kind ) { } public void parseBlockStatements ( AbstractMethodDeclaration md , CompilationUnitDeclaration unit ) { } public void parseBlockStatements ( ConstructorDeclaration cd , CompilationUnitDeclaration unit ) { } public void parseBlockStatements ( Initializer ini , TypeDeclaration type , CompilationUnitDeclaration unit ) { } public void parseBlockStatements ( MethodDeclaration md , CompilationUnitDeclaration unit ) { } protected void popElement ( int kind ) { } protected void popUntilElement ( int kind ) { if ( ( elementPtr ) < 0 ) return ; int i = elementPtr ; while ( ( i >= 0 ) && ( ( elementKindStack [ i ] ) != kind ) ) { i -- ; } <START_BUG> if ( i > 0 ) { <END_BUG> if ( i < ( elementPtr ) ) { previousKind = elementKindStack [ ( i + 1 ) ] ; previousInfo = elementInfoStack [ ( i + 1 ) ] ; } elementPtr = i ; } } protected void prepareForBlockStatements ( ) { } protected void prepareForHeaders ( ) { } protected void pushOnElementStack ( int kind ) { } protected void pushOnElementStack ( int kind , int info ) { } public void recoveryExitFromVariable ( ) { } public void recoveryTokenCheck ( ) { } public void reset ( ) { } protected boolean resumeAfterRecovery ( ) { } public abstract void setAssistIdentifier ( char [ ] assistIdent ) { } protected int topKnownElementInfo ( int owner ) { } protected int topKnownElementInfo ( int owner , int offSet ) { } protected int topKnownElementKind ( int owner ) { } protected int topKnownElementKind ( int owner , int offSet ) { } protected AstNode wrapWithExplicitConstructorCallIfNeeded ( AstNode ast ) { } }

Fix:
if ( i >= 0 ) {