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 caseCount = 0 ; public int blockStart ; int preSwitchInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { try { int [ ] sortedIndexes = new int [ caseCount ] ; int [ ] localKeysCopy ; if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { return ; } int pc = codeStream . position ; <START_BUG> breakLabel . codeStream = codeStream ; <END_BUG> CaseLabel [ ] caseLabels = new CaseLabel [ caseCount ] ; int [ ] constants = new int [ caseCount ] ; boolean needSwitch = ( caseCount ) != 0 ; for ( int i = 0 ; i < ( caseCount ) ; i ++ ) { constants [ i ] = cases [ i ] . constantExpression . constant . intValue ( ) ; cases [ i ] . targetLabel = caseLabels [ i ] = new CaseLabel ( codeStream ) ; } for ( int i = 0 ; i < ( caseCount ) ; i ++ ) { sortedIndexes [ i ] = i ; } System . arraycopy ( constants , 0 , ( localKeysCopy = new int [ caseCount ] ) , 0 , caseCount ) ; CodeStream . sort ( localKeysCopy , 0 , ( ( caseCount ) - 1 ) , sortedIndexes ) ; CaseLabel defaultLabel = new CaseLabel ( codeStream ) ; if ( ( defaultCase ) != null ) { defaultCase . targetLabel = defaultLabel ; } expression . generateCode ( currentScope , codeStream , needSwitch ) ; if ( needSwitch ) { int max = localKeysCopy [ ( ( 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 , constants , sortedIndexes , caseLabels ) ; } else { codeStream . tableswitch ( defaultLabel , min , max , constants , sortedIndexes , caseLabels ) ; } } else { codeStream . lookupswitch ( defaultLabel , constants , sortedIndexes , caseLabels ) ; } codeStream . updateLastRecordedEndPC ( codeStream . position ) ; } int caseIndex = 0 ; if ( ( statements ) != null ) { for ( int i = 0 , maxCases = statements . length ; i < maxCases ; i ++ ) { Statement statement = statements [ i ] ; if ( ( caseIndex < ( caseCount ) ) && ( statement == ( cases [ caseIndex ] ) ) ) { this . scope . switchCase = cases [ caseIndex ] ; if ( ( preSwitchInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , preSwitchInitStateIndex ) ; } caseIndex ++ ; } else { if ( statement == ( defaultCase ) ) { this . scope . switchCase = defaultCase ; if ( ( preSwitchInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , preSwitchInitStateIndex ) ; } } } statement . generateCode ( scope , codeStream ) ; } } breakLabel . place ( ) ; if ( ( defaultCase ) == null ) { defaultLabel . place ( ) ; } if ( ( mergedInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; } if ( ( scope ) != currentScope ) { codeStream . exitUserScope ( scope ) ; } codeStream . recordPositionsFrom ( pc , this . sourceStart ) ; } finally { if ( ( this . scope ) != null ) this . scope . switchCase = null ; } } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resetStateForCodeGeneration ( ) { } public void resolve ( BlockScope upperScope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } public void branchChainTo ( Label label ) { } }

Fix:
breakLabel . initialize ( codeStream ) ;