Buggy code:
public class BlockScope extends Scope { public LocalVariableBinding [ ] locals ; public int localIndex ; public int startIndex ; public int offset ; public int maxOffset ; public BlockScope shiftScope ; public static final VariableBinding [ ] EmulationPathToImplicitThis = new VariableBinding [ ] { } ; public Scope [ ] subscopes = new Scope [ 1 ] ; public int scopeIndex = 0 ; protected BlockScope ( int kind , Scope parent ) { } public BlockScope ( BlockScope parent ) { } public BlockScope ( BlockScope parent , int variableCount ) { } public final void addAnonymousType ( TypeDeclaration anonymousType , ReferenceBinding superBinding ) { } public final void addLocalType ( TypeDeclaration localType ) { } public final void addLocalVariable ( LocalVariableBinding binding ) { } private void addSubscope ( Scope childScope ) { } public final boolean allowBlankFinalFieldAssignment ( FieldBinding binding ) { } String basicToString ( int tab ) { } private void checkAndSetModifiersForVariable ( LocalVariableBinding varBinding ) { } public void computeLocalVariablePositions ( int initOffset , CodeStream codeStream ) { this . offset = initOffset ; this . maxOffset = initOffset ; int ilocal = 0 ; int maxLocals = 0 ; int localsLength = locals . length ; while ( ( maxLocals < localsLength ) && ( ( locals [ maxLocals ] ) != null ) ) maxLocals ++ ; boolean hasMoreVariables = maxLocals > 0 ; int iscope = 0 ; int maxScopes = 0 ; int subscopesLength = subscopes . length ; while ( ( maxScopes < subscopesLength ) && ( ( subscopes [ maxScopes ] ) != null ) ) maxScopes ++ ; boolean hasMoreScopes = maxScopes > 0 ; while ( hasMoreVariables || hasMoreScopes ) { if ( hasMoreScopes && ( ( ! hasMoreVariables ) || ( ( subscopes [ iscope ] . startIndex ( ) ) <= ilocal ) ) ) { if ( ( subscopes [ iscope ] ) instanceof BlockScope ) { BlockScope subscope = ( ( BlockScope ) ( subscopes [ iscope ] ) ) ; <START_BUG> int subOffset = ( ( subscope . shiftScope ) == null ) ? this . offset : subscope . shiftScope . offset ; <END_BUG> subscope . computeLocalVariablePositions ( subOffset , codeStream ) ; if ( ( subscope . maxOffset ) > ( this . maxOffset ) ) this . maxOffset = subscope . maxOffset ; } hasMoreScopes = ( ++ iscope ) < maxScopes ; } else { LocalVariableBinding local = locals [ ilocal ] ; boolean generatesLocal = ( ( local . used ) && ( ( local . constant ) == ( Constant . NotAConstant ) ) ) || ( local . isArgument ) ; if ( ( ( ! ( local . used ) ) && ( ( local . declaration ) != null ) ) && ( ( ( local . declaration . bits ) & ( AstNode . IsLocalDeclarationReachableMASK ) ) != 0 ) ) { if ( local . isArgument ) this . problemReporter ( ) . unusedArgument ( local . declaration ) ; else if ( ! ( ( local . declaration ) instanceof Argument ) ) this . problemReporter ( ) . unusedLocalVariable ( local . declaration ) ; } if ( ! generatesLocal ) { if ( ( ( local . declaration ) != null ) && ( environment ( ) . options . preserveAllLocalVariables ) ) { generatesLocal = true ; local . used = true ; } } if ( generatesLocal ) { if ( ( local . name ) != ( SecretReturnName ) ) { if ( ( local . declaration ) != null ) { codeStream . record ( local ) ; } local . resolvedPosition = this . offset ; if ( local . isArgument ) { if ( ( this . offset ) > 255 ) { this . problemReporter ( ) . noMoreAvailableSpaceForArgument ( local , local . declaration ) ; } } else { if ( ( this . offset ) > 65535 ) { this . problemReporter ( ) . noMoreAvailableSpaceForLocal ( local , ( ( local . declaration ) == null ? ( ( AstNode ) ( this . methodScope ( ) . referenceContext ) ) : local . declaration ) ) ; } } if ( ( ( local . type ) == ( LongBinding ) ) || ( ( local . type ) == ( DoubleBinding ) ) ) { this . offset += 2 ; } else { ( this . offset ) ++ ; } } } else { local . resolvedPosition = - 1 ; } hasMoreVariables = ( ++ ilocal ) < maxLocals ; } } if ( ( this . offset ) > ( this . maxOffset ) ) this . maxOffset = this . offset ; } public final LocalVariableBinding duplicateName ( char [ ] name ) { } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public void emulateOuterAccess ( ReferenceBinding targetEnclosingType , boolean useDirectReference ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalVariableBinding findVariable ( char [ ] variable ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite ) { } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public Binding getBinding ( char [ ] name , int mask , InvocationSite invocationSite ) { } public Object [ ] getCompatibleEmulationPath ( ReferenceBinding targetEnclosingType ) { } public MethodBinding getConstructor ( ReferenceBinding receiverType , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getExactEmulationPath ( ReferenceBinding targetEnclosingType ) { } public FieldBinding getField ( TypeBinding receiverType , char [ ] fieldName , InvocationSite invocationSite ) { } public MethodBinding getImplicitMethod ( char [ ] selector , TypeBinding [ ] argumentTypes , InvocationSite invocationSite ) { }

Fix:
int subOffset = ( ( subscope . shiftScope ) == null ) ? this . offset : subscope . shiftScope . maxOffset ;