code: public static String decode(String encodedURI) {
  
          int length = encodedURI.length();
          StringBuilder strBuilder = new StringBuilder(length + 20);
          char[] codeBuffer = new char[3];
  
          for (int i = 0; i < length; i++) {
              char c = encodedURI.charAt(i);
  
              if (c != '%') {
                  // base case, the character is a normal character, just append
                  strBuilder.append(c);
                  continue;
              }
  
              // found a escape, processing the code and replacing it by
              // the original value that should be found on the DB. This
              // should not be used all the time, only when working in
              // virtual mode... we need to fix this with a FLAG.
              // First we get the 2 chars next to %
              codeBuffer[0] = '%';
              codeBuffer[1] = encodedURI.charAt(i + 1);
              codeBuffer[2] = encodedURI.charAt(i + 2);
  
              // now we check if they match any of our escape codes, if
              // they do the char to be inserted is put in codeBuffer otherwise
              String code = String.copyValueOf(codeBuffer);
              String rep = TABLE.get(code);
              if (rep != null)
                  strBuilder.append(rep);
              else {
                  // This was not an escape code, so we just append the characters and continue;
                  log.warn("Error decoding an encoded URI from the query. Problematic code: {}\nProblematic URI: {}", code, encodedURI);
                  strBuilder.append(codeBuffer);
              }
              i += 2;
          }
          return strBuilder.toString();
      }
docs: *
  Given a string representing a URI, this method will return a new String
  in which all percent encoded characters (e.g., %20) will
  be restored to their original characters (e.g., ' ').
  This is necessary to transform some URIs into the original database values.
  
  @param encodedURI
  @return