code: private List<String> fixSpaceInURL(List<String> values, int requiredSize) {
          // Do validity check. 3rd from last is a date of 14 numeric
          // characters. The 4th from last is IP, all before the IP
          // should be concatenated together with a '%20' joiner.
          // In the below, '4' is 4th field from end which has the IP.
          if (!(values.size() > requiredSize) || values.size() < 4) {
              return values;
          }
          // Test 3rd field is valid date.
          if (!isDate((String) values.get(values.size() - 3))) {
              return values;
          }
  
          // Test 4th field is valid IP.
          if (!isLegitimateIPValue((String) values.get(values.size() - 4))) {
              return values;
          }
  
          List<String> newValues = new ArrayList<String>(requiredSize);
          StringBuffer url = new StringBuffer();
          for (int i = 0; i < (values.size() - 4); i++) {
              if (i > 0) {
                  url.append("%20");
              }
              url.append(values.get(i));
          }
          newValues.add(url.toString());
          for (int i = values.size() - 4; i < values.size(); i++) {
              newValues.add(values.get(i));
          }
          return newValues;
      }
docs: Fix space in URLs.
  The ARCWriter used to write into the ARC URLs with spaces in them.
  See <a
  href="https://sourceforge.net/tracker/?group_id=73833&atid=539099&func=detail&aid=1010966">[ 1010966 ]
  crawl.log has URIs with spaces in them</a>.
  This method does fix up on such headers converting all spaces found
  to '%20'.
  @param values List of metadata values.
  @param requiredSize Expected size of resultant values list.
  @return New list if we successfully fixed up values or original if
  fixup failed.