If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'.
//The function being analyzed is:
 //Code Start
     private static String encodeToPercents(Bytes value, boolean isPath) {
        final BitSet allowedChars = isPath ? ALLOWED_PATH_CHARS : ALLOWED_QUERY_CHARS;
        final int length = value.length;
        boolean needsEncoding = false;
        for (int i = 0; i < length; i++) {
            if (!allowedChars.get(value.data[i] & 0xFF)) {
                needsEncoding = true;
                break;
            }
        }

        if (!needsEncoding) {
            // Deprecated, but it fits perfect for our use case.
            // noinspection deprecation
            return new String(value.data, 0, 0, length);
        }

        final StringBuilder buf = new StringBuilder(length);
        for (int i = 0; i < length; i++) {
            final int b = value.data[i] & 0xFF;

            if (b == PERCENT_ENCODING_MARKER && (i + 1) < length) {
                final int marker = value.data[i + 1] & 0xFF;
                final String percentEncodedChar = MARKER_TO_PERCENT_ENCODED_CHAR[marker];
                if (percentEncodedChar != null) {
                    buf.append(percentEncodedChar);
                    i++;
                    continue;
                }
            }

            if (allowedChars.get(b)) {
                buf.append((char) b);
            } else if (b == ' ') {
                if (isPath) {
                    buf.append("%20");
                } else {
                    buf.append('+');
                }
            } else {
                buf.append('%');
                appendHexNibble(buf, b >>> 4);
                appendHexNibble(buf, b & 0xF);
            }
        }

        return buf.toString();
    }
// Code End

//To assist with your evaluation, here is some contextual information. Use the contextual information (if any) to support your evaluation of vulnerability detection.
//The function is located in the file: core/src/main/java/com/linecorp/armeria/internal/common/PathAndQuery.java.
//This function is called by other functions within the repository:

//This function itself calls other functions within the repository:

//Detection
 Only reply with 'Yes' or 'No', the Answer is:


If the following code snippet has any vulnerabilities, output 'Yes'; otherwise, output 'No'.
//The function being analyzed is:
 //Code Start
   private void testWriteMessage(int size, WebsocketVersion version) {
    String path = "/some/path";
    byte[] expected = TestUtils.randomByteArray(size);
    server = vertx.createHttpServer(new HttpServerOptions().setPort(DEFAULT_HTTP_PORT)).websocketHandler(ws -> {
      ws.writeBinaryMessage(Buffer.buffer(expected));
      ws.close();
    });
    server.listen(ar -> {
      assertTrue(ar.succeeded());
      client.websocket(DEFAULT_HTTP_PORT, HttpTestBase.DEFAULT_HTTP_HOST, path, null, version, ws -> {
        Buffer actual = Buffer.buffer();
        ws.handler(actual::appendBuffer);
        ws.closeHandler(v -> {
          assertArrayEquals(expected, actual.getBytes(0, actual.length()));
          testComplete();
        });
      });
    });
    await();
  }
// Code End

//To assist with your evaluation, here is some contextual information. Use the contextual information (if any) to support your evaluation of vulnerability detection.
//The function is located in the file: src/test/java/io/vertx/test/core/WebsocketTest.java.
//This function is called by other functions within the repository:

//This function itself calls other functions within the repository:

//Detection
 Only reply with 'Yes' or 'No', the Answer is: