List<Job> jobs = getJobs(project);
Map<String, Build> builds = new HashMap<String, Build>();
for (Job job : jobs) {
for (int i = 0; i < Math.min(1, job.getBuilds().size()); i++) {
BuildReference buildReference = job.getBuilds().get(i);
Build build = getBuild(project, buildReference, job);
builds.put(job.getName(), build);
}
}