code: private static boolean samePattern(String value1, String value2) {
          if (value1.length() == 0) {
              return value2.length() == 0;
          }
          if (value1.charAt(0) == '{') {
              return value2.length() > 0 && value2.charAt(0) == '{';
          }
          return value1.equals(value2);
      }
docs: '{' and they have the same value (case-sensitive).