Buggy code:
public void addSubscope ( Scope childScope ) { } public final boolean allowBlankFinalFieldAssignment ( FieldBinding binding ) { } String basicToString ( int tab ) { } private void checkAndSetModifiersForVariable ( LocalVariableBinding varBinding ) { } void computeLocalVariablePositions ( int ilocal , int initOffset , CodeStream codeStream ) { } public void emulateOuterAccess ( LocalVariableBinding outerLocalVariable ) { } public final ReferenceBinding findLocalType ( char [ ] name ) { } public LocalDeclaration [ ] findLocalVariableDeclarations ( int position ) { } public LocalVariableBinding findVariable ( char [ ] variableName ) { } public Binding getBinding ( char [ ] [ ] compoundName , int mask , InvocationSite invocationSite , boolean needResolve ) { } public final Binding getBinding ( char [ ] [ ] compoundName , InvocationSite invocationSite ) { } public VariableBinding [ ] getEmulationPath ( LocalVariableBinding outerLocalVariable ) { } public Object [ ] getEmulationPath ( ReferenceBinding targetEnclosingType , boolean onlyExactMatch , boolean denyEnclosingArgInConstructorCall ) { MethodScope currentMethodScope = methodScope ( ) ; SourceTypeBinding sourceType = currentMethodScope . enclosingSourceType ( ) ; if ( ( ! ( currentMethodScope . isStatic ) ) && ( ! ( currentMethodScope . isConstructorCall ) ) ) { if ( ( sourceType == targetEnclosingType ) || ( ( ! onlyExactMatch ) && ( ( sourceType . findSuperTypeOriginatingFrom ( targetEnclosingType ) ) != null ) ) ) { return BlockScope . EmulationPathToImplicitThis ; } } if ( ( ! ( sourceType . isNestedType ( ) ) ) || ( sourceType . isStatic ( ) ) ) { if ( currentMethodScope . isConstructorCall ) { return BlockScope . NoEnclosingInstanceInConstructorCall ; } else if ( currentMethodScope . isStatic ) { return BlockScope . NoEnclosingInstanceInStaticContext ; } return null ; } boolean insideConstructor = currentMethodScope . isInsideInitializerOrConstructor ( ) ; if ( insideConstructor ) { SyntheticArgumentBinding syntheticArg ; if ( ( syntheticArg = ( ( NestedTypeBinding ) ( sourceType ) ) . getSyntheticArgument ( targetEnclosingType , onlyExactMatch ) ) != null ) { if ( ( denyEnclosingArgInConstructorCall && ( currentMethodScope . isConstructorCall ) ) && ( ( sourceType == targetEnclosingType ) || ( ( ! onlyExactMatch ) && ( ( sourceType . findSuperTypeOriginatingFrom ( targetEnclosingType ) ) != null ) ) ) ) { return BlockScope . NoEnclosingInstanceInConstructorCall ; } return new Object [ ] { syntheticArg } ; } } if ( currentMethodScope . isStatic ) { return BlockScope . NoEnclosingInstanceInStaticContext ; } if ( sourceType . isAnonymousType ( ) ) { ReferenceBinding enclosingType = sourceType . enclosingType ( ) ; if ( enclosingType . isNestedType ( ) ) { NestedTypeBinding nestedEnclosingType = ( ( NestedTypeBinding ) ( enclosingType ) ) ; SyntheticArgumentBinding enclosingArgument = nestedEnclosingType . getSyntheticArgument ( nestedEnclosingType . enclosingType ( ) , onlyExactMatch ) ; if ( enclosingArgument != null ) { FieldBinding syntheticField = sourceType . getSyntheticField ( enclosingArgument ) ; if ( syntheticField != null ) { if ( ( ( syntheticField . type ) == targetEnclosingType ) || ( ( ! onlyExactMatch ) && ( ( ( ( ReferenceBinding ) ( syntheticField . type ) ) . findSuperTypeOriginatingFrom ( targetEnclosingType ) ) != null ) ) ) return new Object [ ] { syntheticField } ; } } } } FieldBinding syntheticField = sourceType . getSyntheticField ( targetEnclosingType , onlyExactMatch ) ; if ( syntheticField != null ) { if ( currentMethodScope . isConstructorCall ) { return BlockScope . NoEnclosingInstanceInConstructorCall ; } return new Object [ ] { syntheticField } ; } Object [ ] path = new Object [ 2 ] ; ReferenceBinding currentType = sourceType . enclosingType ( ) ; if ( insideConstructor ) { path [ 0 ] = ( ( NestedTypeBinding ) ( sourceType ) ) . getSyntheticArgument ( currentType , onlyExactMatch ) ; } else { if ( currentMethodScope . isConstructorCall ) { return BlockScope . NoEnclosingInstanceInConstructorCall ; } path [ 0 ] = sourceType . getSyntheticField ( currentType , onlyExactMatch ) ; } if ( ( path [ 0 ] ) != null ) { int count = 1 ; ReferenceBinding currentEnclosingType ; while ( ( currentEnclosingType = currentType . enclosingType ( ) ) != null ) { if ( ( currentType == targetEnclosingType ) || ( ( ! onlyExactMatch ) && ( ( currentType . findSuperTypeOriginatingFrom ( targetEnclosingType ) ) != null ) ) ) break ; if ( currentMethodScope != null ) { currentMethodScope = currentMethodScope . enclosingMethodScope ( ) ; if ( ( currentMethodScope != null ) && ( currentMethodScope . isConstructorCall ) ) { return BlockScope . NoEnclosingInstanceInConstructorCall ; } if ( ( currentMethodScope != null ) && ( currentMethodScope . isStatic ) ) { return BlockScope . NoEnclosingInstanceInStaticContext ; } } syntheticField = ( ( NestedTypeBinding ) ( currentType ) ) . getSyntheticField ( currentEnclosingType , onlyExactMatch ) ; if ( syntheticField == null ) break ; if ( count == ( path . length ) ) { System . arraycopy ( path , 0 , ( path = new Object [ count + 1 ] ) , 0 , count ) ; } <START_BUG> path [ ( count ++ ) ] = ( ( SourceTypeBinding ) ( syntheticField . declaringClass ) ) . addSyntheticMethod ( syntheticField , true ) ; <END_BUG> currentType = currentEnclosingType ; } if ( ( currentType == targetEnclosingType ) || ( ( ! onlyExactMatch ) && ( ( currentType . findSuperTypeOriginatingFrom ( targetEnclosingType ) ) != null ) ) ) { return path ; } } return null ; } public final boolean isDuplicateLocalVariable ( char [ ] name ) { } public int maxShiftedOffset ( ) { } public final boolean needBlankFinalFieldInitializationCheck ( FieldBinding binding ) { } public ProblemReporter problemReporter ( ) { } public void propagateInnerEmulation ( ReferenceBinding targetType , boolean isEnclosingInstanceSupplied ) { } public TypeDeclaration referenceType ( ) { } public int scopeIndex ( ) { } int startIndex ( ) { } public String toString ( ) { } public String toString ( int tab ) { } }

Fix:
path [ ( count ++ ) ] = ( ( SourceTypeBinding ) ( syntheticField . declaringClass ) ) . addSyntheticMethod ( syntheticField , true , false ) ;