code: @SuppressWarnings("unchecked")
      protected List<RunT> getEstimatedDurationCandidates() {
          List<RunT> candidates = new ArrayList<>(3);
          RunT lastSuccessful = getLastSuccessfulBuild();
          int lastSuccessfulNumber = -1;
          if (lastSuccessful != null) {
              candidates.add(lastSuccessful);
              lastSuccessfulNumber = lastSuccessful.getNumber();
          }
  
          int i = 0;
          RunT r = getLastBuild();
          List<RunT> fallbackCandidates = new ArrayList<>(3);
          while (r != null && candidates.size() < 3 && i < 6) {
              if (!r.isBuilding() && r.getResult() != null && r.getNumber() != lastSuccessfulNumber) {
                  Result result = r.getResult();
                  if (result.isBetterOrEqualTo(Result.UNSTABLE)) {
                      candidates.add(r);
                  } else if (result.isCompleteBuild()) {
                      fallbackCandidates.add(r);
                  }
              }
              i++;
              r = r.getPreviousBuild();
          }
          
          while (candidates.size() < 3) {
              if (fallbackCandidates.isEmpty())
                  break;
              RunT run = fallbackCandidates.remove(0);
              candidates.add(run);
          }
          
          return candidates;
      }
docs: Returns candidate build for calculating the estimated duration of the current run.
  
  Returns the 3 last successful (stable or unstable) builds, if there are any.
  Failing to find 3 of those, it will return up to 3 last unsuccessful builds.
  
  In any case it will not go more than 6 builds into the past to avoid costly build loading.