#vulnerable code 
                                @Test
    public void detect() {
        final Integer result = _.detect(asList(1, 2, 3, 4, 5, 6), 
            new Predicate<Integer>() {
            public Boolean apply(Integer item) {
                return item % 2 == 0;
            }
        });
        assertEquals("2", result.toString());
    } 
                            #location 9 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void detect() {
        final Optional<Integer> result = _.detect(asList(1, 2, 3, 4, 5, 6),
            new Predicate<Integer>() {
            public Boolean apply(Integer item) {
                return item % 2 == 0;
            }
        });
        assertEquals("Optional.of(2)", result.toString());
    }