code: public static List<Interval> getIntervals(final Configuration conf, final String intervalPropertyName) {
          final String intervalsProperty = conf.get(intervalPropertyName);
          if (intervalsProperty == null) {
              return null;
          }
          if (intervalsProperty.isEmpty()) {
              return ImmutableList.of();
          }
          final List<Interval> intervals = new ArrayList<>();
          for (final String s : intervalsProperty.split(",")) {
              final int lastColonIdx = s.lastIndexOf(':');
              if (lastColonIdx < 0) {
                  throw new FormatException("no colon found in interval string: " + s);
              }
              final int hyphenIdx = s.indexOf('-', lastColonIdx + 1);
              if (hyphenIdx < 0) {
                  throw new FormatException("no hyphen found after colon interval string: " + s);
              }
              final String sequence = s.substring(0, lastColonIdx);
              final int start = parseIntOrThrowFormatException(s.substring(lastColonIdx + 1, hyphenIdx),
                      "invalid start position", s);
              final int stop = parseIntOrThrowFormatException(s.substring(hyphenIdx + 1),
                      "invalid stop position", s);
              intervals.add(new Interval(sequence, start, stop));
          }
          return intervals;
      }
docs: Returns the list of intervals found in a string configuration property separated by colons.
  @param conf the source configuration.
  @param intervalPropertyName the property name holding the intervals.
  @return {@code null} if there is no such a property in the configuration.
  @throws NullPointerException if either input is null.