#vulnerable code 
                                @Override
    public void onStarted(AbstractBuild<?, ?> build, TaskListener listener) {
        GhprbTrigger trigger = Ghprb.extractTrigger(build);
        if (trigger != null) {
            trigger.getBuilds().onStarted(build, listener);
        }
    } 
                            #location 5 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public void onStarted(AbstractBuild<?, ?> build, TaskListener listener) {
        GhprbTrigger trigger = Ghprb.extractTrigger(build);
        if (trigger != null && trigger.getBuilds() != null) {
            trigger.getBuilds().onStarted(build, listener);
        }
    }