#vulnerable code 
                                @Test
    public void trimWhitespace() {
        GitHubRepositoryName repo = GitHubRepositoryName
                .create("               https://user@github.com/jenkinsci/jenkins/      ");
        assertNotNull(repo);
        assertEquals("jenkinsci", repo.userName);
        assertEquals("jenkins", repo.repositoryName);
        assertEquals("github.com", repo.host);
    } 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void trimWhitespace() {
        assertThat("               https://user@github.com/jenkinsci/jenkins/      ", repo(allOf(
                withHost("github.com"),
                withUserName("jenkinsci"),
                withRepoName("jenkins")
        )));
    }