package bugIdeas;

import edu.umd.cs.findbugs.annotations.ExpectWarning;
import edu.umd.cs.findbugs.annotations.NoWarning;

public class Ideas_2015_02_02 {

    // public boolean isASCII(char c) [RuntimeInvisibleAnnotations]
    // Code(max_stack = 2, max_locals = 2, code_length = 14)
    // 0: iload_1
    // 1: iflt #12
    // 4: iload_1
    // 5: bipush 128
    // 7: if_icmpgt #12
    // 10: iconst_1
    // 11: ireturn
    // 12: iconst_0
    // 13: ireturn

    @NoWarning("INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE")
    public boolean isASCII(char c) {
        return c >= 0 && c < 128;
    }

    @ExpectWarning("INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE")
    public boolean isASCIIBroken(char c) {
        return c >= 0 && c < 80;
    }

    @ExpectWarning("INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE")
    public boolean isNonNegative(char c, char b) {
        return c >= 0 && b >= 0;
    }

}

@@ -591,36 +591,457 @@
  128;%0A    %7D%0A
-%0A    @Expect
+    @NoWarning(%22INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE%22)%0A    public int foo(char %5B%5D ca) %7B%0A        int count = 0;%0A        for(int i = 0; i %3C ca.length; i++) %7B%0A            char c=ca%5Bi%5D;%0A            if (c%3E=0&&c%3C=0x7f)%0A               count++;%0A        %7D%0A        return count;%0A    %7D%0A%0A    @NoWarning(%22INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE%22)%0A    public boolean isOneByte(char c) %7B%0A        return c %3E= 0 && c %3C= 255;%0A    %7D%0A    %0A    @No
 Warning(%22INT
@@ -1159,24 +1159,32 @@
 %3C 80;%0A    %7D%0A
+   %0A    
 %0A    @Expect
@@ -1325,12 +1325,358 @@
 0;%0A    %7D
+%0A   %0A    @ExpectWarning(%22INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE%22)%0A    public int isASCII2(char c, char b) %7B%0A        if (c %3E= 0 && b %3C 128)%0A            return b+c;%0A        else return 0;%0A    %7D%0A    @NoWarning(%22INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE%22)%0A    public int bar(char c) %7B%0A        if (c%3C0%7C%7Cc%3E0xff) return -1;%0A        return c;%0A    %7D%0A  
 %0A%0A%7D%0A

Add test cases