Buggy code:
public class SwitchStatement extends Statement { public Expression expression ; public Statement [ ] statements ; public BlockScope scope ; public int explicitDeclarations ; public BranchLabel breakLabel ; public CaseStatement [ ] cases ; public CaseStatement defaultCase ; public int blockStart ; public int caseCount ; int [ ] constants ; public static final int CASE = 0 ; public static final int FALLTHROUGH = 1 ; public static final int ESCAPING = 2 ; public SyntheticMethodBinding synthetic ; int preSwitchInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { try { if ( ( ( this . bits ) & ( ASTNode . IsReachable ) ) == 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 < ( this . caseCount ) ; i ++ ) { this . cases [ i ] . targetLabel = caseLabels [ i ] = new CaseLabel ( codeStream ) ; caseLabels [ i ] . tagBits |= BranchLabel . USED ; } CaseLabel defaultLabel = new CaseLabel ( codeStream ) ; if ( needSwitch ) defaultLabel . tagBits |= BranchLabel . USED ; if ( ( this . defaultCase ) != null ) { this . defaultCase . targetLabel = defaultLabel ; } final TypeBinding resolvedType = this . expression . resolvedType ; if ( resolvedType . isEnum ( ) ) { if ( needSwitch ) { <START_BUG> codeStream . invokestatic ( this . synthetic ) ; <END_BUG> this . expression . generateCode ( currentScope , codeStream , true ) ; codeStream . invokeEnumOrdinal ( resolvedType . constantPoolName ( ) ) ; codeStream . iaload ( ) ; } else { this . expression . generateCode ( currentScope , codeStream , false ) ; } } else { this . expression . generateCode ( currentScope , codeStream , needSwitch ) ; } if ( needSwitch ) { int [ ] sortedIndexes = new int [ this . caseCount ] ; for ( int i = 0 ; i < ( this . 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 ) ; int max = localKeysCopy [ ( ( this . caseCount ) - 1 ) ] ; int min = localKeysCopy [ 0 ] ; if ( ( ( long ) ( ( this . caseCount ) * 2.5 ) ) > ( ( ( long ) ( max ) ) - ( ( long ) ( min ) ) ) ) { if ( ( max > 2147418112 ) && ( ( currentScope . compilerOptions ( ) . 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 ) ; } codeStream . updateLastRecordedEndPC ( this . scope , codeStream . position ) ; } 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 ( ( this . preSwitchInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . preSwitchInitStateIndex ) ; } caseIndex ++ ; } else { if ( statement == ( this . defaultCase ) ) { this . scope . enclosingCase = this . defaultCase ; if ( ( this . preSwitchInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . preSwitchInitStateIndex ) ; } } } statement . generateCode ( this . scope , codeStream ) ; } } if ( ( this . mergedInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , this . mergedInitStateIndex ) ; codeStream . addDefinitelyAssignedVariables ( currentScope , this . mergedInitStateIndex ) ; } if ( ( this . scope ) != currentScope ) { codeStream . exitUserScope ( this . scope ) ; } this . breakLabel . place ( ) ; if ( ( this . defaultCase ) == null ) { codeStream . recordPositionsFrom ( codeStream . position , this . sourceEnd , true ) ; defaultLabel . place ( ) ; } 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 ( BranchLabel label ) { } }

Fix:
codeStream . invoke ( Opcodes . OPC_invokestatic , this . synthetic , null ) ;