code: private void checkAndRecord(AbstractProject that, TreeMap<Integer, RangeSet> r, Collection<R> builds) {
          for (R build : builds) {
              RangeSet rs = build.getDownstreamRelationship(that);
              if(rs==null || rs.isEmpty())
                  continue;
  
              int n = build.getNumber();
  
              RangeSet value = r.get(n);
              if(value==null)
                  r.put(n,rs);
              else
                  value.add(rs);
          }
      }
docs: Helper method for getDownstreamRelationship.
  
  For each given build, find the build number range of the given project and put that into the map.