#vulnerable code 
                                @Test
    public void finishSpan_userSuppliedDuration() {
        Span finished = new Span().setTimestamp(1000L); // set in start span
        finished.startTick = 500L; // set in start span
        state.setCurrentLocalSpan(finished);

        localTracer.finishSpan(500L);

        verify(mockCollector).collect(finished);
        verifyNoMoreInteractions(mockCollector);

        assertEquals(500L, finished.getDuration().longValue());
    } 
                            #location 12 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test
    public void finishSpan_userSuppliedDuration() {
        Span finished = new Span().setName("foo").setTimestamp(1000L); // set in start span
        finished.startTick = 500L; // set in start span
        state.setCurrentLocalSpan(finished);

        localTracer.finishSpan(500L);

        verify(mockReporter).report(finished.toZipkin());
        verifyNoMoreInteractions(mockReporter);

        assertEquals(500L, finished.getDuration().longValue());
    }