#fixed code
                                protected void fireResourcesChanged(int instanceid, int... resourceIds) {
        transactionalListener.resourceChanged(this, instanceid, resourceIds);
    }
#vulnerable code 
                                protected void fireResourcesChanged(int instanceid, int... resourceIds) {
        if (listener != null) {
            listener.resourceChanged(this, instanceid, resourceIds);
        }
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION