Bug: Incompatible bit masks in (e | 0x4000 == 0x1) yields constant
result in
org.eclipse.jdt.internal.ui.javaeditor.JavaEditorBreadcrumb$ElementChangeListener.isStructuralChange(IJavaElementDelta)
This method compares an expression of the form (e | C) to D. which will
always compare unequal due to the specific values of constants C and D.
This may indicate a logic error or typo.
Typically, this bug occurs because the code wants to perform a
membership test in a bit set, but uses the bitwise OR operator ("|")
instead of bitwise AND ("&").
Also such bug may appear in expressions like (e & A | B) == C which is
parsed like ((e & A) | B) == C while (e & (A | B)) == C was intended.
Rank: Scary (5), confidence: High
Pattern: BIT_IOR
Type: BIT, Category: CORRECTNESS (Correctness)
Change-Id: Ic7c4a21a6e4330fcbb54c7350d95ee1dfff8b65d
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>