public File getBuildDir() {
        // we use the null check variant so that people can write true unit tests with a mock ItemParent
        // and without a JenkinsRule. Such tests are of limited utility as there is a high risk of hitting
        // some code that needs the singleton, but for persistence migration test cases it makes sense to permit
        Jenkins j = Jenkins.getInstanceOrNull();
        if (j == null) {
            return new File(getRootDir(), "builds");
        }
        return j.getBuildDirFor(this);
    }
public File getBuildDir ( ) { Jenkins j = Jenkins . getInstanceOrNull ( ) ; if ( j == null ) { return new File ( getRootDir ( ) , "builds" ) ; } return j . getBuildDirFor ( this ) ; }
Directory for storing {@link Run} records.
<p>
Some {@link Job}s may not have backing data store for {@link Run}s, but
those {@link Job}s that use file system for storing data should use this
directory for consistency.

@see RunMap