Buggy code:
public class SwitchStatement extends Statement { public Expression expression ; public Statement [ ] statements ; public BlockScope scope ; public int explicitDeclarations ; public Label breakLabel ; public CaseStatement [ ] cases ; public CaseStatement defaultCase ; public int blockStart ; public int caseCount ; int [ ] constants ; int preSwitchInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { try { if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { return ; } int pc = codeStream . position ; this . breakLabel . initialize ( codeStream ) ; CaseLabel [ ] caseLabels = new CaseLabel [ this . caseCount ] ; boolean needSwitch = ( this . caseCount ) != 0 ; for ( int i = 0 ; i < ( caseCount ) ; i ++ ) { cases [ i ] . targetLabel = caseLabels [ i ] = new CaseLabel ( codeStream ) ; } CaseLabel defaultLabel = new CaseLabel ( codeStream ) ; if ( ( defaultCase ) != null ) { defaultCase . targetLabel = defaultLabel ; } expression . generateCode ( currentScope , codeStream , needSwitch ) ; if ( needSwitch ) { int [ ] sortedIndexes = new int [ this . caseCount ] ; for ( int i = 0 ; i < ( caseCount ) ; i ++ ) { sortedIndexes [ i ] = i ; } int [ ] localKeysCopy ; System . arraycopy ( this . constants , 0 , ( localKeysCopy = new int [ this . caseCount ] ) , 0 , this . caseCount ) ; CodeStream . sort ( localKeysCopy , 0 , ( ( this . caseCount ) - 1 ) , sortedIndexes ) ; if ( this . expression . resolvedType . isEnum ( ) ) { codeStream . invokeEnumOrdinal ( this . expression . resolvedType . constantPoolName ( ) ) ; } int max = localKeysCopy [ ( ( this . caseCount ) - 1 ) ] ; int min = localKeysCopy [ 0 ] ; if ( ( ( long ) ( ( caseCount ) * 2.5 ) ) > ( ( ( long ) ( max ) ) - ( ( long ) ( min ) ) ) ) { if ( ( max > 2147418112 ) && ( ( currentScope . environment ( ) . options . complianceLevel ) < ( ClassFileConstants . JDK1_4 ) ) ) { codeStream . lookupswitch ( defaultLabel , this . constants , sortedIndexes , caseLabels ) ; } else { codeStream . tableswitch ( defaultLabel , min , max , this . constants , sortedIndexes , caseLabels ) ; } } else { codeStream . lookupswitch ( defaultLabel , this . constants , sortedIndexes , caseLabels ) ; } <START_BUG> codeStream . updateLastRecordedEndPC ( codeStream . position ) ; <END_BUG> } int caseIndex = 0 ; if ( ( this . statements ) != null ) { for ( int i = 0 , maxCases = this . statements . length ; i < maxCases ; i ++ ) { Statement statement = this . statements [ i ] ; if ( ( caseIndex < ( this . caseCount ) ) && ( statement == ( this . cases [ caseIndex ] ) ) ) { this . scope . enclosingCase = this . cases [ caseIndex ] ; if ( ( preSwitchInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , preSwitchInitStateIndex ) ; } caseIndex ++ ; } else { if ( statement == ( this . defaultCase ) ) { this . scope . enclosingCase = this . defaultCase ; if ( ( preSwitchInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , preSwitchInitStateIndex ) ; } } } statement . generateCode ( scope , codeStream ) ; } } this . breakLabel . place ( ) ; if ( ( defaultCase ) == null ) { defaultLabel . place ( ) ; } if ( ( mergedInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; } if ( ( scope ) != currentScope ) { codeStream . exitUserScope ( this . scope ) ; } codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } finally { if ( ( this . scope ) != null ) this . scope . enclosingCase = null ; } } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope upperScope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } public void branchChainTo ( Label label ) { } }

Fix:
codeStream . updateLastRecordedEndPC ( this . scope , codeStream . position ) ;