package npe;

public class ComparisonWithThis {
	int f(Object x, boolean b) {
		if (x == null) System.out.println("x is null");
		if (b) System.out.println("b is true");
		// at this point, X is NCP
		if (x == this) return 0;
		return x.hashCode();
	}

}

Test case showing we could detect more errors if we realized that if a value is equal to a nonnull value, then it must be nonnull as well.