[Demonstration 1]

[Buggy Method]
@Override
public int rank(short lowbits) {
    int x = BufferUtil.toIntUnsigned(lowbits);
    int answer = 0;
    for (int k = 0; k < this.nbrruns; ++k) {
        int value = BufferUtil.toIntUnsigned(getValue(k));
        int length = BufferUtil.toIntUnsigned(getLength(k));
        if (x < value) {
            return answer;
        } else if (value + length + 1 >= x) {
            return answer + x - value + 1;
        }
        answer += length + 1;
    }
    return answer;
}

[Buggy Hunk]
} else if (value + length + 1 >= x) {

[Patch]
} else if (value + length + 1 > x) {

[Demonstration 2]

[Buggy Method]
@Override
public void onError(Throwable error) {
    Log.e(TAG, "loadProducts.onError", error);
    productsView.hideLoading();
    productsView.showErrorMessage(context.getString(R.string.load_products_error_message));
}

[Buggy Hunk]
productsView.showErrorMessage(context.getString(R.string.load_products_error_message));

[Patch]
productsView.showErrorMessage(context.getString(R.string.generic_error_message));