#vulnerable code 
                                @Test
    public void testSelectUnsupportedField()
    {
        Album chasingProphecy = DataGenerator.chasingProphecy();
        ResultTraverser traverser = new ResultTraverser();
        populatorRegistry.register( new AlbumFieldPopulator() );

        Map<String,Object> objectTree = doTraverse( chasingProphecy, ":(id,title,year,artist)", traverser );
        Assert.assertEquals( 3, objectTree.size() );
        Assert.assertEquals( chasingProphecy.getId(), objectTree.get( "id" ) );
        Assert.assertEquals( chasingProphecy.getTitle(), objectTree.get( "title" ) );
        Map<String,Object> eighthDay = (Map<String, Object>) objectTree.get( "artist" );
        Assert.assertEquals( DataGenerator.eigthDay().getName(), eighthDay.get( "name" ) );
    } 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void testSelectUnsupportedField()
    {
        Album chasingProphecy = DataGenerator.chasingProphecy();
        ResultTraverser traverser = new ResultTraverser();
        populatorRegistry.register( new AlbumFieldPopulator() );

        Map<String,Object> objectTree = doTraverse( chasingProphecy, "id,title,year,artist", traverser );
        Assert.assertEquals( 3, objectTree.size() );
        Assert.assertEquals( chasingProphecy.getId(), objectTree.get( "id" ) );
        Assert.assertEquals( chasingProphecy.getTitle(), objectTree.get( "title" ) );
        Map<String,Object> eighthDay = (Map<String, Object>) objectTree.get( "artist" );
        Assert.assertEquals( DataGenerator.eigthDay().getName(), eighthDay.get( "name" ) );
    }