Buggy code:
public class FlowContext implements TypeConstants { public static final FlowContext NotContinuableContext = new FlowContext ( null , null ) ; public ASTNode associatedNode ; public FlowContext parent ; public NullInfoRegistry initsOnFinally ; boolean deferNullDiagnostic ; boolean preemptNullDiagnostic ; public FlowContext ( FlowContext parent , ASTNode associatedNode ) { } public BranchLabel breakLabel ( ) { } public void checkExceptionHandlers ( TypeBinding raisedException , ASTNode location , FlowInfo flowInfo , BlockScope scope ) { } public void checkExceptionHandlers ( TypeBinding [ ] raisedExceptions , ASTNode location , FlowInfo flowInfo , BlockScope scope ) { } public BranchLabel continueLabel ( ) { } public FlowContext getTargetContextForBreakLabel ( char [ ] labelName ) { } public FlowContext getTargetContextForContinueLabel ( char [ ] labelName ) { } public FlowContext getTargetContextForDefaultBreak ( ) { } public FlowContext getTargetContextForDefaultContinue ( ) { } public String individualToString ( ) { } public FlowInfo initsOnBreak ( ) { } public UnconditionalFlowInfo initsOnReturn ( ) { } public boolean isBreakable ( ) { } public boolean isContinuable ( ) { } public boolean isNonReturningContext ( ) { } public boolean isSubRoutine ( ) { } public char [ ] labelName ( ) { } public void recordBreakFrom ( FlowInfo flowInfo ) { } public void recordContinueFrom ( FlowContext innerFlowContext , FlowInfo flowInfo ) { } protected boolean recordFinalAssignment ( VariableBinding variable , Reference finalReference ) { } protected void recordNullReference ( LocalVariableBinding local , Expression expression , int status ) { } public void recordReturnFrom ( UnconditionalFlowInfo flowInfo ) { } public void recordSettingFinal ( VariableBinding variable , Reference finalReference , FlowInfo flowInfo ) { } public static final int CAN_ONLY_NULL_NON_NULL = 20 ; public static final int CAN_ONLY_NULL = 21 ; public static final int MAY_NULL = 22 ; public static final int CAN_ONLY_NON_NULL = 23 ; public void recordUsingNullReference ( Scope scope , LocalVariableBinding local , Expression reference , int checkType , FlowInfo flowInfo ) { if ( ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) != 0 ) || ( flowInfo . isDefinitelyUnknown ( local ) ) ) { return ; } switch ( checkType ) { case FlowContext . CAN_ONLY_NULL_NON_NULL : if ( flowInfo . isDefinitelyNonNull ( local ) ) { scope . problemReporter ( ) . localVariableCannotBeNull ( local , reference ) ; return ; } else if ( flowInfo . cannotBeDefinitelyNullOrNonNull ( local ) ) { return ; } case FlowContext . CAN_ONLY_NULL : if ( flowInfo . isDefinitelyNull ( local ) ) { <START_BUG> scope . problemReporter ( ) . localVariableCanOnlyBeNull ( local , reference ) ; <END_BUG> return ; } else if ( flowInfo . cannotBeDefinitelyNullOrNonNull ( local ) ) { return ; } break ; case FlowContext . MAY_NULL : if ( flowInfo . isDefinitelyNull ( local ) ) { scope . problemReporter ( ) . localVariableCanOnlyBeNull ( local , reference ) ; return ; } if ( flowInfo . isPotentiallyNull ( local ) ) { scope . problemReporter ( ) . localVariableMayBeNull ( local , reference ) ; return ; } break ; default : } if ( ( this . parent ) != null ) { this . parent . recordUsingNullReference ( scope , local , reference , checkType , flowInfo ) ; } } void removeFinalAssignmentIfAny ( Reference reference ) { } public SubRoutineStatement subroutine ( ) { } public String toString ( ) { } }

Fix:
scope . problemReporter ( ) . localVariableRedundantCheckOnNull ( local , reference ) ;