<commit_before>package com.vmware.buildweb;

import com.vmware.AbstractRestBuildService;
import com.vmware.AbstractRestService;
import com.vmware.BuildResult;
import com.vmware.JobBuild;
import com.vmware.buildweb.domain.SandboxBuild;
import com.vmware.http.HttpConnection;
import com.vmware.http.cookie.ApiAuthentication;
import com.vmware.http.exception.NotFoundException;
import com.vmware.http.request.body.RequestBodyHandling;
import com.vmware.reviewboard.domain.ReviewRequestDraft;
import com.vmware.util.MatcherUtils;

import java.util.List;

/**
 * VMware specific build service.
 */
public class Buildweb extends AbstractRestBuildService {

    private final String buildwebUrl;

    public Buildweb(String buildwebUrl, String buildwebApiUrl, String username) {
        super(buildwebApiUrl, "/", ApiAuthentication.none, username);
        this.buildwebUrl = buildwebUrl;
        this.connection = new HttpConnection(RequestBodyHandling.AsStringJsonEntity);
    }

    public SandboxBuild getSandboxBuild(String id) {
        return connection.get(baseUrl + "sb/build/" + id, SandboxBuild.class);
    }

    @Override
    protected void checkAuthenticationAgainstServer() {
        log.info("No need to authenticate against Buildweb");
    }

    @Override
    protected void loginManually() {
    }

    @Override
    protected String urlUsedInBuilds() {
        return buildwebUrl;
    }

    @Override
    protected BuildResult getResultForBuild(String url) {
        String buildNumber = MatcherUtils.singleMatchExpected(url, "/(\\d++)");
        String buildApiUrl = baseUrl + "sb/build/" + buildNumber;
        SandboxBuild build = optimisticGet(buildApiUrl, SandboxBuild.class);
        return build.getBuildResult();
    }

    @Override
    protected void updateAllBuildsResultSuccessValue(ReviewRequestDraft draft, boolean result) {
        draft.buildwebBuildsAreSuccessful = result;
    }
}<commit_msg>Buildweb: Make build number pattern more specific<commit_after>package com.vmware.buildweb;

import com.vmware.AbstractRestBuildService;
import com.vmware.AbstractRestService;
import com.vmware.BuildResult;
import com.vmware.JobBuild;
import com.vmware.buildweb.domain.SandboxBuild;
import com.vmware.http.HttpConnection;
import com.vmware.http.cookie.ApiAuthentication;
import com.vmware.http.exception.NotFoundException;
import com.vmware.http.request.body.RequestBodyHandling;
import com.vmware.reviewboard.domain.ReviewRequestDraft;
import com.vmware.util.MatcherUtils;

import java.util.List;

/**
 * VMware specific build service.
 */
public class Buildweb extends AbstractRestBuildService {

    private final String buildwebUrl;

    public Buildweb(String buildwebUrl, String buildwebApiUrl, String username) {
        super(buildwebApiUrl, "/", ApiAuthentication.none, username);
        this.buildwebUrl = buildwebUrl;
        this.connection = new HttpConnection(RequestBodyHandling.AsStringJsonEntity);
    }

    public SandboxBuild getSandboxBuild(String id) {
        return connection.get(baseUrl + "sb/build/" + id, SandboxBuild.class);
    }

    @Override
    protected void checkAuthenticationAgainstServer() {
        log.info("No need to authenticate against Buildweb");
    }

    @Override
    protected void loginManually() {
    }

    @Override
    protected String urlUsedInBuilds() {
        return buildwebUrl;
    }

    @Override
    protected BuildResult getResultForBuild(String url) {
        String buildNumber = MatcherUtils.singleMatchExpected(url, "/sb/(\\d++)");
        String buildApiUrl = baseUrl + "sb/build/" + buildNumber;
        SandboxBuild build = optimisticGet(buildApiUrl, SandboxBuild.class);
        return build.getBuildResult();
    }

    @Override
    protected void updateAllBuildsResultSuccessValue(ReviewRequestDraft draft, boolean result) {
        draft.buildwebBuildsAreSuccessful = result;
    }
}
{'fraction_non_alphanumeric': 0.09055827116027786, 'fraction_numerical': 0.0, 'mean_word_length': 4.023255813953488, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7057410', 'n_tokens_mistral': 1101, 'n_tokens_neox': 1075, 'n_words': 230}