code: public static Job getJob(final File tempDir, final Project project) {
          Job job = project.getReference(ANT_REFERENCE_JOB);
          if (job != null && job.isStale()) {
              project.log("Reload stale job configuration reference", Project.MSG_VERBOSE);
              job = null;
          }
          if (job == null) {
              try {
                  job = new Job(tempDir);
              } catch (final IOException ioe) {
                  throw new BuildException(ioe);
              }
              project.addReference(ANT_REFERENCE_JOB, job);
          }
          return job;
      }
docs: Get job configuration from Ant project reference or create new.
  
  @param tempDir configuration directory
  @param project Ant project
  @return job configuration