Language: Java
Label: safe
CWE: NVD-CWE-noinfo \u2014 

Code:
    void testRemoveMatrixVariables() {
        assertThat(removeMatrixVariables("/foo")).isEqualTo("/foo");
        assertThat(removeMatrixVariables("/foo;")).isEqualTo("/foo");
        assertThat(removeMatrixVariables("/foo/")).isEqualTo("/foo/");
        assertThat(removeMatrixVariables("/foo/bar")).isEqualTo("/foo/bar");
        assertThat(removeMatrixVariables("/foo/bar;")).isEqualTo("/foo/bar");
        assertThat(removeMatrixVariables("/foo/bar/")).isEqualTo("/foo/bar/");
        assertThat(removeMatrixVariables("/foo;/bar")).isEqualTo("/foo/bar");
        assertThat(removeMatrixVariables("/foo;/bar;")).isEqualTo("/foo/bar");
        assertThat(removeMatrixVariables("/foo;/bar/")).isEqualTo("/foo/bar/");
        assertThat(removeMatrixVariables("/foo;a=b/bar")).isEqualTo("/foo/bar");
        assertThat(removeMatrixVariables("/foo;a=b/bar;")).isEqualTo("/foo/bar");
        assertThat(removeMatrixVariables("/foo;a=b/bar/")).isEqualTo("/foo/bar/");
        assertThat(removeMatrixVariables("/foo;a=b/bar/baz")).isEqualTo("/foo/bar/baz");
        assertThat(removeMatrixVariables("/foo;a=b/bar/baz;")).isEqualTo("/foo/bar/baz");
        assertThat(removeMatrixVariables("/foo;a=b/bar/baz/")).isEqualTo("/foo/bar/baz/");
        assertThat(removeMatrixVariables("/foo;a=b/bar;/baz")).isEqualTo("/foo/bar/baz");
        assertThat(removeMatrixVariables("/foo;a=b/bar;/baz;")).isEqualTo("/foo/bar/baz");
        assertThat(removeMatrixVariables("/foo;a=b/bar;/baz/")).isEqualTo("/foo/bar/baz/");
        assertThat(removeMatrixVariables("/foo;a=b/bar;c=d/baz")).isEqualTo("/foo/bar/baz");
        assertThat(removeMatrixVariables("/foo;a=b/bar;c=d/baz;")).isEqualTo("/foo/bar/baz");
        assertThat(removeMatrixVariables("/foo;a=b/bar;c=d/baz/")).isEqualTo("/foo/bar/baz/");

        // Invalid
        assertThat(removeMatrixVariables("/;a=b")).isNull();
        assertThat(removeMatrixVariables("/prefix/;a=b")).isNull();
    }