Buggy code:
public class BlockScope extends Scope { public LocalVariableBinding [ ] locals ; public int localIndex ; public int startIndex ; public int offset ; public int maxOffset ; public BlockScope [ ] shiftScopes ; public static final VariableBinding [ ] EmulationPathToImplicitThis = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInConstructorCall = new VariableBinding [ ] { } ; public static final VariableBinding [ ] NoEnclosingInstanceInStaticContext = new VariableBinding [ ] { } ; public Scope [ ] subscopes = new Scope [ 1 ] ; public int subscopeCount = 0 ; public CaseStatement enclosingCase ; protected BlockScope ( int kind , Scope parent ) { } public BlockScope ( BlockScope parent ) { } public BlockScope ( BlockScope parent , boolean addToParentScope ) { } 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 ) { } public void addSubscope ( Scope childScope ) { } public final boolean allowBlankFinalFieldAssignment ( FieldBinding binding ) { } String basicToString ( int tab ) { } private void checkAndSetModifiersForVariable ( LocalVariableBinding varBinding ) { } void computeLocalVariablePositions ( int ilocal , int initOffset , CodeStream codeStream ) { this . offset = initOffset ; this . maxOffset = initOffset ; int maxLocals = this . localIndex ; boolean hasMoreVariables = ilocal < maxLocals ; int iscope = 0 ; int maxScopes = this . subscopeCount ; boolean hasMoreScopes = maxScopes > 0 ; while ( hasMoreVariables || hasMoreScopes ) { if ( hasMoreScopes && ( ( ! hasMoreVariables ) || ( ( subscopes [ iscope ] . startIndex ( ) ) <= ilocal ) ) ) { if ( ( subscopes [ iscope ] ) instanceof BlockScope ) { BlockScope subscope = ( ( BlockScope ) ( subscopes [ iscope ] ) ) ; int subOffset = ( ( subscope . shiftScopes ) == null ) ? this . offset : subscope . maxShiftedOffset ( ) ; subscope . computeLocalVariablePositions ( 0 , subOffset , codeStream ) ; if ( ( subscope . maxOffset ) > ( this . maxOffset ) ) this . maxOffset = subscope . maxOffset ; } hasMoreScopes = ( ++ iscope ) < maxScopes ; } else { LocalVariableBinding local = locals [ ilocal ] ; boolean generateCurrentLocalVar = ( ( local . useFlag ) == ( LocalVariableBinding . USED ) ) && ( ! ( local . isConstantValue ( ) ) ) ; <START_BUG> if ( ( ( ( local . useFlag ) == ( LocalVariableBinding . UNUSED ) ) && ( ( local . declaration ) != null ) ) && ( ( ( local . declaration . bits ) & ( IsLocalDeclarationReachableMASK ) ) != 0 ) ) { <END_BUG> if ( ! ( ( local . declaration ) instanceof Argument ) ) this . problemReporter ( ) . unusedLocalVariable ( local . declaration ) ; } if ( ! generateCurrentLocalVar ) { if ( ( ( local . declaration ) != null ) && ( compilerOptions ( ) . preserveAllLocalVariables ) ) { generateCurrentLocalVar = true ; local . useFlag = LocalVariableBinding . USED ; } } if ( generateCurrentLocalVar ) { if ( ( local . declaration ) != null ) { codeStream . record ( local ) ; } local . resolvedPosition = this . offset ; if ( ( ( local . type ) == ( LongBinding ) ) || ( ( local . type ) == ( DoubleBinding ) ) ) { this . offset += 2 ; } else { ( this . offset ) ++ ; } if ( ( this . offset ) > 65535 ) { this . problemReporter ( ) . noMoreAvailableSpaceForLocal ( local , ( ( local . declaration ) == null ? ( ( ASTNode ) ( this . methodScope ( ) . referenceContext ) ) : local . declaration ) ) ; } } else { local . resolvedPosition = - 1 ; } hasMoreVariables = ( ++ ilocal ) < maxLocals ; } } if ( ( this . offset ) > ( this . maxOffset ) ) this . maxOffset = this . offset ; } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalVariableBinding findVariable ( char [ ] variable ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , boolean needResolve ) { } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getEmulationPath ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch , boolean denyEnclosingArgInConstructorCall ) { } public final boolean isDuplicateLocalVariable ( char [ ] name ) { } public int maxShiftedOffset ( ) { } public ProblemReporter problemReporter ( ) { } public void propagateInnerEmulation ( ReferenceBinding targetType , boolean isEnclosingInstanceSupplied ) { } public TypeDeclaration referenceType ( ) { } public int scopeIndex ( ) { } int startIndex ( ) { } public String toString ( ) { } public String toString ( int tab ) { } }

Fix:
if ( ( ( ( local . useFlag ) == ( LocalVariableBinding . UNUSED ) ) && ( ( local . declaration ) != null ) ) && ( ( ( local . declaration . bits ) & ( ASTNode . IsLocalDeclarationReachable ) ) != 0 ) ) {