### 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/ChangePointAggregator.java
lowerRange.addValues(timeWindow, i -> timeWindowWeights[i], 0, candidateChangePoints[0]);
        LeastSquaresOnlineRegression lowerLeastSquares = new LeastSquaresOnlineRegression(2);
        LeastSquaresOnlineRegression upperLeastSquares = new LeastSquaresOnlineRegression(2);
        for (int i = 0; i < candidateChangePoints[0]; i++) {
            lowerLeastSquares.add(i, timeWindow[i], timeWindowWeights[i]);
        }
        for (int i = candidateChangePoints[0], x = 0; i < timeWindow.length; i++, x++) {
            upperLeastSquares.add(x, timeWindow[i], timeWindowWeights[i]);
        }
        int upperMovingWindow = 0;
        for (int cp : candidateChangePoints) {
            double lowerRangeVar = lowerRange.variance();
            double upperRangeVar = upperRange.variance();
            double rv1 = lowerLeastSquares.rSquared();
            double rv2 = upperLeastSquares.rSquared();
            double v1 = lowerRangeVar * (1 - Math.abs(rv1));
            double v2 = upperRangeVar * (1 - Math.abs(rv2));
            VarianceAndRValue varianceAndRValue = new VarianceAndRValue((cp * v1 + (n - cp) * v2) / n, (cp * rv1 + (n - cp) * rv2) / n);
            if (varianceAndRValue.compareTo(vAndR) < 0) {
                vAndR = varianceAndRValue;
                changePoint = cp;
            }
            for (int i = 0; i < step; i++) {
                lowerRange.addValue(timeWindow[i + cp], timeWindowWeights[i + cp]);
                upperRange.removeValue(timeWindow[i + cp], timeWindowWeights[i + cp]);
                lowerLeastSquares.add(i + cp, timeWindow[i + cp], timeWindowWeights[i + cp]);
                upperLeastSquares.remove(i + upperMovingWindow, timeWindow[i + cp], timeWindowWeights[i + cp]);
                upperMovingWindow++;
            }
        }