Buggy code:
public class DefaultVibe implements Vibe { private final VibeBackend backend ; private final long defaultSampleInterval ; private final long defaultSampleRetention ; private final Map < SampleTime , TimeSeriesSampler > samplers ; private final ScheduledExecutorService executor ; public DefaultVibe ( VibeBackend backend , long sampleInterval , long sampleRetention ) { } public static VibeBuilder builder ( ) { } @ Override public < T > ProbeBuilder < T > probe ( Probe < T > probe ) { } @ Override public < T > TimeSeriesBuilder < T > timeSeries ( SampledProbe < T > probe ) { } @ Override public < T > EventsBuilder < T > events ( Class < T > base ) { } private static class AbstractBuilder < Self > implements Builder < Self > { protected String path ; @ Override public Self at ( String path ) { } @ Override public Self at ( String ... hierarchy ) { } protected void verify ( ) { } } private class TimeSeriesBuilderImpl < T > extends DefaultVibe . AbstractBuilder < TimeSeriesBuilder < T > > implements TimeSeriesBuilder < T > { private final SampledProbe < T > probe ; private final List < DefaultVibe . TriggerHolder > triggers ; private long sampleInterval ; private long sampleRetention ; public TimeSeriesBuilderImpl ( SampledProbe < T > probe ) { } @ Override public TimeSeries < T > export ( ) { verify ( ) ; SampleTime time = new SampleTime ( sampleInterval , sampleRetention ) ; TimeSeriesSampler sampler = samplers . get ( time ) ; if ( sampler == null ) { sampler = new TimeSeriesSampler ( executor , sampleInterval , sampleRetention , TimeUnit . MILLISECONDS ) ; samplers . put ( time , sampler ) ; sampler . start ( ) ; } TimeSeries < T > series = sampler . add ( probe ) ; List < Runnable > builtTriggers = new ArrayList < Runnable > ( ) ; if ( ! ( triggers . isEmpty ( ) ) ) { Events < TriggerEvent > events = new se . l4 . vibe . internal . EventsImpl < TriggerEvent > ( EventSeverity . WARN ) ; for ( DefaultVibe . TriggerHolder th : triggers ) { Runnable r = th . create ( series , events ) ; builtTriggers . add ( r ) ; } backend . export ( path , events ) ; } backend . export ( path , series ) ; final Runnable [ ] triggers = builtTriggers . toArray ( new Runnable [ builtTriggers . size ( ) ] ) ; series . addListener ( new se . l4 . vibe . probes . SampleListener < T > ( ) { @ Override public void sampleAcquired ( SampledProbe < T > probe , Entry < T > value ) { for ( Runnable r : triggers ) { r . run ( ) ; } } } ) ; return series ; } @ Override public < Type > TimeSeriesBuilder < T > trigger ( EventSeverity severity , Trigger < ? super T , Type > trigger , Condition < Type > condition ) { } @ Override public TimeSeriesBuilder < T > withInterval ( long time , TimeUnit unit ) { } @ Override public TimeSeriesBuilder < T > withRetention ( long time , TimeUnit unit ) { } } private static class TriggerHolder < Input , Output > { private final EventSeverity severity ; private final Trigger < Input , Output > trigger ; private final Condition < Output > condition ; public TriggerHolder ( EventSeverity severity , Trigger < Input , Output > trigger , Condition < Output > condition ) { } public Runnable create ( final TimeSeries < Input > series , final Events < TriggerEvent > events ) { } } private class ProbeBuilderImpl < T > extends DefaultVibe . AbstractBuilder < ProbeBuilder < T > > implements ProbeBuilder < T > { private final Probe < T > probe ; public ProbeBuilderImpl ( Probe < T > probe ) { } @ Override public Probe < T > export ( ) { verify ( ) ; backend . export ( path , probe ) ; <START_BUG> return null ; <END_BUG> } } private class EventsBuilderImpl < T > extends DefaultVibe . AbstractBuilder < EventsBuilder < T > > implements EventsBuilder < T > { private EventSeverity severity ; public EventsBuilderImpl ( ) { } @ Override public EventsBuilder < T > setSeverity ( EventSeverity severity ) { } @ Override public Events < T > create ( ) { } } }

Fix:
return probe ;