### Elasticsearch Version

master

### Installed Plugins

N/A

### Java Version

_bundled_

### OS Version

N/A

### Problem Description

@arteam [observed](https://github.com/elastic/elasticsearch/pull/83221/files#r795474431) that `static record` is redundant, records are apparently implicitly static. I think we should make sure that Checkstyle picks this up rather than needing human involvement.

### Steps to Reproduce

Mark a record declaration as `static` and observe that `./gradlew precommit` still passes.

### Logs (if relevant)

_No response_
x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/aggs/changepoint/KDE.java
int excluded = (int) (0.025 * ((double) values.length) + 0.5);
        double[] orderedValues = new double[values.length];
        int j = 0;
        for (int i = 0; i < values.length; i++) {
            if ((i >= minIndex - excluded && i <= minIndex + excluded) || (i >= maxIndex - excluded && i <= maxIndex + excluded)) {
                continue;
            }
            orderedValues[j++] = values[i];
        }
        this.orderedValues = Arrays.copyOf(orderedValues, j);
        Arrays.sort(this.orderedValues);
        double var = variance(this.orderedValues);
        this.bandwidth = var > 0 ? maxLikelihoodBandwidth(this.orderedValues) : 0.01 * (values[maxIndex] - values[minIndex]);
    }
    ValueAndMagnitude cdf(double x) {
        int a = lowerBound(orderedValues, x - 4.0 * bandwidth);
        int b = lowerBound(orderedValues, x + 4.0 * bandwidth);
        double cdf = 0.0;
        double diff = Double.MAX_VALUE;
        for (int i = a; i < Math.min(Math.max(b, a + 1), orderedValues.length); i++) {
            cdf += new NormalDistribution(orderedValues[i], bandwidth).cumulativeProbability(x);
            diff = Math.min(Math.abs(orderedValues[i] - x), diff);
        }
        cdf /= orderedValues.length;
        return new ValueAndMagnitude(cdf, diff);
    }
    ValueAndMagnitude sf(double x) {
        int a = lowerBound(orderedValues, x - 4.0 * bandwidth);
        int b = lowerBound(orderedValues, x + 4.0 * bandwidth);
        double sf = 0.0;