All Downloads are FREE. Search and download functionalities are using the official Maven repository.

src.samples.java.ex.USBR_Sample Maven / Gradle / Ivy

Go to download

An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.

The newest version!
package ex;

@SuppressWarnings("all")
public class USBR_Sample {
    public int addEm(String csl) {
        String[] tokens = csl.split(",");
        int sum = 0;
        for (String s : tokens) {
            sum += Integer.parseInt(s);
        }

        int ave = sum / tokens.length;
        return ave;
    }

    public int dontReport(int j) {
        int i;
        try {
            i = 0;
            i = i / j;
        } catch (Exception e) {
            i = -1;
        }
        return i;
    }

    public Exception fpReturnException(String num) {
        try {
            int i = Integer.parseInt(num);
            return null;
        } catch (Exception e) {
            return e;
        }
    }

    public int fpPlusEquals() {
        int i = 0;
        i += 4;
        i += dontReport(i);
        return i;
    }

    public boolean fpOrEquals(boolean b) {
        b |= fpOrEquals(b);
        return b;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy