[Demonstration 1]

[Buggy Method]
private final double scaleWeight(double w) {
    if (w <= 0) {
        return 0;
    }
    if (options == null) {
        return w;
    }
    return Math.pow(w, Math.exp(-options.random));
}

[Buggy Hunk]
private final double scaleWeight(double w) {

[Patch]
private double scaleWeight(double w) {

[Demonstration 3]

[Buggy Method]
public static boolean isBlank(String s) {
    return s.trim().isEmpty();
}

[Buggy Hunk]
public static boolean isBlank(String s) {

[Patch]
public static boolean isBlank(String s) throws NullPointerException {