Buggy code:
public class TypeDeclaration extends Statement implements ReferenceContext , ProblemSeverities { public static final int CLASS_DECL = 1 ; public static final int INTERFACE_DECL = 2 ; public static final int ENUM_DECL = 3 ; public static final int ANNOTATION_TYPE_DECL = 4 ; public int modifiers = ClassFileConstants . AccDefault ; public int modifiersSourceStart ; public Annotation [ ] annotations ; public char [ ] name ; public TypeReference superclass ; public TypeReference [ ] superInterfaces ; public FieldDeclaration [ ] fields ; public AbstractMethodDeclaration [ ] methods ; public TypeDeclaration [ ] memberTypes ; public SourceTypeBinding binding ; public ClassScope scope ; public MethodScope initializerScope ; public MethodScope staticInitializerScope ; public boolean ignoreFurtherInvestigation = false ; public int maxFieldCount ; public int declarationSourceStart ; public int declarationSourceEnd ; public int bodyStart ; public int bodyEnd ; public CompilationResult compilationResult ; public MethodDeclaration [ ] missingAbstractMethods ; public Javadoc javadoc ; public QualifiedAllocationExpression allocation ; public TypeDeclaration enclosingType ; public FieldBinding enumValuesSyntheticfield ; public TypeParameter [ ] typeParameters ; public TypeDeclaration ( CompilationResult compilationResult ) { } public void abort ( int abortLevel , CategorizedProblem problem ) { } public final void addClinit ( ) { } public MethodDeclaration addMissingAbstractMethodFor ( MethodBinding methodBinding ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void analyseCode ( ClassScope enclosingClassScope ) { } public void analyseCode ( ClassScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void analyseCode ( CompilationUnitScope unitScope ) { } public boolean checkConstructors ( Parser parser ) { } public CompilationResult compilationResult ( ) { } public ConstructorDeclaration createDefaultConstructor ( boolean needExplicitConstructorCall , boolean needToInsert ) { } public MethodBinding createDefaultConstructorWithBinding ( MethodBinding inheritedConstructorBinding , boolean eraseThrownExceptions ) { } public FieldDeclaration declarationOf ( FieldBinding fieldBinding ) { } public TypeDeclaration declarationOf ( MemberTypeBinding memberTypeBinding ) { } public AbstractMethodDeclaration declarationOf ( MethodBinding methodBinding ) { } public TypeDeclaration declarationOfType ( char [ ] [ ] typeName ) { } public void generateCode ( ClassFile enclosingClassFile ) { } public void generateCode ( BlockScope blockScope , CodeStream codeStream ) { } public void generateCode ( ClassScope classScope , ClassFile enclosingClassFile ) { } public void generateCode ( CompilationUnitScope unitScope ) { } public boolean hasErrors ( ) { } private void internalAnalyseCode ( FlowContext flowContext , FlowInfo flowInfo ) { <START_BUG> if ( ( ( this . binding . isPrivate ( ) ) || ( ( ( this . binding . tagBits ) & ( ( TagBits . IsAnonymousType ) | ( TagBits . IsLocalType ) ) ) == ( TagBits . IsLocalType ) ) ) && ( ! ( this . binding . isUsed ( ) ) ) ) { <END_BUG> if ( ! ( this . scope . referenceCompilationUnit ( ) . compilationResult . hasSyntaxError ) ) { this . scope . problemReporter ( ) . unusedPrivateType ( this ) ; } } InitializationFlowContext initializerContext = new InitializationFlowContext ( null , this , flowInfo , flowContext , this . initializerScope ) ; InitializationFlowContext staticInitializerContext = new InitializationFlowContext ( null , this , flowInfo , flowContext , this . staticInitializerScope ) ; FlowInfo nonStaticFieldInfo = flowInfo . unconditionalFieldLessCopy ( ) ; FlowInfo staticFieldInfo = flowInfo . unconditionalFieldLessCopy ( ) ; if ( ( this . fields ) != null ) { for ( int i = 0 , count = this . fields . length ; i < count ; i ++ ) { FieldDeclaration field = this . fields [ i ] ; if ( field . isStatic ( ) ) { if ( ( ( staticFieldInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) != 0 ) field . bits &= ~ ( ASTNode . IsReachable ) ; staticInitializerContext . handledExceptions = Binding . ANY_EXCEPTION ; staticFieldInfo = field . analyseCode ( this . staticInitializerScope , staticInitializerContext , staticFieldInfo ) ; if ( staticFieldInfo == ( FlowInfo . DEAD_END ) ) { this . staticInitializerScope . problemReporter ( ) . initializerMustCompleteNormally ( field ) ; staticFieldInfo = FlowInfo . initial ( this . maxFieldCount ) . setReachMode ( FlowInfo . UNREACHABLE ) ; } } else { if ( ( ( nonStaticFieldInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) != 0 ) field . bits &= ~ ( ASTNode . IsReachable ) ; initializerContext . handledExceptions = Binding . ANY_EXCEPTION ; nonStaticFieldInfo = field . analyseCode ( this . initializerScope , initializerContext , nonStaticFieldInfo ) ; if ( nonStaticFieldInfo == ( FlowInfo . DEAD_END ) ) { this . initializerScope . problemReporter ( ) . initializerMustCompleteNormally ( field ) ; nonStaticFieldInfo = FlowInfo . initial ( this . maxFieldCount ) . setReachMode ( FlowInfo . UNREACHABLE ) ; } } } } if ( ( this . memberTypes ) != null ) { for ( int i = 0 , count = this . memberTypes . length ; i < count ; i ++ ) { if ( flowContext != null ) { this . memberTypes [ i ] . analyseCode ( this . scope , flowContext , nonStaticFieldInfo . copy ( ) . setReachMode ( flowInfo . reachMode ( ) ) ) ; } else { this . memberTypes [ i ] . analyseCode ( this . scope ) ; } } } if ( ( this . methods ) != null ) { UnconditionalFlowInfo outerInfo = flowInfo . unconditionalFieldLessCopy ( ) ; FlowInfo constructorInfo = nonStaticFieldInfo . unconditionalInits ( ) . discardNonFieldInitializations ( ) . addInitializationsFrom ( outerInfo ) ; for ( int i = 0 , count = this . methods . length ; i < count ; i ++ ) { AbstractMethodDeclaration method = this . methods [ i ] ; if ( method . ignoreFurtherInvestigation ) continue ;

Fix:
if ( ( ! ( this . binding . isUsed ( ) ) ) && ( this . binding . isOrEnclosedByPrivateType ( ) ) ) {