Buggy code:
public class EqualExpression extends BinaryExpression { public EqualExpression ( Expression left , Expression right , int operator ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public final boolean areTypesCastCompatible ( BlockScope scope , TypeBinding castTb , TypeBinding expressionTb ) { if ( expressionTb . isArrayType ( ) ) { if ( castTb . isArrayType ( ) ) { TypeBinding expressionEltTb = ( ( ArrayBinding ) ( expressionTb ) ) . elementsType ( scope ) ; if ( expressionEltTb . isBaseType ( ) ) return ( ( ( ArrayBinding ) ( castTb ) ) . elementsType ( scope ) ) == expressionEltTb ; return areTypesCastCompatible ( scope , ( ( ArrayBinding ) ( castTb ) ) . elementsType ( scope ) , expressionEltTb ) ; } if ( castTb . isBaseType ( ) ) { return false ; } if ( castTb . isClass ( ) ) { if ( scope . isJavaLangObject ( castTb ) ) return true ; return false ; } if ( castTb . isInterface ( ) ) { if ( ( scope . isJavaLangCloneable ( castTb ) ) || ( scope . isJavaIoSerializable ( castTb ) ) ) { return true ; } return false ; } return false ; } if ( expressionTb == ( NullBinding ) ) { return ! ( castTb . isBaseType ( ) ) ; } if ( expressionTb . isBaseType ( ) ) { return false ; } if ( expressionTb . isClass ( ) ) { if ( castTb . isArrayType ( ) ) { if ( scope . isJavaLangObject ( expressionTb ) ) return true ; } if ( castTb . isBaseType ( ) ) { return false ; } if ( castTb . isClass ( ) ) { if ( scope . areTypesCompatible ( expressionTb , castTb ) ) return true ; else { if ( scope . areTypesCompatible ( castTb , expressionTb ) ) { return true ; } return false ; } } if ( castTb . isInterface ( ) ) { if ( ( ( ReferenceBinding ) ( expressionTb ) ) . isFinal ( ) ) { if ( scope . areTypesCompatible ( expressionTb , castTb ) ) return true ; return false ; } else { return true ; } } return false ; } if ( expressionTb . isInterface ( ) ) { if ( castTb . isArrayType ( ) ) { if ( ( scope . isJavaLangCloneable ( expressionTb ) ) || ( scope . isJavaIoSerializable ( expressionTb ) ) ) { return true ; } return false ; } if ( castTb . isBaseType ( ) ) { return false ; } if ( castTb . isClass ( ) ) { if ( scope . isJavaLangObject ( castTb ) ) return true ; if ( ( ( ReferenceBinding ) ( castTb ) ) . isFinal ( ) ) { if ( scope . areTypesCompatible ( castTb , expressionTb ) ) { return true ; } return false ; } return true ; } if ( castTb . isInterface ( ) ) { <START_BUG> if ( ( castTb != expressionTb ) && ( ( scope . compareTypes ( castTb , expressionTb ) ) == ( NotRelated ) ) ) { <END_BUG> MethodBinding [ ] castTbMethods = ( ( ReferenceBinding ) ( castTb ) ) . methods ( ) ; int castTbMethodsLength = castTbMethods . length ; MethodBinding [ ] expressionTbMethods = ( ( ReferenceBinding ) ( expressionTb ) ) . methods ( ) ; int expressionTbMethodsLength = expressionTbMethods . length ; for ( int i = 0 ; i < castTbMethodsLength ; i ++ ) { for ( int j = 0 ; j < expressionTbMethodsLength ; j ++ ) { if ( ( castTbMethods [ i ] . selector ) == ( expressionTbMethods [ j ] . selector ) ) { if ( ( castTbMethods [ i ] . returnType ) != ( expressionTbMethods [ j ] . returnType ) ) { if ( castTbMethods [ i ] . areParametersEqual ( expressionTbMethods [ j ] ) ) { return false ; } } } } } } return true ; } return false ; } return false ; } public final void computeConstant ( TypeBinding leftTb , TypeBinding rightTb ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateOptimizedBoolean ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public void generateOptimizedBooleanEqual ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public void generateOptimizedNonBooleanEqual ( BlockScope currentScope , CodeStream codeStream , Label trueLabel , Label falseLabel , boolean valueRequired ) { } public boolean isCompactableOperation ( ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( castTb != expressionTb ) && ( ( Scope . compareTypes ( castTb , expressionTb ) ) == ( NotRelated ) ) ) {