import org.checkerframework.checker.index.qual.LTLengthOf;
import org.checkerframework.checker.index.qual.LessThan;
import org.checkerframework.checker.index.qual.NonNegative;

public class Issue2029 {
    void lessThanUpperBound(
            @NonNegative @LessThan("#2") int index, @NonNegative int size, char val) {
        char[] arr = new char[size];
        arr[index] = val;
    }

    void LessThanOffsetLowerBound(
            int[] array,
            @NonNegative @LTLengthOf("#1") int n,
            @NonNegative @LessThan("#2 + 1") int k) {
        array[n - k] = 10;
    }

    void LessThanOffsetUpperBound(
            @NonNegative int n,
            @NonNegative @LessThan("#1 + 1") int k,
            @NonNegative int size,
            @NonNegative @LessThan("#3 + 1") int index) {
        @NonNegative int m = n - k;
        int[] arr = new int[size];
        for (; index < arr.length - 1; index++) {
            arr[index] = 10;
        }
    }
}
